Disable mobile network programmatically - Android Software Development

Hey There,
I'm about to write an app for android 2.3 which should be able to disable the Mobile network.
I found a solution which works on 2.2, but it uses the permission "android.permission.MODIFY_PHONE_STATE" which isn't available anymore on 2.3.
So is there another possibility to change this setting?
thx for answers and greez Visosilver

maybe this would help ?
http://developer.android.com/guide/topics/manifest/uses-feature-element.html

Hmmm, i tried
<uses-feature android:name="android.hardware.telephony" android:required="false" />, but it always says that the MODIFY_PHONE_STATE permission is missing...

I would like to know this aswell, for my Galaxy tab. I flashed overcome and didn't flash my T-Mobile modem and it says I'm not connected to any network in anyway but am still getting the cell standby eating battery. And even with airplane mode it still shows up.
Sent from my GT-P1000 using XDA Premium App

9812813 said:
Pitbull -- > Add this to the Tweak guide
To disable the GSM Radio -
Bring up your dialer program,
enter *#*#4636#*#*
Select Device Information,
Scroll to bottom
Tap the "Turn Off Radio"
This will disable all Cell / GSM / EDGE connections -- Should only be used for those who do not subscribe to a data / cell package.
Click to expand...
Click to collapse
This was just posted by 9812813 in the overcome Rom thread.
Sent from my GT-P1000 using XDA Premium App

thx for your responses, but the point is, that i must disable the connection programmatically...

Did you use ITelephony.setRadio(boolean turnOn)?

Related

I found a way to force the OTA update.

I have searched around and I couldn't find anyone that has mentioned this before. If you really want the JI6 and don't want to use Kies and when you hit the "software update button" it shows "no firmware" I found a way to force it.
*****JI6 bricks a lot of phones. rooted or unrooted... so be careful! I would unroot and remove any lagfixes just to be safe. If you're phone gets bricked it is not because of this method. it is because JI6 has issues. if you do get bricked... check out this thread: forum.xda-developers [dot] com/showthread.php?p=8522603#post8522603****
**DUMMY PROOF INSTRUCTIONS!**
If you already have launcher pro:
1) goto your homescreen.
2) menu key, add.
3) hit shortcuts and then activities.
4) scroll down to device management
5) select "com.wssyncmldm.wssAppDmUiMain" and hit ok
6) this will put a shortcut on your homescreen that will say device management with blue and red arrows.
7) open that shortcut up and hit software update.
if you don't have launcher pro or don't know what it is.
1) goto the market.
2) search "Launcher Pro" or "Federico Carnales"
3) look for a yellow icon with a house on it.
4) install that.
5) once installed hit your homekey. select launcherpro but don't select use as default until you fall in love with launcherpro ;]
6) then, follow the steps above
Wao...thanks
Wating for froyo now
Sent from my SGH-T959 using Tapatalk
Is this for all countries or just the current?
I'm pretty sure its just for the states.
however i was messing around in the settings of that shortcut... and it apears that you can mess with the DM server connection settings and you can mess with a bunch of stuff... so maybe if you change the APN to whatever carrier you are using it would work??
Try it. follow my steps above. goto settings then DM connection settings and edit the network profile apn settings.
connnn said:
I'm pretty sure its just for the states.
however i was messing around in the settings of that shortcut... and it apears that you can mess with the DM server connection settings and you can mess with a bunch of stuff... so maybe if you change the APN to whatever carrier you are using it would work??
Try it. follow my steps above. goto settings then DM connection settings and edit the network profile apn settings.
Click to expand...
Click to collapse
thanks for the tip/trick
Any confirmation on this trick? If it works, nice find!
(Go post it on the TMO site )
I tried this on my vibrant and it tels me there is no update available. I have followed the instructions to a T, so I am wondering if anyone has had trouble getting this to work?
Sent from my SGH-T959 using XDA App
Gigamaster89 said:
Any confirmation on this trick? If it works, nice find!
(Go post it on the TMO site )
Click to expand...
Click to collapse
It works :]
This might lead to other cool stuff down the road as well... there are some really cool settings in that shortcut. you can change it to "lab" and "production" profile... so maybe we can get a leaked froyo a little early??
EDIT:::
holiday5804 said:
I tried this on my vibrant and it tels me there is no update available. I have followed the instructions to a T, so I am wondering if anyone has had trouble getting this to work?
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
Maybe I spoke too soon?
It worked for me on my phone and my stores demo vibrant... any body else try it?
Must be doing something wrong. I went to device management but don't understand the part with com.wssyncmldm.wssappdmuimain
Where does this go???
Someone please help!!!
Sent from my SGH-T959 using XDA App
yes!!!!!!!! I got the Update and good to go now. It took more than one try. Just keep trying to get the Update. Make sure you have 3G. It seemed to work when i had 3G
malone972 said:
Must be doing something wrong. I went to device management but don't understand the part with com.wssyncmldm.wssappdmuimain
Where does this go???
Someone please help!!!
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
Same thing here! I am completely new on this.
What's launcher pro? I have the American Vibrant but I am using in Germany. Would it work?
This worked for me. Good post. Downloaded Launcher Pro from the market (Free), and then followed these directions. Immediately my 3G arrows were working overtime, and withing 3min I had the OTA available message.
malone972 said:
Must be doing something wrong. I went to device management but don't understand the part with com.wssyncmldm.wssappdmuimain
Where does this go???
Someone please help!!!
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
the wssappdmuimain is the first shortcut. Just select it and say ok. It should place a shortcut on your home screen that says device management with a blue and red arrow. Then open that shortcut and hit software update.
Maybe in blind but where is the activities shortcut?
Sent from my SGH-T959 using XDA App
jtc442 said:
Maybe in blind but where is the activities shortcut?
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
check the original post. just update the steps. haha
connnn said:
check the original post. just update the steps. haha
Click to expand...
Click to collapse
Cool, thanks!
Sent from my SGH-T959 using XDA App
Followed intructions to the T. I would suggest doing it over WIFI.
I click on the shortcut and received the update in less than 2 mins.
Installation over WIFI took 4 mins. Hung at the S screen for 3 mins.
Kept all setting and apps, everything works. GPS locked onto 8 out of 12 sats in less than 10 seconds.
3g signal is increased, wifi signal seems to be increased as well..
Awsome find.........
New to all this.
But Just tried it can't find device management in the list.
???
Sent from my HTC Desire using XDA App
android662 said:
New to all this.
But Just tried it can't find device management in the list.
???
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
The list is alphabetical... so... yeah. right under Daily briefing and DataCreate...
are you in the launcherpro activities list?
Well didnt work for me . I hit software update... the same arrow appear on the top of my phone but they disappeared like in 3 secs! Nothing happened afterwards.
As I have said, does anyone has idea if this would work being overseas? I have the American version, because I bought in NY on Craiglist... But right now I am in Germany.
Coniglio said:
Well didnt work for me . I hit software update... the same arrow appear on the top of my phone but they disappeared like in 3 secs! Nothing happened afterwards.
As I have said, does anyone has idea if this would work being overseas? I have the American version, because I bought in NY on Craiglist... But right now I am in Germany.
Click to expand...
Click to collapse
Try this. homescreen > menu key > settings > wireless and network > mobile networks > access point names
What does it say? whatever is selected and if your data is working... write down that APN.
THEN. if you still have the device management shortcut on your homescreen. go into that. select settings then network profile then for the APN change it to whatever you are currently using for your german carrier.
let me know if this works. if it does not and you need to revert the settings the tmobile apn is: epc.tmobile.com

