[Q] App Dev Question - Nexus S Q&A, Help & Troubleshooting

I have a question and I was wondering if you guys can help me out.
I'm working on app and I need to either force downgrade to a 2g connection or restore their settings back to 3g.
How can I programatically change their data connection setting?
There are apps out there that perform actions like this. I believe Juice Defender does something where the connection is downgraded to 2g if the phone enters sleep mode. So I know its possible.
Any help is appreciated. Thanks.

Related

data connection

I just installed a new rom, now I cannot get the phone to keep a data connection. Can someone tell me how to reset this so that I can get data?
First off, did you get a ROM for your carrier? Sprint provisioned ROM's won't work on VZW and vice versa...
Next, did you manually turn on the data connection after reboot? Sometimes when I turn on my TP2 it takes a minute to show the data connection on indicator in the comm manager - so, when I 'turn it on' its actually turning it off.
Lastly, a bit more info about the ROM you are running will help people diagnose the issue much more quickly - so if you can share which one you are using, someone might be able to help faster.
Yeah, that was a noob post...sorry. I flashed Nag Rom 23518 v1.03 for my TP2. Thanx for the advice, as I did get the problem solved. As I said..I am a noob to this.

[Q] Wifi sleep policy set to never yet my wifi turns off...

Hi,
I recently bought a captivate from Rogers but use it with fido (same network anyway). I got it rooted and lag fixed (OCLF). I have set the wifi sleep policy to "never" under the advanced menu... yet when my phone screen turns off for a long period (more then 10 minutes, but don't know exactly how long), the wifi turns off and data takes over. Don't know if this is related, but i have installed Juicedefender to control the data.
I searched the internet and different forums, and they all have a solution for the wifi turning off problem: wich is to set the sleep policy to never... well my sleep policy is set to never and it doesn't do it for me...
is this a known issue? is there another app that can interfere with this option...
I called samsung and they want me to do a phone reset... before doing it I want to check with the real expert, for a better solution
Can anyone help please?
Thanks
Disable or uninstall juice defender and any programs that can modify your wifi status, one of the might be overriding your sleep policy.
I tried disabling juicedefender but it still had the same issue...
I will try uninstalling and will let you know
Thanks
Uninstalling Juicedenfender didn't help... same problem
Other potential apps causing this problem:
sipdroid, 3g watchdog but don't think so...
kam777 said:
I tried disabling juicedefender but it still had the same issue...
I will try uninstalling and will let you know
Thanks
Uninstalling Juicedenfender didn't help... same problem
Other potential apps causing this problem:
sipdroid, 3g watchdog but don't think so...
Click to expand...
Click to collapse
I know sipdroid changes the sleep policy.
Sent from my Captivate
Thanks! it was sipdroid, one of the wifi option was on (to improve life battery)...

tethering: keeping packet data alive

Hi all,
I recently update my SGS2 to litening rom 2.1. I am using the tethering function and would like to know how to prevent the packet data connection to get cut when the screen is switched off.
Thankful for any help!
Aaron
One solution would be to use my app "Wake Lock" to get a partial wakelock, which will keep the cpu on, while the screen is off and thus the data connection available.
Your ROM might also feature a setting to achieve this.

[Q] Unable to switch from 3G to 2G while display is off

Hi,
I'm having a problem switching to 2G when the display is off.
What I expect to happen:
<display switches off>
- 3G is turned off
- 2G is turned on
<display switches back on>
- 2G is turned off
- 3G is turned on
What actually happens:
<display switches off>
- 3G is turned off
<display switches back on>
- 2G is turned on
- 2G is turned off
- 3G is turned on
So it looks like Android somehow can't switch on 2G while the display is off, and delays this until the moment the display comes on again.
As a result the phone is entirely off-line while the display is off.
I tried this first using Tasker and thought Tasker was to blame, but then I tried the 2G Toggle app (https://play.google.com/store/apps/details?id=it.abiondo.app.gautotoggle) and it had exactly the same problem.
So unless this app was created with the Tasker App Factory, the problem doesn't seem to be Tasker related.
Can anyone help me out here?
Device:
HTC One S, rooted, s-on and running CM10. No further mods, no custom kernel.
Thanks.
I'm glad I'm not the only one.
I'm on the stock, rooted, ICS rom and I use the Toggle2G app.
If the same happens on CM, it means it must be something low level and not related to Sense.
Edit: I use Llama instead of tasker, but it's the same.
nor-ric said:
I'm glad I'm not the only one.
I'm on the stock, rooted, ICS rom and I use the Toggle2G app.
If the same happens on CM, it means it must be something low level and not related to Sense.
Edit: I use Llama instead of tasker, but it's the same.
Click to expand...
Click to collapse
The strange thing is that loads of people are able to do this, so I wonder whether it's a setting or an app that somehow sabotages this
I've tried on a freshly factory resetted rom, so I would exclude any app interference and any particular setting.
One idea: if we set the event in tasker/Llama so that it not only toggles from 3g to 2g but it also switches off the mobile data connection, and then another event to switch the data connection back on after a few seconds?
nor-ric said:
One idea: if we set the event in tasker/Llama so that it not only toggles from 3g to 2g but it also switches off the mobile data connection, and then another event to switch the data connection back on after a few seconds?
Click to expand...
Click to collapse
Alas, that too doesn't make a difference. I tried two scenarios for the screen-off event:
Mobile data off -> wait 1 minute -> set 2G only -> mobile data on
and
Set 2G only -> mobile data off -> wait 1 minute -> mobile data on
The 2G-only bit is still delayed to the moment the screen comes on again.
But the weird thing is: it worked once, and only once, using the first scenario. How about that? So you must be on to something, but we must be missing something.
I had only tried the second scenario and it didn't work for me either.
About the time it worked for you: could it be a wakelock matter? What if you put a partial wakelock (= cpu wakelock) in the event's actions? If I remember correctly, you can do that with Secure Settings.
I think the problem is CM.. maybe is the annoying connection drop issue! Until now there is no fix for that, someone resolved by flashing newer nightlies, or changing scripts, or flashing radios, but still there isn't a definitive fix...
I fixed by flashing MIUI...
You're right, Secure Settings can do that.
I've tried it just now up to a two-minute CPU-only wakelock. Doesn't work either.
superbalza said:
I think the problem is CM.. maybe is the annoying connection drop issue!
Click to expand...
Click to collapse
I don't know, I haven't had any problems with connection drops so far. Apart from the occasional spontaneous reboot everything is running smoothly.
edwinek said:
You're right, Secure Settings can do that.
I've tried it just now up to a two-minute CPU-only wakelock. Doesn't work either.
Click to expand...
Click to collapse
I see... I'm out of ideas, for now. Could this be related to the radio? I'm on 1.15 radio.
By the way, it's not related to CM, because I'm on stock (rooted) 4.0.4 and it's the same.
@superbalza: which radio are you on with MIUI? Is it different from what you were using previously?
Thanks
I'm on radio 1.08ts.50.02.16
I'm on the latest 1.15...
Looks like not too many people have this problem...
In the meantime, I created a workaround: I made a Tasker task that first switches to 2G and then locks the device. The whole process of switching to 2G takes about 10 seconds. Then I created a shortcut to that task on the home screen, so I can shutdown with 2G with one click.

D6683 - Upgrade to D6633 Marshmallow Firmware - LTE Connection

Hi guys.
Just trying to share my observation and explore if we can do anything.
I am using D6683 (I think it is support to be a HK based handset). Using Lollipop, it has been working perfectly but 16GB not enough hence MM function that allow SD card and Internal memory merge is appreciated.
Since Sony decide to ditch us using D6683, the only option is using D6633.
1. Try using MM .575, it has huge connection problem. The phone will just stay in GPRS mode even connected to a LTE network. Driving from one point to another point, will just cause it to data connection to hang. Putting it in airplane mode and anything else won't work. Only reboot works
2. Restore stock and upgrade to .291, first day testing seem to be ok. Got LTE connection. It did try to swing a bit but it has been maintaining well. This i started driving with Waze. Connection start to go haywire, but it will be still try to reconnect. Data are "maintained" to certain extend. Let the phone along for about 2 days, the next thing I realize, only GPRS left. The signal logo got no more H, H+ or LTE. Check the phone service menu and all info confirm the LTE is available. Again a reboot fix the problem.
3. Change the setting to only WCDMA + GPRS. The phone was "perfect". No data hang issue and etc
Need all the sifu help. Assuming if the phone is rooted, how is the phone determine the connection method? I presume that the phone will initialize the modem to dial the connection. Can anyone share anything that we can probably trigger a redial and probably eventually inject into the phone data connection sequence. Again using Lollipop, there is no issue.
Appreciate any comments/advice.
Regards
Dan

Categories

Resources