C cymorg Member Licensed User Longtime User Apr 12, 2012 #1 I updated to Android 4 and my B4A app that previously launched the APN settings intent started behaving differently. Code: Copy Sub SwitchAPN_Click Dim I As Intent I.Initialize("android.settings.APN_SETTINGS", "") StartActivity(I) End Sub Prior to the upgrade the code (above) worked perfectly. After the upgrade Android offered the user the option to pick one of two intents to change the APN settings. (The upgrade must have installed an additional intent rather than upgrading the existing one) Now my problem... I selected one of the 2 options and accidentally set it as the default intent for this operation. The option I selected as the default launches an intent that is empty. Now I can't set it back. So now I have a button that launches a screen that does nothing. Ughhh. My question... Is there any way to programatically reset the default intent used to launch the APN settings? Is there some other workaround? Thanks Android 4.0.3 on HTC Sensation z710e Last edited: Apr 12, 2012
I updated to Android 4 and my B4A app that previously launched the APN settings intent started behaving differently. Code: Copy Sub SwitchAPN_Click Dim I As Intent I.Initialize("android.settings.APN_SETTINGS", "") StartActivity(I) End Sub Prior to the upgrade the code (above) worked perfectly. After the upgrade Android offered the user the option to pick one of two intents to change the APN settings. (The upgrade must have installed an additional intent rather than upgrading the existing one) Now my problem... I selected one of the 2 options and accidentally set it as the default intent for this operation. The option I selected as the default launches an intent that is empty. Now I can't set it back. So now I have a button that launches a screen that does nothing. Ughhh. My question... Is there any way to programatically reset the default intent used to launch the APN settings? Is there some other workaround? Thanks Android 4.0.3 on HTC Sensation z710e
Erel B4X founder Staff member Licensed User Longtime User Apr 12, 2012 #2 You can call I.WrapAsIntentChooser. This will force the chooser dialog to appear. Upvote 0
C cymorg Member Licensed User Longtime User Apr 12, 2012 #3 Thanks Erel, that worked a treat. I still can't reset the default intent for APN settings but this workaround is good enough for me. Apps like "APN Backup & Restore" no longer work in Android 4 as Google have removed permission to write to the TelephonyProvider db. :-( Upvote 0
Thanks Erel, that worked a treat. I still can't reset the default intent for APN settings but this workaround is good enough for me. Apps like "APN Backup & Restore" no longer work in Android 4 as Google have removed permission to write to the TelephonyProvider db. :-(