1

Know if the user launched an app in Android/Phonegap

view story
linux-howto

http://stackoverflow.com – I am developing a PhoneGap/Cordova App (on Android) which can be launched: Either by the user (by clicking on the icon of the App) or by a PhoneGap plugin scheduling an AlarmManager, which fires a BroadcastReceiver at certain times, which calls context.startActivity(myAppIntent). How can I tell from inside my PhoneGap App that the launch was initiated by the user or the AlarmManager? as I want to present different behavior in each case. I first thought about using Intent.putExtra() and Intent.getExtras() to pass a special parameter if AlarmManager is launching the App, then injecting this (HowTos)