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!!!

Monday, September 02, 2013

Additional topics added to the Raspberry Pi Course on 12 Sep 2013 (Thur)

Next week's Raspberry Pi course is going to be super fun as I have just finished working on the course materials. Among the key topics that I have indicated in the outline, like:

  • Getting Started with Raspberry Pi
  • Learning Python

I have also included some additional topics that are super fun:

  • Interfacing with a 16x2 LCD display using the Pi Cobbler Kit
  • Streaming video using a USB webcam
  • How to setup a Web server on the Raspberry Pi
  • How to remote login to the Raspberry Pi
  • How to interface with the PiFace board to connect to external devices

 

Course outlines and application form here.


Venue
Bayview Hotel
30 Bencoolen Street
Singapore 189621

Date
12 Sep 2013 (Thu)

Time
9am to 5pm

Fee
S$599