Showing posts with label mobile_app. Show all posts
Showing posts with label mobile_app. Show all posts

Monday, July 12, 2010

Android Dev Tips

Tip 1: Import a sqlite DB from somewhere else (let us say db.sqlite)
tools$ ./adb push ~/android/db.sqlite /data/data/test.app/databases
1934 KB/s (443392 bytes in 0.223s)

Tip2:
While Activity.setContentView takes an id of a Layout, TabSpec.setContent takes an id of a View.

Tip 3: Android: Get the Application Version in an activity
PackageInfo info = getPackageManager().getPackageInfo( getPackageName(), 0 );
String version = info.versionName;

Tip 4: Android onNewIntent() is never called.

In the android manifest file for the activity, add the following attribute
android:launchMode="singleInstance"

Tuesday, June 29, 2010

Mobile Development Tips: Blackberry Application Development

Problem: ButtonField changelistener displays the standard menu (Show Keyboard, Switch Application, Close)

Solution: In the construction of the button field, use the CONSUME_CLICK style.
Eg: ButtonField mybutton = new ButtonField( "My", ButtonField.CONSUME_CLICK );