This is for the Verizon LTE version of the Samsung Galaxy Nexus.
I am tasked with writing a tiny app that will effectively disable/enable 4G capability. This can be done manually via settings > mobile network > network mode and choosing either LTE/CDMA (4g enabled) or CDMA (3g only).
I have not tried anything yet because Android development isn't my strong suit. I am looking for guidance... examples, code samples etc. I am assuming this should almost be a one-liner, but it has been my experience that with Android development nothing is as simple as it appears.
I am exploring ConnectivityManager and setNetworkPreference but I'm not sure this will do what I need.
Any help will be greatly appreciated.
I don't know if this may help you at all or not...but there is an app called ANYCUT and u can make shortcuts of an activity..in example....instead of dialing *#*#4636#*#* for the phone info and for you to switch data from 4g to 3g....u can set up a shortcut with it also for network modes..instead of going to it .but I hope it helps in some way ....maybe not what you were looking for...but a toggle widget sure would be appreciated.
Sent from my Galaxy Nexus using xda premium
having attempted the same thing, i think you'll find toggling the 3g/4g is not trivial since after 2.2 they removed the ability to modify phone state.
I created a widget to shortcut to the settings (similar to a few that are out there already) am just polishing a few preferences.
jkhouw1 said:
having attempted the same thing, i think you'll find toggling the 3g/4g is not trivial since after 2.2 they removed the ability to modify phone state.
I created a widget to shortcut to the settings (similar to a few that are out there already) am just polishing a few preferences.
Click to expand...
Click to collapse
Ahhh, good to know. So in your opinion should I give up? I can go to my pm and explain that this is "essentially" not possible. Unless it *IS* "possible." What are your thoughts?
Not sure if this helps but Widgetsoid will already do this. Few of the widget functions do work (it's not fully supported on ICS) but it will toggle 4g or 3g on and off. The key is setting the Data Toggle option in its menus to 'Root Toggle'.
Magnus_CA said:
Not sure if this helps but Widgetsoid will already do this. Few of the widget functions do work (it's not fully supported on ICS) but it will toggle 4g or 3g on and off. The key is setting the Data Toggle option in its menus to 'Root Toggle'.
Click to expand...
Click to collapse
4G says experimental on the version downloaded from the devs website. Cant check it to enable the widget
TheDave1022 said:
4G says experimental on the version downloaded from the devs website. Cant check it to enable the widget
Click to expand...
Click to collapse
I believe that's to toggle between 3g/4g. The option to add it as a button to the widget is greyed out so that definitely doesn't work. However you can create a button that will toggle data off, whether you're using 3g or 4g.
A friend of mine created this widget a few days ago for me. The widget works for showing if lte is on or off. upon tapping the widget it takes you directly to the mobile network settings page effectively reducing the amount of time to toggle it.
he said the only way to make it actually work would be to have the app id be the same as the system id, it would have to be done via flashable zip and not just a simple apk.
*shrug*
rayfin said:
A friend of mine created this widget a few days ago for me. The widget works for showing if lte is on or off. upon tapping the widget it takes you directly to the mobile network settings page effectively reducing the amount of time to toggle it.
he said the only way to make it actually work would be to have the app id be the same as the system id, it would have to be done via flashable zip and not just a simple apk.
*shrug*
Click to expand...
Click to collapse
If you guys are going through that much trouble to turn data on and off you should try widgetsoid.
Magnus_CA said:
If you guys are going through that much trouble to turn data on and off you should try widgetsoid.
Click to expand...
Click to collapse
Magnus, when you have some time, can you do a write-up as to how to do this w/ widgetsoid? I can't seem to get it.
Magnus_CA said:
If you guys are going through that much trouble to turn data on and off you should try widgetsoid.
Click to expand...
Click to collapse
NexusMMM said:
Magnus, when you have some time, can you do a write-up as to how to do this w/ widgetsoid? I can't seem to get it.
Click to expand...
Click to collapse
I'm operating off memory because I don't have my phone in front of me...
Fist, make sure you installed widgetsoid2.x!! Also, he recommends a reboot after install. This may just be to get the widgets in your widget list. And of course, you must be rooted.
I dropped a widgetsoid widget to my homescreen and went into its configuration. The button you need to include is 'Enable/disable Data' (one arrow pointing up and one down). The other key is to choose 'Root Toggle' in global preferences. When you're done setting up your widget click apply.
That did it for me. Let me know if you're still having problems and I'll try and reply with my phone in front of me next time.
NexusMMM said:
Magnus, when you have some time, can you do a write-up as to how to do this w/ widgetsoid? I can't seem to get it.
Click to expand...
Click to collapse
i wouldn't get too excited... turning data ON/OFF and toggling between 4G/3G are separate controls, i haven't tried the data toggle yet (to see if it's a real toggle), but the Widgetsoid 4g/3g "toggle" definitely only opens the settings menu. still, Widgetsoid is so awesome that i purchased the donate version.
Related
I want to be able to turn off the Radio only so that when I'm Wire-Tethered to my PC and playing a game I don't get any calls or texts to slow down my connection or be disturbed.
I found a thread in general where someone advised using tasker but it's $6 and I just want to be able to disable radio only. Airplane mode kills everything.
Thanks in advance for any advice.
There has to be a way...
There might be a way to do it via dial pad commands. I know that I was able to do this on a Droid in the past. I'm looking into, but make no promises.
edit:
Ok, this is what I've come up with.
*#INFO*1111# - Testing mode
Go into Phone Info...
Scroll down to Set preferred network type:
CDMA only
This should make it so the only cellular connection would be a data connection.
For my phone WCDMA Preferred is the default, which should be what you want to go back to to allow phone calls again.
Let me know if that works for you?
There's an app I used when I was on Eclair called Widgetsoid. It was the ability to toggle pretty much anything u can think of on your phone. I havent installed it since upgrading to Froyo so I can't verify that it can do what you need but its free and probably worth the download in any case. Check it out and let me know.
dkechitkid said:
There's an app I used when I was on Eclair called Widgetsoid. It was the ability to toggle pretty much anything u can think of on your phone. I havent installed it since upgrading to Froyo so I can't verify that it can do what you need but its free and probably worth the download in any case. Check it out and let me know.
Click to expand...
Click to collapse
details of what this app can do are on the developer's website:
http://jaumard.android.free.fr/widgetsoid/
Doesn't list being able to disable text/voice while keeping data alive.
Thanks guys I'll check out both of those!
Sent from my SPH-D700 using XDA App
stevesprivateaccount said:
details of what this app can do are on the developer's website:
http://jaumard.android.free.fr/widgetsoid/
Doesn't list being able to disable text/voice while keeping data alive.
Click to expand...
Click to collapse
No it doesn't but I tried it anyway and found that no, it really doesn't. Thanks for trying though. I'm having a brainfart on typing letters into the dialer... how is that done again?
Sent from my SPH-D700 using XDA App
Just goto the phone dialer and type in those exact *,# and numbers (info is 4636)
once you put in the last # it will take you to the "testing" menu.
Let me know how it goes.
OK, I see it... will let you know how it works... Also, aren't our phones supposed to be set to CDMA? It had unknown and now it shows WCDMA. Isn't this the cause of the TWS bug?
stevesprivateaccount said:
Just goto the phone dialer and type in those exact *,# and numbers (info is 4636)
once you put in the last # it will take you to the "testing" menu.
Let me know how it goes.
Click to expand...
Click to collapse
It works great... Thanks!
Happy to help. I'm not sure exactly why it starts with WCDMA and then goes to unknown, haven't really looked into it too much.
DeeODoubleD said:
OK, I see it... will let you know how it works... Also, aren't our phones supposed to be set to CDMA? It had unknown and now it shows WCDMA. Isn't this the cause of the TWS bug?
Click to expand...
Click to collapse
It is the cause of the TWS bug. Our phones are constantly searching for a gsm signal never to be found. Causing battery drain. It has to do with the Galaxy S i9000 being gsm and samsungs poor ability to make changes to the coding.
Sent from my always stock, froyo Epic
This actually assisted in correcting or at least varifying another problem's solution. I've seen forum discussions point to PRL updates solving the TWS issue but other say it doesn't. However I installed sprintzone and let it install the PRL for my area. In doing so it set the default radio search shown using steve's info trick shown above. And no more TWS after reboots.
Woohoo!
Sent from my SPH-D700 using XDA Premium App
I picked a Verizon GNex at BB yesterday and have a couple questions...
First, I don't see where to turn GPS ON/OFF -- there has to be a way to turn it off and on -- right?
Second, after installing the apps I had with my Evo I attempted to purchase another app but the "Accept & Buy" button to complete the purchase would not work. I tried this with two different apps. Is Verizon trying to prevent use of the Google Market so they can have you go through there app market?
Thanks,
Brian
For the first question, settings-> location services
Sent from my Galaxy Nexus using XDA App
jstegeman said:
For the first question, settings-> location services
Sent from my Galaxy Nexus using XDA App
Click to expand...
Click to collapse
I saw that but it's not like any of those option clearly the GPS on/off. The three options:
Googles location service (lets apps use location data from wifi sources etc)
GPS satellites (lets apps pinpoint your location)
Location & Google search (lets Google use your location to improve search results)
OK, of the three the second one seems closest to what I'm looking for but there's nothing here that clearly says it turns the GPS on/off.
Brian
It does turn it off
Sent from my Galaxy Nexus using XDA App
come on man, isn't it odvious that is this option? "GPS satellites"
Kikoshi said:
come on man, isn't it odvious that is this option? "GPS satellites"
Click to expand...
Click to collapse
Actually no! As I said, it's the most likely option but no where does it say that the GPS radio is turned off it just says that is "lets apps pin point your location". Everyone wants to know where you are at all times so they make it more difficult for you to turn off location finding tools because they want you to leave it on.
So, Google may allow you to disable GPS access for third party apps but still permit them (Google) to know exactly where you are because that information is money. If disabling this option stopped third party apps from accessing the GPS but still left the GPS on so Google could keep tracking you the wording of the option gives them the legal latitude to do just that.
So, in addition to wanting to save battery life it's nice to also limit the amount of tracking Google, and pretty much everyone else, does to you.
My Evo 4G had a widget that controlled: 4G (WiMax), BlueTooth, GPS and Wifi -- I would like that on my Nexus.
Brian
It's pretty obvious to me that that option actually does turn off the GPS antenna. It I don't think that there's any device in the world with a GPS antenna that cannot be turned off, unless it's part of the core functionality (e.g. with GPS receivers).
Put the power control widget on one of your homescreens - the middle one is GPS and you can quickly toggle it.
TabsAZ said:
Put the power control widget on one of your homescreens - the middle one is GPS and you can quickly toggle it.
Click to expand...
Click to collapse
Thanks man, that's what I was looking for!
Brian
Raptor1956 said:
Thanks man, that's what I was looking for!
Brian
Click to expand...
Click to collapse
All the toggle in that widget does is turn "option 2" on and off. There is no 4G LTE toggle either. Also, no Verizon isn't blocking the market to force you to use theirs. They don't even have a separate app market.
Sent from my Galaxy Nexus using xda premium
joshnichols189 said:
All the toggle in that widget does is turn "option 2" on and off. There is no 4G LTE toggle either. Also, no Verizon isn't blocking the market to force you to use theirs. They don't even have a separate app market.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Yep, after toggling I checked back and option 2 was turned off. It was the most likely option but I wish the wording was more explicit...
I also found that the market problem was somehow related to the fact that I'd added a second gmail account. I had to select the second account and enter my CC info there and after that the market worked just fine.
Brian
Raptor1956 said:
Second, after installing the apps I had with my Evo I attempted to purchase another app but the "Accept & Buy" button to complete the purchase would not work. I tried this with two different apps. Is Verizon trying to prevent use of the Google Market so they can have you go through there app market?
Click to expand...
Click to collapse
Yes Verizon only wants you to use their 20 or so apps. Enjoy!
Sent from my Galaxy Nexus using xda premium
Anyone have a work around to make the Verizon WiFi Auto-On app work? I have a VZW Galaxy Nexus, but I get an error when opening the app that states the app is only for VZW customers.
https://market.android.com/details?id=com.vzw.wificonnect
I dont think it supports ICS. I use Llama to do my home/work/away settings. Very good app been using it since I got an android phone.
I have been trying the Verizon Wifi app as well.
I gave up.
I kept looking and found Auto Wifi Enabler that seems to work on pretty much the same premise at Verizon's app - it turns your wifi on and off based on location and saved networks.
I'm not sure what happened but it isn't showing up in the Market or my App List but it is on my phone right now. Very strange.
VinceT3 said:
I dont think it supports ICS. I use Llama to do my home/work/away settings. Very good app been using it since I got an android phone.
Click to expand...
Click to collapse
Started using Llama with an auto wifi off app, and it is really helping my battery lots. This also adds peace of mind for ringers and other issues...
Agreed on Llama. Downloaded it to use for Wifi on/off at home and have since found a wide variety of uses for it including disabling screen timeout and adjusting brightness while charging vs. running on battery, automatic ringtone/volume adjustment based on locations and time of day, etc.
It uses cell towers to determine your location (not GPS) and doesn't appear to add much to battery drain. If anything, the automatic Wifi and screen brightness/timeout rules do more to conserve battery than the program would add in overhead.
gadzooks64 said:
I have been trying the Verizon Wifi app as well.
I gave up.
I kept looking and found Auto Wifi Enabler that seems to work on pretty much the same premise at Verizon's app - it turns your wifi on and off based on location and saved networks.
I'm not sure what happened but it isn't showing up in the Market or my App List but it is on my phone right now. Very strange.
Click to expand...
Click to collapse
Cannot find this app, that's the exact name?
circsmonky said:
Cannot find this app, that's the exact name?
Click to expand...
Click to collapse
The VZW app is linked in the OP. Auto Wifi Enabler does not seem to be in the market any longer.
Is there a way to setup the phone so it will only use your home wifi when it is available? I don't want to manually have to change this all the time. I want it to use my home network when it can connect to it. If it can't then use 4g. Anyone?
anaylor01 said:
Is there a way to setup the phone so it will only use your home wifi when it is available? I don't want to manually have to change this all the time. I want it to use my home network when it can connect to it. If it can't then use 4g. Anyone?
Click to expand...
Click to collapse
In cyanogen there are profiles you can set.
But if you're stock there are third party apps that you can use. I believe they even track your location to know if you're home or not.
Or just leave WiFi on all the time and it will connect when in range. But might kill your battery quicker since it will be scanning constantly
Sent from my SGH-T999 using Tapatalk 2
Thanks for your response. How do you give someone a thank you or whatever its called? Someone flipped me **** because I hadnt given any. I dont know how.
I use LLama ---> https://play.google.com/store/apps/...t#?t=W251bGwsMSwxLDEsImNvbS5rZWJhYi5MbGFtYSJd
My wife uses [email protected] ---> https://play.google.com/store/apps/...wsMSwyLDEsImNvbS5hZWJlaW5yb3RoLndpZmlob21lIl0.
They both work. LLama does so much more than what you desire and [email protected] only does what you want.
anaylor01 said:
Thanks for your response. How do you give someone a thank you or whatever its called? Someone flipped me **** because I hadnt given any. I dont know how.
Click to expand...
Click to collapse
Click the thanks button on the left side under the name and post count. If you're on the xda app just click the post.
I'm pretty sure the phone will only connect to a network when you tell it to so you can just leave wifi on. From my experience wifi didn't really use that much more power. It'll just connect automatically within range.
Additionally, there's ways to change the scan interval times so it doesn't check constantly.
If you wanna impress some folks buy some Nfc tags and set them up.
Sent from my SGH-T999
Is there any way to get a hotspot toggle widget to work on the AT&T optimus G pro?
I do have a plan that allows tethering and my phone is rooted, however the toggle widget that worked fine on my note fails to initialize the hotspot on this phone (though it will disable it).
nope. Had my question up for a few days with no good responses. Hotspot might grab someone easier than WAP though so who knows.
shiltz said:
Is there any way to get a hotspot toggle widget to work on the AT&T optimus G pro?
I do have a plan that allows tethering and my phone is rooted, however the toggle widget that worked fine on my note fails to initialize the hotspot on this phone (though it will disable it).
Click to expand...
Click to collapse
Try power toggles.
Sent from my LG-E980 using xda app-developers app
Jammol said:
Try power toggles.
Sent from my LG-E980 using xda app-developers app
Click to expand...
Click to collapse
No luck, I get the same error as I did with hotspot toggle which is what I normally use.
The specific error is a white triangle with a red exclamation point which says "Tethering Failed Tethering is not allowed for downloaded apps"
HD widgets has a widget u can assign to anything but i havent seen one that turns it on or off in one click, only ever takes u to the hotspot settings so u can turn it on or off
vinniemac84 said:
HD widgets has a widget u can assign to anything but i havent seen one that turns it on or off in one click, only ever takes u to the hotspot settings so u can turn it on or off
Click to expand...
Click to collapse
That's what I have at the moment, though you don't need any app to do that, you just add a shortcut, shortcut > settings shortcut > mobile hotspot, but it's a pain having to do 2 steps for what should only take one.
Is there any root method to disable the at&t tethering plan check? I'm betting that's the only thing that's causing it to not work and if I can disable that check it should work fine.
Isn't that what the existing fix does? Eliminate the check?
http://forum.xda-developers.com/showthread.php?t=2283615
jeffhesser said:
Isn't that what the existing fix does? Eliminate the check?
http://forum.xda-developers.com/showthread.php?t=2283615
Click to expand...
Click to collapse
Ooh, I'll try that out and hopefully I can use the toggle afterwards. It's so annoying that they have it set up that you need to have a rooted phone and change setting just to use a toggle for something I pay for.
That fix is meant to allow tethering without paying for it (which is what I've done) but even after that change I have not found a way to toggle that setting directly. One of those things that may never change without a new ROM....
jeffhesser said:
That fix is meant to allow tethering without paying for it (which is what I've done) but even after that change I have not found a way to toggle that setting directly. One of those things that may never change without a new ROM....
Click to expand...
Click to collapse
Damn, well that sucks, I guess I won't bother doing that then.