A quick story back before someone tells me to buy the app. =)
I just have an EVO and it chews the battery pretty quickly. I downloaded JuiceDefender to manage my mobile data connection. It seems to have worked out quite well. However, the settings are very limited (even in paid versions).
I'm currently trying to develop a much more customizable application to save battery. The main thing I'm trying to do is to first enable / disable the mobile data connection at your discretion.
The problem is that I cannot find code snippets or articles on how to do this. The only thing I found is the following. I donβt know how accurate this is, but that was all I could get together by browsing developer.android.com
ConnectivityManager cm = (ConnectivityManager) this.getSystemService(CONNECTIVITY_SERVICE); cm.stopUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE, "android.net.conn.CONNECTIVITY_CHANGE"); State state = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState(); textView.setText(state.name());
If anyone could point me to anything that could help, that would be very appreciated.
UPDATE
It seems that HTC Evo on Sprint does not use APN settings. I tested this by downloading APNDroid and watching how it does not work. Then I made a quick application to reset all APN entries to the screen. This gave one result, and that was for mms.
Looking at the phone information when JuiceDefender is running, I find that the GSRP network is turning on and off. This leads me to believe that this can be done using code, although every page I find asks about the same problem, says that this is not possible. Kicker - they all say to do it like APNDroid. Please give me some idea.
Thank!
android
TyCobb Sep 04 '10 at 21:57 2010-09-04 21:57
source share