A custom StartupActivity to workaround a known Android issue with two application instances. The issue is described here[http://code.google.com/p/android/issues/detail?id=2373] and here[http://code.google.com/p/android/issues/detail?id=5277].
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
res initial import Oct 8, 2010
src/com/cleverua/android
.classpath
.gitignore adds .gitignore Oct 8, 2010
.project
AndroidManifest.xml
README.rdoc
default.properties

README.rdoc

DESCRIPTION

Android OS is really good, however it is not perfect. At least on 1.6, 2.0.1 and 2.1 we have encountered an odd application startup bug, described here and here. Believe me or not, but after a new application version is loaded on the device/emulator we got two instances of the same app. This is especially annoying in production when customers upgrade the app via OTA.

This project solves this by introducing the StartupActivity, which simply prevents another instance of the app to be started.

Usage

Suppose you have an app and its launching activity is MainActivity.

To use the StartupActivity you need to:

  • include the <uses-permission android:name=“android.permission.GET_TASKS” /> statement into your AndroidManifest.xml.

  • make the StartupActivity your launching activity instead of the MainActivity.

  • modify the StartupActivity.onCreate() method to use an Intent pointing to your MainActivity.

Please, make sure you've checked the source code for the usage details.

EXAMPLES

To see an example please launch the Android Startup Activity Demo application in Android device emulator.