2g/3g switch
Moderator: Martin
2g/3g switch
There's setting called "enable 2g only to save battery" could be nice to be able to switch this network setting with your app.
Re: 2g/3g switch
Me Too.
I would like to be able to toggle each data network type based on a trigger or condition.
Example: When YouTube (or other data heavy app) is not active turn off 3G and 4G to save battery. When YouTube is opened, turn 4G back on.
I would like to be able to toggle each data network type based on a trigger or condition.
Example: When YouTube (or other data heavy app) is not active turn off 3G and 4G to save battery. When YouTube is opened, turn 4G back on.
Re: 2g/3g switch
Android does not provide an API to switch the 2G/3G settings on a regular Android ROM. Cyanogenmod seems to support such an API and it's on my list of features under consideration for a future release.
Re: 2g/3g switch
Please consider to raise its priority as i think many people look into this kind of programs just trying to improve battery life and this is a basic feature as switching to 2G when no internet is needed (only for notifications/messages) is a huge improvement. By the way im not usig cyanogen mod but paranoid android so the way it work in one may not work in the other but... who knows . May be you can start asking in XDA forums if there is an easy way to do this in the more common ROM's (not trying to tell you how to do your work, just an idea)
Re: 2g/3g switch
If you have a rooted device you can try to switch 2g/3g on modified ROMs with following action (use at your own risk):
switch to 2g: Execute Root Command: am broadcast -a com.android.internal.telephony.MODIFY_NETWORK_MODE --ei networkMode 1
switch to 3g+2g: Execute Root Command: am broadcast -a com.android.internal.telephony.MODIFY_NETWORK_MODE --ei networkMode 0
on some other ROMs:
switch to 2g: Execute Root Command: am broadcast -a com.android.phone.CHANGE_NETWORK_MODE --ei networkMode 1
switch to 3g+2g: Execute Root Command: am broadcast -a com.android.phone.CHANGE_NETWORK_MODE --ei networkMode 0
Following values for networkMode seem to exist (but can vary depending on ROM, manufacturer etc.):
switch to 2g: Execute Root Command: am broadcast -a com.android.internal.telephony.MODIFY_NETWORK_MODE --ei networkMode 1
switch to 3g+2g: Execute Root Command: am broadcast -a com.android.internal.telephony.MODIFY_NETWORK_MODE --ei networkMode 0
on some other ROMs:
switch to 2g: Execute Root Command: am broadcast -a com.android.phone.CHANGE_NETWORK_MODE --ei networkMode 1
switch to 3g+2g: Execute Root Command: am broadcast -a com.android.phone.CHANGE_NETWORK_MODE --ei networkMode 0
Following values for networkMode seem to exist (but can vary depending on ROM, manufacturer etc.):
- 0: WCDMA preferred
- 1: GSM only
- 2: WCDMA only
- 3: GSM auto (PRL)
- 3: CDMA auto (PRL)
- 4: CDMA only
- 5: EvDo only
- 6: GSM/CDMA auto (PRL)
- 7: LTE/CDMA auto (PRL)
- 8: LTE/GSM auto (PRL)
- 9: LTE/GSM/CDMA auto (PRL)
- 10: LTE only
Re: 2g/3g switch
Great thanks. Im out for some days but will test and post you the results asap
Re: 2g/3g switch
I have also added a new action to the EAP-version.
The new action does not require root but a modified ROM (like CyanogenMod) since stock Android does not allow to switch this setting by third party apps.
The new action does not require root but a modified ROM (like CyanogenMod) since stock Android does not allow to switch this setting by third party apps.
Re: 2g/3g switch
Awesome. Thanks again just came to post a quick and successful test with the root commands and you have done it by the way the new action is also working on my n4 with paranoidandroid
Thanks again and keep up the good work
Thanks again and keep up the good work
Re: 2g/3g switch
Hi Martin,
I have tested this on my CyanogenMod 10.1 and it's working perfectly.
Thanks.
I have tested this on my CyanogenMod 10.1 and it's working perfectly.
Thanks.
Samsung Galaxy Note 8
Android 9.
Non-rooted
Android 9.
Non-rooted