Wednesday, October 30, 2013

Check if your Android device supports Bluetooth Low Energy (BLE)

If you want to know if your Android device supports Bluetooth Low Energy (aka Bluetooth LE; sometimes also known as Bluetooth Smart or Bluetooth 4.0), download the checker application that I have created here. You can click on the link using a web browser on your Android device and it will automatically download the app onto your device. Just install it once it is downloaded.


This application will allow you to know if Bluetooth LE is supported on your device. You can also optionally email the results to me so that I can collate a list of devices that supports Bluetooth LE.

Want to learn how to program Bluetooth LE on your Android device? Join us in this upcoming course on Advanced Android – Bluetooth Low Energy Programming.

Tuesday, October 29, 2013

Course Schedule for Nov 2013

November 2013 
Sun
Mon
Tue
Wed
Thu
Fri
Sat





1
2
3
4-5
S$997/pax
6
7
S$699/pax

8
S$699/pax
9
10

11
S$599/pax
12
13
14-15
S$997/pax
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30


For full course schedule, click here

Wednesday, October 16, 2013

CS102 – Advanced C# 5.0 - Object-Oriented Programming - 9-10 Dec 2013

Since the release of the Microsoft .NET Framework in July 2000, the C# programming language has gone through a few revisions, with the latest version 5.0. Over the years, the C# language has gained a lot of followers, partly due to its familiar syntax to Java and C. The clear syntax of the language made it easy to learn, and is a popular choice for beginning programmers.


Coupled with Visual Studio, Microsoft’s flagship development environment, developing applications using C# is now available to a wide audience. In this fast-pace 2-day course, attendees will gain a solid foundation in C# programming. In particular, special focus will be placed on Object-Oriented Programming (OOP) using C#.

Topics
Motivations for Object-Oriented Programming (OOP)
   
Classes
    Objects
Interfaces
Inheritance
Delegates and Events
Generics
Language Integrated Query (LINQ)
Named Methods
Optional Parameters
async and await
Advanced Topics
    Threading
    Files and Streams

Course Fee
• S$997 (nett; No GST)

Download course outline and application here.

Dates
• 9-10 Dec 2013 (Mon-Tue)

Venue
Bayview Hotel Singapore
30 Bencoolen Street 
Singapore 189621

Tuesday, October 15, 2013

WEB103 – 2-Day Web Development using PHP and MySQL - 19-20 Dec 2013

PHP is a server-side script language that is designed for dynamic web applications development. It is often used in conjunction with HTML and SQL to produce dynamic web pages. In this course, participants will learn about the PHP language, as well as how it integrates with HTML to create dynamic web applications. In addition, participants will also learn how to use PHP together with MySQL databases to create data-driven web sites. 

Topics
Setting up the Development Server
Introduction to PHP
Structure of PHP
Data Types
PHP Operators
PHP Control Flow
PHP Functions and Objects
Object Oriented Programming using PHP
PHP and the Web
Working with Web Forms, Data, and Sessions
Using Cookies in PHP
Error logging and exceptions handling
Introduction to MySQL
Configuring PHP for Database Support
Creating a MySQL Database
Accessing MySQL Database using PHP

Course Fee
• S$997 (nett; No GST)

Download course outline and application here.

Dates
• 19-20 Dec 2013 (Thu-Fri)

Venue
Bayview Hotel Singapore
30 Bencoolen Street 
Singapore 189621

Monday, October 14, 2013

Foundation of iPhone Programming - 31 Oct to 1 Nov 2013


This course has been fully updated to cover the latest Xcode 5 and iOS 7. In Xcode 5, all projects use Storyboard by default and you no longer can use .XIB files when creating new projects. In addition, iOS 7 has introduced some design changes that you need to be aware of. 

Come and join us in this fun-filled and intensive course on iOS 7 programming. It would be the most worthwhile time that you ever spend on a course. 

Course Fee
• S$997 (nett; No GST)

Download course outline and application here.

Dates
• 31 Oct to 1 Nov 2013 (Thu-Fri)

Venue
Bayview Hotel Singapore
30 Bencoolen Street 
Singapore 189621

Wednesday, October 09, 2013

AND303 – 1-Day Advanced Android – Bluetooth Low Energy Programming

In recent years, we have seen a proliferation of Bluetooth Low Energy (Bluetooth LE) devices. Bluetooth LE, as its name implies, uses low energy for transmitting data.  This is very useful for devices that require long-battery life, such as heart rate monitor, temperature sensors, etc.  In Android, Bluetooth LE functionalities weren’t supported at the platform level until Android 4.3


