5,596,235 Members 34,755 Now Online
XDA Developers Android and Mobile Development Forum

activating wifi hotspot from widget on FroYo

Tip us?
 
ilanB
Old
#1  
Junior Member - OP
Thanks Meter 2
Posts: 13
Join Date: May 2007
Default activating wifi hotspot from widget on FroYo

Hi,

Just updated to FroYo mainly for the tether option. It works great and I can just surf while the phone is in my pocket / bag.

what I miss is a faster way to activate it.

I didn't see an option to have shortcut to the home screen (via - shortcuts - settings) and I can't find a widget that will allow it.

Any ideas?

Thanks
Ilan
 
nak#57
Old
#2  
Member
Thanks Meter 1
Posts: 47
Join Date: Jan 2010
I too would like to know this
 
jmdsdf
Old
(Last edited by jmdsdf; 29th May 2010 at 09:14 PM.) Reason: To attach download to post
#3  
Member
Thanks Meter 10
Posts: 64
Join Date: May 2010
Here's something close, it's not exactly what you want (it's a program that just opens Menu | Settings | Wireless | Tethering & Portable hotspot and then exits).

It took more time to for me to write this post (and figure out how to insert a link!) than for me to code it:

jmdsdf.yi.org/share/TetherSettings.apk
Attached Files
File Type: apk TetherSettings.apk - [Click for QR Code] (6.9 KB, 530 views)
 
bluehaze
Old
#4  
Senior Member
Thanks Meter 0
Posts: 260
Join Date: May 2007
Any chance you can make the "t" in tether that shows on the icon label a capital "T"? Sorry i'm a bit OCD so it kind of drives me crazy but I really appreciate the quick access to the tether settings comes in quite handy!

Thanks
 
evilkorn
Old
#5  
Senior Member
Thanks Meter 30
Posts: 1,752
Join Date: Jun 2009
Location: Boynton Beach, FL
You could achieve the same thing with better/any cut, sans the exit at the end.
 
worker1
Old
#6  
worker1's Avatar
Senior Member
Thanks Meter 8
Posts: 301
Join Date: May 2010
Location: Los Angeles
works great. I want to learn how to do that.
 
ilanB
Old
#7  
Junior Member - OP
Thanks Meter 2
Posts: 13
Join Date: May 2007
Default Re: activating wifi hotspot from widget on FroYo

Wow great that was exactly what I was looking for.

Thanks, I wish I could program as easely as I'm posting questions :) because I'm very good in aking :P

Ilany

-------------------------------------
Sent via the XDA Tapatalk App
 
jmdsdf
Old
#8  
Member
Thanks Meter 10
Posts: 64
Join Date: May 2010
Here's the code:

public class tethersettings extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

// load tether setting dialog
Intent intent = new Intent();
intent.setAction(Intent.ACTION_MAIN);
ComponentName com = new ComponentName("com.android.settings", "com.android.settings.TetherSettings");
intent.setComponent(com);
startActivity(intent);

// exit
finish();
// kill process
android.os.Process.killProcess(android.os.Process. myPid());

}
}
 
jmdsdf
Old
#9  
Member
Thanks Meter 10
Posts: 64
Join Date: May 2010
Updated with capitalization:

jmdsdf.yi.org/share/TetherSettings.apk

Three other apps with a similar idea (for changing APNs, data settings and wifi settings):

jmdsdf.yi.org/share/ApnSettings.apk
jmdsdf.yi.org/share/DataSettings.apk
jmdsdf.yi.org/share/WifiSettings.apk
 
britoso
Old
#10  
britoso's Avatar
Senior Member
Thanks Meter 277
Posts: 2,704
Join Date: Jan 2010
Location: Orlando

 
DONATE TO ME
Default Re: activating wifi hotspot from widget on FroYo

Now that we have the activity name, cant we just create a shortcut with anycut?
Software Developer (Java/J2EE)
Phone: Nexus 5 32GB -> DroidKang CM11
Phone: Galaxy Nexus-> OmniMetal CM11
Phone: Nexus One (killed while replacing the digitizer)-> CM10.1 AOKP Unofficial Nightlies
Tablet
: Nook Color -> CM10.1 Nightlies
Tablet
: HP Touchpad -> CM10.1 -SCHIZOID
Stick: CX-919 RK3188/2GB (4.2.2 Finless 1.6b. FHD no-OC. Antutu 16753 Quadrant 4723)

Links:
»My Apps (ancient now) [CPUStatusLED] [MoreRecent]
»My Threads
»My Posts
»Transparent widgets

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...