Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
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 9
Posts: 52
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, 518 views)
 
bluehaze
Old
#4  
bluehaze's Avatar
Senior Member
Thanks Meter 0
Posts: 259
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 29
Posts: 1,751
Join Date: Jun 2009
Location: Boynton Beach, FL
You could achieve the same thing with better/any cut, sans the exit at the end.
[FONT="Arial Black"]NEXUS ONE -
CM7
Case-Mate One Tough Case
 
worker1
Old
#6  
worker1's Avatar
Senior Member
Thanks Meter 7
Posts: 297
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 9
Posts: 52
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 9
Posts: 52
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 242
Posts: 2,632
Join Date: Jan 2010
Location: FortWorth/TX

 
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?
Java Developer.
Phone: Galaxy Nexus-> CM10.1 PA Nightlies
Phone: Nexus One-> CM10.1 AOKP Unofficial Nightlies
Tablet
: Nook Color -> CM10.1 Nightlies
Tablet
: HP Touchpad -> CM10.1 -SCHIZOID
Links:
»My Apps [CPUStatusLED] [MoreRecent]
»My Threads
»My Posts
»Transparent widgets

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Guide to Using Adobe Air on Android

When writing an app with performance in mind, you most likely want to write it native code using the … more

Boot Animation Paradise for your Android Device

The default boot animations on any device, no matter whichmanufacturer, are generally pretty … more