In Android 4.3, you can now write applications that use Bluetooth LE. Your application can now connect to heart monitors, as well as temperature sensors using Bluetooth LE. 

Topics
  • What is Bluetooth Low Energy (Bluetooth LE)
  • Roles and Responsibilities
    • Central and Peripherals
    • GATT server and GATT client
    • Services and Characteristics
  • Testing for Bluetooth LE support in your Android devices
  • Scanning for Bluetooth LE devices
  • Communicating with Bluetooth LE sensors
  • What is iBeacon
    • Detecting iBeacons
  • Building Location Based Services applications using iBeacon
At the end of the course, you will learn:
How to communicate with Bluetooth Low Energy devices (such as temperature sensors and heart rate monitors) from your Android applications.
How to build location-aware applications using iBeacon.
Prerequisites 
Attended the Foundation of Android Programming course
Android device running at least 4.3 and supports Bluetooth LE (required)
Android ADT Bundle


Course Fee
S$699 (nett; No GST)

Download course outline and application here.

Dates
7 Nov 2013 (Thu)
12 Dec 2013 (Thu)

Venue
Bayview Hotel Singapore
30 Bencoolen Street 
Singapore 189621

Android Tip - Checking for Bluetooth LE Support


Bluetooth Low Energy (LE) devices has been out for quite sometime. However, support for Bluetooth LE was not available until Android 4.3. Even so, support for Bluetooth LE is still dependent on the hardware that you have running the Android 4.3.  For instance, the first generation of Nexus 7 does not support Bluetooth LE, even if you have upgraded it to Android 4.3.

Bluetooth LE is based on the Bluetooth 4.0 Specification. It is also commonly known as Bluetooth Smart.

In order to test if you device supports Bluetooth LE, add the following permissions and uses-feature element in the AndroidManifest.xml file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="net.learn2develop.checkforble"
    android:versionCode="1"
    android:versionName="1.0" >
 
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />
   
    <uses-permission android:name=
        "android.permission.BLUETOOTH"/>
    <uses-permission android:name=
        "android.permission.BLUETOOTH_ADMIN"/>
   
    <uses-feature android:name="android.hardware.bluetooth_le"
        android:required="false"/>
 
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=
                "net.learn2develop.checkforble.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name=
                    "android.intent.action.MAIN" />
                <category android:name=
                    "android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
 
</manifest>


In the onCreate() method of your activity, use the hasSystemFeature() method from the PackageManager class to check if Bluetooth LE is supported:

import android.app.Activity;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.view.Menu;
import android.widget.Toast;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        String msg;
        //---check to determine whether BLE is supported on
        // the device---
        if (!getPackageManager().hasSystemFeature(
            PackageManager.FEATURE_BLUETOOTH_LE)) {
            msg = "Bluetooth LE not supported on this device";
            finish();
        } else {
            msg = "Congrats! Bluetooth LE is supported on " +
                  "this device!";
        }
        Toast.makeText(this, msg,
                Toast.LENGTH_SHORT).show();
    }

Tuesday, October 08, 2013

IOS301 – 1-Day Advanced iOS – Programming iBeacon in iOS7 using Bluetooth Low Energy

In recent years, we have seen a proliferation of Bluetooth Low Energy (Bluetooth LE) devices. Bluetooth LE, as it name implies, uses low energy for transmitting data.  This is very useful for devices that require long-battery life, such as heart rate monitor, temperature sensors, etc.  In iOS, Bluetooth LE functionalities are encapsulated in the Core Bluetooth Framework. Using the Core Bluetooth Framework, you can now write Bluetooth-enabled iOS applications that are able to communicate with Bluetooth LE devices. 


In iOS 7, Apple has taken Bluetooth LE one step further with the introduction of iBeacon. iBeacons are physical devices that use Bluetooth LE to continuously transmit its location.  When an iBeacon-enabled iOS application detects the presence of an iBeacon, the application will be sent a notification. Using the data transmitted by the iBeacons, the application can calculate the distance the user is away from the iBeacon. This is very useful for building location-based services that targets the insides of a building (such as malls and hospitals), where traditional location-based techniques are not quite adequate in knowing which floor a user is at. 
Topics
What is Bluetooth Low Energy (Bluetooth LE)
Introduction to the Core Bluetooth Framework
Players in Core Bluetooth
        o Central and Peripherals
        o Services and Characteristics
Simulating Peripherals using your iOS device
Communicating with Bluetooth LE sensors
What is iBeacon
Building your own iBeacon
Detecting iBeacons
Building Location Based Services applications using iBeacon

