How to set mobile network mode?

galimpic

Member
Licensed User
Longtime User
There is GetNetworkType, but I cannot find a way to set what can be manually set in Settings/Wireless&Network/Mobile Networks/Network mode (GSM, WCDMA). If it cannot be set directly, what is the way to programatically have that menu item (or the nearest possible up the ladder) opened for the user?
 

AscySoft

Active Member
Licensed User
Longtime User
You can use this code:
B4X:
   Dim i As Intent
   i.Initialize(i.ACTION_MAIN, "")
   i.SetComponent("com.android.phone/.Settings")
   StartActivity(i)

it appears that from android 2.3 is no longer possible to programmatically enable/disable mobile data :BangHead:. So the above code is the closest solution to this, the user has to manually enable.disable...
 
Upvote 0
Top