Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,110 Members 41,705 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Using the setPreferredNetworkType method through reflection

Tip us?
 
AndroRobo
Old
(Last edited by AndroRobo; 8th May 2014 at 05:52 PM.)
#1  
AndroRobo's Avatar
Junior Member - OP
Thanks Meter 0
Posts: 3
Join Date: Dec 2013
Location: Thrissur
Phone [Q] Using the setPreferredNetworkType method through reflection

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
 
jinayhvora
Old
#2  
jinayhvora's Avatar
Member
Thanks Meter 14
Posts: 41
Join Date: Apr 2014
If u are rooted why not use Xposed?

Sent from my GT-I9300
 
es0tericcha0s
Old
#3  
Senior Member
Thanks Meter 519
Posts: 2,698
Join Date: May 2010

 
DONATE TO ME
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/...s/tellinfo.apk
Need some help, advice, something fixed? Hit me up on Hangouts @ es0tericcha0s
Now offering unlocking services - including many Sprint phone unlocks! PM for details!

HTC Droid Eris / Motorola Droid / Samsung Galaxy S Fascinate / Motorola Droid X / LG G2x / HTC Evo 3D (x2) / Samsung Epic 4G Touch (Sprint S2) / HTC Amaze / Samsung Galaxy S3 (International) / Samsung Galaxy Note 2 / Nexus 4 / HTC One / Samsung Galaxy S4 / Sony Xperia ZL / Nexus 5 / OnePlus One (64 GB)
 
AndroRobo
Old
#4  
AndroRobo's Avatar
Junior Member - OP
Thanks Meter 0
Posts: 3
Join Date: Dec 2013
Location: Thrissur
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.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes