You don't necessarily need to know the name or text of the shortcut you made, instead you can use that shortcut to "pass arguments" to the activity via an intent. Your shortcut will be a regular Activity, it will just pass an argument to the main Activity of your application using an Intent.
Intent i = new Intent(this, SomeActivity.class);
i.putExtra("some_tag", true);
startActivity(i);
And in the Activity to be launched,
@Override
protected void onNewIntent(Intent in) {
super.onNewIntent(in);
if(in.hasExtra("some_tag") && in.getExtra("some_tag") == true) {
//Do Something Special
}
}
Note that you need launchMode
set to singleTop
to use onNewIntent()
as noted here:
http://developer.android.com/reference/android/app/Activity.html#onNewIntent(android.content.Intent)
More information can be found here:
http://www.basic4ppc.com/forum/basic4android-getting-started-tutorials/11444-add-shortcuts-your-android-application.html