Kevin Well-Known Member Licensed User Longtime User Apr 29, 2012 #1 I've always used the wireless bridge to install and run my apps. For some reason I suddenly don't have the option to "open" after installing. The button is dimmed/disabled. I recently added shortcut support to my app (shortcuts can be created on the home screen to do specific things in my app). Could this cause this? Has anyone else ever seen this? If I connected wired using the USB ADB connection, the app launches after installing (as expected).
I've always used the wireless bridge to install and run my apps. For some reason I suddenly don't have the option to "open" after installing. The button is dimmed/disabled. I recently added shortcut support to my app (shortcuts can be created on the home screen to do specific things in my app). Could this cause this? Has anyone else ever seen this? If I connected wired using the USB ADB connection, the app launches after installing (as expected).
Kevin Well-Known Member Licensed User Longtime User Apr 30, 2012 #2 :BangHead: Turns out it is related to my adding support for shortcuts. If I remove the following from the manifest editor, it works as normal. I've noticed a bigger problem though.... when I create a shortcut to the main app (Applications list in Android) it creates a shortcut but it doesn't do anything. So obviously this will not work since users would be unable to create a shortcut / launcher for the main app. Code: Copy AddActivityText(ShortcutExec, <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter>) Upvote 0
:BangHead: Turns out it is related to my adding support for shortcuts. If I remove the following from the manifest editor, it works as normal. I've noticed a bigger problem though.... when I create a shortcut to the main app (Applications list in Android) it creates a shortcut but it doesn't do anything. So obviously this will not work since users would be unable to create a shortcut / launcher for the main app. Code: Copy AddActivityText(ShortcutExec, <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter>)
Kevin Well-Known Member Licensed User Longtime User Apr 30, 2012 #3 Just as an update in case someone else has this problem, my mistake was that I didn't realize that by telling Android about my new shortcut activity in the manifest, apparently it always wants to launch my app using that activity, essentially ignoring the fact that I also have the MAIN activity set as a launch activity (by default). Fixing it was a matter of checking to see if it was launched with a shortcut and if not, start the main activity as in the shortcut tutorial. The problem was that a normal Application shortcut was launching the shortcut activity but it was doing nothing because there was no shortcut data to process. Code: Copy If in.HasExtra("from_shortcut") = False Then Activity.Finish StartActivity (Main) End If Still though, I do have the problem where when I install it using the wireless bridge app in B4A, I don't have the Open option. This isn't a big deal for me, but I wonder what will happen when I publish my update. Will people who download it see a dimmed out Open button? If so, I fear they will start to complain that they can't open my app. Last edited: Apr 30, 2012 Upvote 0
Just as an update in case someone else has this problem, my mistake was that I didn't realize that by telling Android about my new shortcut activity in the manifest, apparently it always wants to launch my app using that activity, essentially ignoring the fact that I also have the MAIN activity set as a launch activity (by default). Fixing it was a matter of checking to see if it was launched with a shortcut and if not, start the main activity as in the shortcut tutorial. The problem was that a normal Application shortcut was launching the shortcut activity but it was doing nothing because there was no shortcut data to process. Code: Copy If in.HasExtra("from_shortcut") = False Then Activity.Finish StartActivity (Main) End If Still though, I do have the problem where when I install it using the wireless bridge app in B4A, I don't have the Open option. This isn't a big deal for me, but I wonder what will happen when I publish my update. Will people who download it see a dimmed out Open button? If so, I fear they will start to complain that they can't open my app.