Thursday, March 10, 2011

[android-developers] Re: Please help how can use WiFi hotspot feature in application

If you have root access to the device I believe you can use iwconfig
through adb to create a wifi hotspot. You will need to know a bit of
linux and how iwconfig works. See information here or on iwconfig man
page:
http://linux.hostweb.com/TopicMessages/comp.os.linux.networking/2141233/1/Default.aspx

Now a possible workaround to configuring the wifi hotspot
programatically within an apk can be seen here:
http://code.google.com/p/market-enabler/wiki/ShellCommands

Instead of doing a simple 'ls' command, you would build the iwconfig
string you type in the adb, and that would enable the hotspot.

Now I have never done this, but look at the source code of this
application and see how they do it:
http://code.google.com/p/android-wifi-tether/

Line 58 of tether_edify is executing the iwconfig commands described
in the iwconfig post above. The app author decided to go with native
code, but it's essentially the same concept of getting root access and
sending some iwconfig commands to a shell to turn on wifi tethering.

On Mar 9, 3:25 am, Edward Choi <hypo...@gmail.com> wrote:
> I am a application developer.
>
> I want to use WiFi hotspot feature in my application.
> But I can't find how can set a arbitrarily SSID or WiFi security option by
> myself in my application.
> Would you tell me how can set a arbitrarily SSID and WiFi security option in
> my application.
>
> Thank you for reading.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment