[Q] Using the setPreferredNetworkType method through reflection - Android Q&A, Help & Troubleshooting

I've been going over the android sdk for the past year to find out if there is a way to change the network type(2g/3g/4g), in phones with root access.However I couldn't find any way to do this.Asking around,someone told me that I could do this using reflection,by calling a method on a phone instance.Looking through the source code,I did find a setPrefferedNetworkType(); method in the Phone Interface,inside the internal telephony package.Is there anyway I can use this to solve my problem.I can't seem to find a way to get an instance of a class that implements the interface.Or is there any other way to do it entirely?Please help :crying::crying:

If u are rooted why not use Xposed?
Sent from my GT-I9300

Not clear on exactly what you are trying to do... The settings to switch to different network types should be built-in. They are on MOST phones. This is a useful app for other situations where you can't access those settings:
https://dl.dropboxusercontent.com/u/9903887/Apps/tellinfo.apk

I don't think you guys got what I was talking about.I know that there are built in settings to change it.But I want to build a widget that makes it easier to switch between networks.So I need to know how to do this with the api.

es0tericcha0s said:
Not clear on exactly what you are trying to do... The settings to switch to different network types should be built-in. They are on MOST phones. This is a useful app for other situations where you can't access those settings:
https://dl.dropboxusercontent.com/u/9903887/Apps/tellinfo.apk
Click to expand...
Click to collapse
I have been wondering the same exact thing. Did you maybe find correct answer yet ?

Related

[Q] Help With Proxy

Hi All
I want to use my android device with the wi-fi connection at work.
The sad part is I can only access internet via a proxy.
I need to find a way preferably an .apk , via which I can set a proxy.
And the biggest problem is that I have a non-rooted device.
Thanks
regencyhood said:
Hi All
I want to use my android device with the wi-fi connection at work.
The sad part is I can only access internet via a proxy.
I need to find a way preferably an .apk , via which I can set a proxy.
And the biggest problem is that I have a non-rooted device.
Thanks
Click to expand...
Click to collapse
As far as I know there isnt an apk for that.
What version of android are you on?
In 2.2 if you goto wireless and network settings and scroll to the bottom then you get proxy settings...
If you dont have it...try wolf Xperia TW v007.1 rom, I am on that and am looking at the proxy settings now.
I too need them to access wifi at work...
Try this out:
http://forum.xda-developers.com/showthread.php?p=13877540#post13877540
Your phone must be rooted though....
J!M
I think x10 doesn't have iptables modules installed , I've tried similer apps called proxydroid if I'm not mistaken and although the apps itself is easy to use, the problem seems to be lies in the x10 itself, can anyone verify the iptables module exists in x10?
Thanks everyone for your speedy replies, but the major problem is that I cannot root the device, as its a company asset (will need to take approval from 101 people), so am looking for a way to do the same without the need for rooting the device.
And I cant believe Android has not implemented this yet!!!!
How do they expect to make a presence in the corporate sector, I mean already the sales force in my company are using iPads...its a shame coz you can do so much more with android as compared to iOS....
regencyhood said:
Thanks everyone for your speedy replies, but the major problem is that I cannot root the device, as its a company asset (will need to take approval from 101 people), so am looking for a way to do the same without the need for rooting the device.
And I cant believe Android has not implemented this yet!!!!
How do they expect to make a presence in the corporate sector, I mean already the sales force in my company are using iPads...its a shame coz you can do so much more with android as compared to iOS....
Click to expand...
Click to collapse
You can always unrooted by flashing back to stock with SEUS. Your work will never know
Sent from my X10i using XDA App
gregbradley said:
You can always unrooted by flashing back to stock with SEUS. Your work will never know
Sent from my X10i using XDA App
Click to expand...
Click to collapse
Thanks, it seems that this is the only option available as of now

[Q] Proxy Settings on SGS2

I have an unrooted enterprise SGS2. I cant root it like I have done to my personal device.
I am unable to access certain wifi sections if they are bound by proxy authorisation inspite of knowing the server name and the proxy credentials. THere is no place when I can input the settings.
I cant try the proxyDroid as it works only on rooted devices.
Anybody who knows about proxy settings on android ? Any browser is fine.
Hey abhijit.
Maybe the enterprise got it locked somehow before giving it to you guys.(its really just a stupid thought)
But i would suggest flashing a new rom as that would give you root access as well without really rooting the phone first and then trying to do what you may want to do.
And there are thousands of roms to choose from.
This should solve the issue in my opinion.
Sent from my GT-I9100 using xda app-developers app
Abhijit30 said:
I have an unrooted enterprise SGS2. I cant root it like I have done to my personal device.
I am unable to access certain wifi sections if they are bound by proxy authorisation inspite of knowing the server name and the proxy credentials. THere is no place when I can input the settings.
I cant try the proxyDroid as it works only on rooted devices.
Anybody who knows about proxy settings on android ? Any browser is fine.
Click to expand...
Click to collapse
1. Goto Wi-Fi settings, long click on the network, select edit , then tick advance settings, you will now see a place for proxy settings and some other advance settings. Input the proxy and save .
Jokesy said:
1. Goto Wi-Fi settings, long click on the network, select edit , then tick advance settings, you will now see a place for proxy settings and some other advance settings. Input the proxy and save .
Click to expand...
Click to collapse
Thanks a lot of the reply bro ! But I could do that previously too. my concern is that the proxy is governed by a set of username-password credentials (eg. employee id and password) which i am unable to input there as there is no option for such a thing.
On desktop browser, we get a pop up asking for those credentials. wonder how it is on an android browser as there is no pop-up asking for the proxy credentials.
Arunabh said:
Hey abhijit.
Maybe the enterprise got it locked somehow before giving it to you guys.(its really just a stupid thought)
But i would suggest flashing a new rom as that would give you root access as well without really rooting the phone first and then trying to do what you may want to do.
And there are thousands of roms to choose from.
This should solve the issue in my opinion.
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
personal SGS2, dual booted with Jelly Bean and ICS ROMs...but dont have the liberty for the same on the enterprise device bro.
Abhijit30 said:
Thanks a lot of the reply bro ! But I could do that previously too. my concern is that the proxy is governed by a set of username-password credentials (eg. employee id and password) which i am unable to input there as there is no option for such a thing.
On desktop browser, we get a pop up asking for those credentials. wonder how it is on an android browser as there is no pop-up asking for the proxy credentials.
Click to expand...
Click to collapse
Now I understand. It's been long i used those kind of networks. I'll advise use to root your phone.
Nowadays, rooting is just too easy as you don't need to flash any kernel to achieve that.
Jokesy said:
Now I understand. It's been long i used those kind of networks. I'll advise use to root your phone.
Nowadays, rooting is just too easy as you don't need to flash any kernel to achieve that.
Click to expand...
Click to collapse
I do understand that bro ... proxyDroid wud hv made my life easier if i rooted the phone..bt the sole problm is, i dnt own it...its an enterprise phone. THey will never permit to do something wich will void the warranty

[Q] Why Android 2.3 and above can switch between 2G/3G

Hello!
I have been looking for it some time and I couldn't find anything specific.
I know that is not possible switch between 2G and 3G in a stock ROM except from Settings.
But I also know that some CyanogenMOD have a button than can switch in the status bar.
Why isn't possible switch between 2G and 3G using a widget or an app (even being root!)? Why is not possible emulate the Settings button? Is not possible even recompiling some parts of Android (and making an apk or something to install via Recovery)?
I know the short answer "because Google doesn't allow it", but I'm looking for a technical one.
Thank-you very much.
Thats a rather advanced feature, and most stock ROM's are set up for noobs. They dont put that feature in there because they dont expect the majority of users to use it.
BigSamE said:
Thats a rather advanced feature, and most stock ROM's are set up for noobs. They dont put that feature in there because they dont expect the majority of users to use it.
Click to expand...
Click to collapse
So, is it possible to make a custom STOCK rom that allows a widget or a program (like Tasker) to switch between 2G/3G?
Where could I find more information about this topic?
Thank-you very much for your answer and your time.
SOLUTION
I was able to do it in my stock rom by following this guide
give him a big thank

