GithubHelp home page GithubHelp logo

nickrussler / android-wifi-hotspot-manager-class Goto Github PK

View Code? Open in Web Editor NEW
271.0 34.0 143.0 198 KB

Android Wifi Hotspot Manager Class

License: Apache License 2.0

Java 100.00%
android android-hotspot reflection java

android-wifi-hotspot-manager-class's People

Contributors

ened avatar mouserd avatar nickrussler avatar organillero avatar roaim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-wifi-hotspot-manager-class's Issues

How to get capability of hotspot?

Hi,
How can I get the security type(capability) of already created hotspot?
I am using mWifiHelper.getWifiApConfiguration().priority; to get it, but it gives me 0 only no matter its set as WPA,WPA2 or Open.
Can please tell me what I am doing wrong?

hotspot can not be connected to if it is password protected

Hi Nick,
The library works great but when I set a configuration for a WPA_PSK hotspot, the hotspot is created but it can't be connected on the other device.
Of course this is not your code's problem since I'v been dealing with this with any other solution. it is like the hotspot is created with a problem!
any ideas how to solve this problem?
PS: I'm making hotspot on android 7.1 and the client is running 5.1. and this only happens when I create hotspot on android 7+ devices.

Create WPA2 Hotspot

Hey,

I am trying to create an start an WPA2 Hotspot. I managed to start the Hotspot with the right SSID but WPA2 wont work... I think the problem is the WifiConfiguration, but I can't figure it out.

`

    WifiConfiguration wfc = new WifiConfiguration();
    wfc.SSID = "\"" + ssid + "\"";
    wfc.preSharedKey = "\"" + pw + "\"";
    wfc.status = WifiConfiguration.Status.ENABLED;
    wfc.allowedProtocols.set(WifiConfiguration.Protocol.RSN);
    wfc.allowedProtocols.set(WifiConfiguration.Protocol.WPA);
    wfc.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
    wfc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
    wfc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP);
    wfc.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40);
    wfc.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP104);
    wfc.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
    wfc.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);

    wifiApManager.setWifiApEnabled(wfc, true);

`

Can you help me?

WiFi connection is not restored when AP is turned off

I've tried your example and noticed that Android seems to automatically disconnect from the current WiFi when the hotspot is activated. Would it be better to store the previous WiFi connection settings and reconnect when the AP gets disabled (or give an API for that in the hotspot manager)?

How to get device name / ssid?

dear nick,
i had try to get device name information from device that connected to my hotspot, but i cant get it, do you know how to get device name information?
thanks

Is WRITE_SETTINGS permission compulsory?

I'm wondering if WRITE_SETTINGS permission is compulsory to toggle the hotspot? I can't find it anywhere in the WifiManger class or setWifiEnabled method's prerequisites.
CHANGE_NETWORK_STATE is what's written in the setWifiEnabled method as a prereq.

Scan wifi issue

Hello,

I have working in wifi hostpot and i have test a this demo and i have some bug so please suggest me for this bug,

WifiApManager$1: java.net.SocketException: socket failed: EACCES (Permission denied)

this bug get in scan wifi hostpot in main.java

Please suggest me.

Getting devices that are not only connected to hotspot but also available

Very useful library thanks for it !
However I want to create a app which will display the list of all the devices which are within range of wifi hotspot, it may be connected or not. I simply want all the devices within the range of wifi hotspot.
Is this library capable of doing it? If yes how can i achieve it?

Fail open hotspot @ android 5.0.2

Excuse me , when I test from android 5.0.2 (sony z1 )
When I enable hotspot , if 3g is disabled, it will show a Tethering error dialog, and crash the app.
Have you take this state?

Thank you.

Requires root or not?

I'm totally new to Android programming but I try to gather parts required to implement my idea so I'd like to know if the hotspot management is possible on a non-rooted device.

Please add this into the docs. Thanks!

IP Configuration

Hi Nick,

It appears that the methods used and all methods I have attempted to use when creating a hotspot result in an IP Configuration failure on the remote device.

This applies to your code and multiple other examples across the web, have you experienced this or come across a solution?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.