Switching from 3g to 2g...question for devs

Hey guys,
I work in an area where my 3g signal is really weak and cuts in and out. This really effects my battery quite a bit. However I have been using that # *#* number to get into the phone settings and change the setting to cdma only which seems to put my phone in 2g mode (is that true?)..and thn back to automatic to get 3g back. My question is is it possible for some of you to develop an app or a widget which could do this with a single click?
Thank you
Sent from my DROIDX using XDA App
Couldnt you do that with power widget plus? I do something similar since I'll in a bad area as well except I use it to reset my data connection so to speak.
Sent from my DROIDX
Well I have extended controls installed all I can do with that is turn off data completely..from what I gather none of the power widgets support cdma devices when switching between 2 and 3 g
Sent from my DROIDX using XDA App
You don't want to go 1x. The data rate is pitiful at 153 Kbps max.
I just use Bettercut and make a data manager shortcut and just turn off manually the internet saves more battery than 1x connection
mdhaliwal said:
Hey guys,
I work in an area where my 3g signal is really weak and cuts in and out. This really effects my battery quite a bit. However I have been using that # *#* number to get into the phone settings and change the setting to cdma only which seems to put my phone in 2g mode (is that true?)..and thn back to automatic to get 3g back. My question is is it possible for some of you to develop an app or a widget which could do this with a single click?
Thank you
Sent from my DROIDX using XDA App
Click to expand...
Click to collapse
There is an app on the market, called Network which takes you to that menu with the push of a button. No need to enter in all those #*#*#*##* digits
Another way is to use AnyCut to set a shortcut to the field test menu where all of those settings are available.
Thanks
Sent from my DROIDX using XDA App
What is the full name of the app? There are multiple apps named "network"
Sent from my DROIDX using XDA App
If I turn my Data off can I still get texts?
Ubermicro13 said:
If I turn my Data off can I still get texts?
Click to expand...
Click to collapse
yea, data is internet
Thank you for the very quick response

