APN and Android 4

cymorg

Member
Licensed User
Longtime User
I updated to Android 4 and my B4A app that previously launched the APN settings intent started behaving differently.

B4X:
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:

cymorg

Member
Licensed User
Longtime User
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…