Capitalization
Hey NJDude,
Thanks for replying. As it happens you helped me once before when I was even more of a noob than I am now. v 2.3 is what I'm using.
I have a 6 activity app that will receive digital inputs resulting in Toasts or starting the next Activity automatically if certain connections have been made by the user. After walking the user through the setup (on a Nexus 7 or similar) I want to begin monitoring and logging an analog signal. So I want a button click on my last Activity to shortcut/start into this single Activity "templogger" app. Both packages compile and run on my Nexus.
http://www.b4x.com/forum/basic4andr...ectly-within-your-application.html#post100587
Thanks again
Sub Activity_Create(FirstTime As Boolean)
StartActivity("CreateShortcut")
Dim shortcutIntent As Intent
shortcutIntent.Initialize("", "")
shortcutIntent.SetComponent("com.ioiobook.templogger/.mainactivity") '<--- change to match your package name / and target activity.
shortcutIntent.PutExtra("from_shortcut", True)
Dim In As Intent In.Initialize("", "")
In.PutExtra("android.intent.extra.shortcut.INTENT", shortcutIntent)
In.PutExtra("android.intent.extra.shortcut.NAME", "IOIO Temp Logger")
In.PutExtra("android.intent.extra.shortcut.ICON", LoadBitmap(File.DirAssets, "small_logo.png"))
Activity.SetActivityResult(-1, In)
Activity.Finish Dim In As Intent
In = Activity.GetStartingIntent
Log(In)
If In.HasExtra("from_shortcut") AND In.GetExtra("from_shortcut") = True Then
Msgbox("Launched from shortcut", "")
End If
End Su