GSM/UMTS settings in android 2.3.4

can anyone help? Im currently running android 2.3.4 (CyanogenMod7.1) in dual boot.
I need to know how to access the gsm/umts band settings. I regularly get a 3g/H on my status bar when at home using windows 6.5 but struggle to get anything beter than 'edge' using android. are these settings available on this mod? if so can someone point them out to me please. If not is there an android build available that has this option?
many thanks
they're available, go to wireless and networks -> mobile network ( or something like that) and you'll see an option for 2g/3g
Sent from my NexusHD2 using xda premium
Are you looking for the way to reset your phone for GSM, CDMA coverage? Here is the link to a post to do that: http://forum.xda-developers.com/showpost.php?p=9295533&postcount=2
oreosx12345 said:
they're available, go to wireless and networks -> mobile network ( or something like that) and you'll see an option for 2g/3g
Sent from my NexusHD2 using xda premium
Click to expand...
Click to collapse
yea i have something like that. its a use 2g only option to save battery. that's unchecked. there are no other options and the secret code doesn't work either.
Maybe try switching to another rom?
When i was on Typhoon's CM7, i had the option.
Sent from my NexusHD2 using xda premium

Network Mode menu

Hello devs and modders, this http://samsung-updates.com/details/16850/Galaxy_Note_3_Snapdragon/SM-N9005/ZVV/N9005VJUDMJ6.html rom (ZVV, from Brazil) has an option in the Network mode that I like very much to have, LTE ONLY, so I can tether my notebook for gaming when not in home, I know the side effects of this mode and I know I can access a hidden menu to change to that mode [takes too many steps tough], but I would like to have that menu option on other roms or even better any rom with a mod of any kind.
So can someone help me with that?
Cheers
Just edit /data/property/persist.radio.lteon and change it to true (and reboot).
Sent from my SM-N9005 using Tapatalk
s1m4an said:
Just edit /data/property/persist.radio.lteon and change it to true (and reboot).
Sent from my SM-N9005 using Tapatalk
Click to expand...
Click to collapse
Mine already says true, but it doesn't show the option on the menu. Any idea?
BTW I am running the BTU-N9005XXUDMK2 rom.
No one?
nanias said:
Mine already says true, but it doesn't show the option on the menu. Any idea?
BTW I am running the BTU-N9005XXUDMK2 rom.
Click to expand...
Click to collapse
If that is the case it's possible that the SIM card hasn't been updated, or the network provider isn't transmitting any LTE bands?
In my case, the provider is just starting to test 4G networks and I had to change the property and ask for a newer sim card (not sure if that is the case, but I did read somewhere that it might help).
Sent from my SM-N9005 using Tapatalk

Any way to choose 2G only on the G2?

I don't have that option available on settings.
I have automatic 2G/3G/4G, automatic 2G/3G and 3G only.
Thanks.
Press *#*#4636#*#* in your dialer, go to phone information and change it from there if you can't change it in settings.
lowjinyik said:
Press *#*#4636#*#* in your dialer, go to phone information and change it from there if you can't change it in settings.
Click to expand...
Click to collapse
Tried that but I get a message saying this option/application is not available on this phone.
Is it because my G2 is carrier branded?
Would a unbranded stock rom fix this and let me change it?
Try this: https://play.google.com/store/apps/details?id=myc.phone.PhoneInfo It does the same thing as the code.
That?
Sent from my LG-D800 using XDA Free mobile app
No idea man, sorry
diamond12 said:
Try this: https://play.google.com/store/apps/details?id=myc.phone.PhoneInfo It does the same thing as the code.
Click to expand...
Click to collapse
Thanks, but link is broken. I don't see anything.
tang097 said:
That?
Sent from my LG-D800 using XDA Free mobile app
Click to expand...
Click to collapse
How did you do that? How can I enable that option?
I guess it was deleted but still shows up for me since I already have it installed. The developer has 2 more versions, this one seems to be ad supported: https://play.google.com/store/apps/details?id=tw.myc.android.PhoneInfoV2Ad
I guess this option might be available if I flash and try other custom roms or kdz from other regions.
lowjinyik said:
Press *#*#4636#*#* in your dialer, go to phone information and change it from there if you can't change it in settings.
Click to expand...
Click to collapse
I'm able to enter the menu now.
Where exactly is the option to enable 2G only?
There's a lot of options.
Have you tried using the intelli3g xposed module?
http://forum.xda-developers.com/showthread.php?t=2580234
Sent from my LG-D802 using Tapatalk
I found a way, but cell signal isn't great still.
I read that the antenna is located on the bottom right side of the phone and it's like the antennagate of the iPhone 4. I think they're right.

Categories

Resources