Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,737,799 Members 48,885 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: 48
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 9
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 281
Posts: 2,723
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 -> PA 4.4.2 + XPosed
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


XDA PORTAL POSTS

Android 4.4.3 Begins Rolling Out to European HTC One M8

Shortly after the USA Unlocked and Developer Editions of the HTC One M8 received the … more

Modernize Your Emails with Email Popup

SMS andHangouts messages likely won’t ever replace traditional Emails for more formal … more

Change Your Toast Notification Style with XToast

Android uses multipletypes of notifications. One of these isknown as a toast notification. … more

Port Sony Xperia Themes to CyanogenMod 11 with Ease

In addition the obvious proficiency with graphics, creating agood Android theme … more