Comments (2)
use following to open hotspot on 8.0,
Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(Intent.CATEGORY_LAUNCHER); ComponentName cn = new ComponentName("com.android.settings", "com.android.settings.TetherSettings"); intent.setComponent(cn); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity( intent);
from android-wifi-hotspot-manager-class.
@myathinzar But that would require user action every time, which should be avoided..
The internal API that is used through reflection was deprecated and the new API seems to be rather difficult to access without root. There are some hints that it may be possible for Android 8.1:
https://groups.google.com/d/msg/automate-user/xy307m-hwvQ/NZERFRJSBgAJ
This seems to be a good starting point code wise:
https://github.com/matejdro/TaskerTetherControl/blob/master/app/src/main/java/com/matejdro/taskertethercontrol/TetherSetupActivity.java
https://github.com/matejdro/TaskerTetherControl/blob/master/app/src/main/java/com/matejdro/taskertethercontrol/TaskerReceiver.java
from android-wifi-hotspot-manager-class.
Related Issues (18)
- Requires root or not? HOT 2
- Scan wifi issue HOT 6
- Unable to connect to Hotspot in Android 5.0 and above HOT 11
- Remove eclipse project files and add gradle build file
- Add support for API 23+ by adding Intend for WRITE_SETTINGS permission HOT 1
- Split project in demo and library (jar)
- Getting devices that are not only connected to hotspot but also available HOT 2
- How to get capability of hotspot? HOT 1
- IP Configuration HOT 1
- hotspot can not be connected to if it is password protected HOT 7
- Create WPA2 Hotspot HOT 1
- How to get device name / ssid?
- modify mac address
- Is WRITE_SETTINGS permission compulsory? HOT 2
- WiFi connection is not restored when AP is turned off HOT 4
- Fail open hotspot @ android 5.0.2
- Internet usages by client connected by wifi hotspot HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-wifi-hotspot-manager-class.