Here I want to just open Hotspot & tethering screen from button click, so user can create Hotspot manually. I have searched a lot but no any implicit intent found for go that screen. Also Can I open popup in which user can write Network name and security details ? If yes, so how ?
Asked
Active
Viewed 1,258 times
1 Answers
2
This should work:
final Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
final ComponentName cn = new ComponentName("com.android.settings", "com.android.settings.TetherSettings");
intent.setComponent(cn);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
However it may dependent on the actual device, Samsung, LG, Sony might be different.

moritzg
- 4,266
- 3
- 37
- 62
-
Working fine. But I want to also open that popup in which user can enter network name and security detail. It is possible to open that popup ? – Sohel S9 Mar 07 '19 at 08:01
-
-
@SohelS9 Is that a device specific feature? Can you post a screenshot of what exactly you mean? – moritzg Mar 07 '19 at 08:41
-
This is already open given by your code https://paste.pics/d910952ab181d3fce4933d3d35ed1429 But I want to open this popup https://paste.pics/ccfc74ffe4b7b1a20a37f24288866ce0 just after that screen. – Sohel S9 Mar 07 '19 at 08:46
-
@SohelS9 Unfortunately this is not possible you cannot open a dialog (maybe if your device is rooted). – moritzg Mar 07 '19 at 11:34