At the end of the course, you will learn:
How to communicate with Bluetooth Low Energy devices (such as temperature sensors and heart rate monitors) from your iOS applications.
How to build location-aware applications using iBeacon.
Prerequisites 
Attended the Foundation of iPhone Programming course
Mac running Mac OS X Mountain Lion (10.8.5) or later
iPhone/iPod touch/iPad (required)
Xcode 5 or later

Course Fee
S$699 (nett; No GST)

Download course outline and application here.

Dates
8 Nov 2013 (Fri)
13 Dec 2013 (Fri)

Venue
Bayview Hotel Singapore
30 Bencoolen Street 
Singapore 189621

Wednesday, September 18, 2013

Advanced iOS - Storyboard - 10 Oct 2013 (Thu)

In Xcode 5, you can no longer choose to create a project using the usual .XIB files. Instead, you will have to use Storyboard to create the layouts for your UI. This upcoming course on iOS Storyboard aims to show developers how to make use of Storyboard to layout their UI. In this intensive one-day course, you will learn how to get started with Storyboard, as well as create some interesting UI effects, such as sliding View windows, and your own custom PDF reader. 


Course outlines and application form here.

Venue
Bayview Hotel
30 Bencoolen Street
Singapore 189621

Date
10 Oct 2013 (Thu)

Time
9am to 5pm

Fee
S$599

Participants are expected to have basic knowledge of iOS programming. 

Sunday, September 15, 2013

Schedule for IOS101 Foundation of iPhone Programming course


The IOS101 Foundation of iPhone Programming course is now updated to Xcode 5 and iOS 7! The schedule is as follows:

S$997/pax

31 Oct - 1 Nov 2013
(Thu-Fri)
31 Oct - 1 Nov 2013
(Thu-Fri)
30-31 Dec 2013
(Mon-Tue)

Tuesday, September 10, 2013

Android Tip - Auto-launch your App on Bootup


For corporate applications, it is not uncommon for enterprises to require their specific applicatons to be automatically launched when the device starts up.

To ensure your application is launched automatically upon device bootup, add a new Java Class file to the project and name it as BootupReceiver.java. Populate the BootupReceiver.java class as follows:

package net.learn2develop.autostartup;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

public class BootupReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        Toast.makeText(context, "App started",
            Toast.LENGTH_LONG).show();

        //---start the main activity of your app---
        Intent i = new Intent(context, MainActivity.class);
        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(i);
    }
}

Add the following statements in bold to the AndroidManifest.xml file:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="net.learn2develop.autostartup"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

    <uses-permission android:name=
        "android.permission.RECEIVE_BOOT_COMPLETED"/>
   
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name=
                    "android.intent.action.MAIN" />

                <category android:name=
                    "android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <receiver android:name=".BootupReceiver">
            <intent-filter>
                <action android:name=
                   "android.intent.action.BOOT_COMPLETED" />
                <category android:name=
                   "android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>
       
    </application>

</manifest>


That’s it! Your application will now be automatically launched when the device has finished the bootup process.

Android Tip - Checking Availability of Google Play Services


Nowadays, most of the services in Android are encapsulated in Google Play Services. For example, the latest version of Google Maps for Android is based on the Google Play services APK. Another feature that is based on Google Play services is the Fused Location Provider. Moving all the critical services into the Google Play services APK allows Google to deliver updates to core services much more quickly, without replying on carrier or OEM system image updates.

As such, it is important that your application checks the device that it is running on to ensure that the device has the Google Play services APK installed.

You can make use of the isGooglePlayServicesAvailable() method from the GooglePlayServicesUtil class to check if the target device has the Google Play services APK:

import com.google.android.gms.common.GooglePlayServicesUtil;
...
        int resultCode = GooglePlayServicesUtil
            .isGooglePlayServicesAvailable(this);
        // ---if Google Play services is available---
        if (ConnectionResult.SUCCESS == resultCode) {
            Log.d("Location Updates",
                "Google Play services is available.");
        } else {
            //---Google Play services was not available for
            // some reason---
            Log.d("Location Updates",
                "Google Play services is not available."); 
        }

Monday, September 09, 2013

Getting all ready for the Raspberry Pi course on 12 Sep!


Getting all geared up for the Raspberry Pi and Python Programming course this week on the 12 Sep 2013! This is going to be a super fun course! Will be bringing LCD screens, PiFace, Webcams, Pi Camera, and more! If you have missed this session, don't worry! The next run is on the 1 Oct 2013. Hope to see you at the course!!!