[Q] Customize System/Navigation Bar without root?

Is it at all possible? We want to put non-button Views in our System Bar. We do have system keys for our specific tablet.
One of my friends tried doing it with no success, but I assume he was looking in the wrong places. I don't know what he knows about the process, so I can't say what we've tried.
We're using Android 4.2 .
I guess I should also mention that we've tried this app - https://play.google.com/store/apps/details?id=com.cygery.customnavbar.demo though we haven't been able to find any info on how he got it to work.
bump?

[Q] AOSP Guidance

So I've posted in various forums on certain ROMs with questions about things, but I just haven't been able to seem to find the right fit yet.I love AOSP and the ability for customization, Active Display, etc. Maybe someone can help me out here if I say what I'm looking for. Perhaps someone knows if these things are in a certain AOSP ROM. Here's three things:
1.) Hotspot that allows me to see who's connected and maybe name the device that's connected (i have a few things that connect to the hotspot)
2.) Native SMS app that allows me to continue to type after reaching 160 characters (some stock apps stop progress at 160)
and
3.) I know it probably can't be native, but some sort of S-PEN functionality (I use "Screen Write" a lot)
Anyone have suggestions based on this? Thanks for your continued help and development!
sjr19 said:
So I've posted in various forums on certain ROMs with questions about things, but I just haven't been able to seem to find the right fit yet.I love AOSP and the ability for customization, Active Display, etc. Maybe someone can help me out here if I say what I'm looking for. Perhaps someone knows if these things are in a certain AOSP ROM. Here's three things:
1.) Hotspot that allows me to see who's connected and maybe name the device that's connected (i have a few things that connect to the hotspot)
2.) Native SMS app that allows me to continue to type after reaching 160 characters (some stock apps stop progress at 160)
and
3.) I know it probably can't be native, but some sort of S-PEN functionality (I use "Screen Write" a lot)
Anyone have suggestions based on this? Thanks for your continued help and development!
Click to expand...
Click to collapse
1. HotSpot usually has Access-Control which (when enabled) displays who is connecting or trying to connect (you can allow or deny)
2. I've never run into this. I am pretty sure Hangouts doesn't have this.I prefer 3rd party SMS anyway
3. For AOSP S-Pen use CM S Pen Add-on(ROOT)
I hope this helped some, good luck!
Thanks, but regarding your first point on aosp the only options for setting up the Hotspot are ssid, security type and password, is there another spot to bring up access control? Thanks for the other info!
Sent from my SM-N900P using XDA Free mobile app
sjr19 said:
Thanks, but regarding your first point on aosp the only options for setting up the Hotspot are ssid, security type and password, is there another spot to bring up access control? Thanks for the other info!
Sent from my SM-N900P using XDA Free mobile app
Click to expand...
Click to collapse
It is probably ROM dependent, which ROM are you using at the moment?
EDIT: you might try this WiFi Tether app, always backup first just incase.
https://code.google.com/p/android-wifi-tether/
jdelano said:
It is probably ROM dependent, which ROM are you using at the moment?
EDIT: you might try this WiFi Tether app, always backup first just incase.
https://code.google.com/p/android-wifi-tether/
Click to expand...
Click to collapse
I'm trying out the pac-man nightly by kenzolo, i'll try and see if that wifi tether app works for AOSP Thanks
You're welcome, I hope you're able to get your phone setup just the way you want it.

Categories

Resources