Linked Questions

138 votes
13 answers
106k views

How to show enable location dialog like Google maps?

I use the latest version of Google Play Services (7.0) and followed the steps given in their guide and I enabled the location dialog like below, which has a "never" button. My app needs location ...
Mufri A's user avatar
  • 1,395
22 votes
3 answers
31k views

How to turn on/off wifi hotspot programmatically in Android 8.0 (Oreo)

I know how to turn on/off wifi hot spot using reflection in android using below method. private static boolean changeWifiHotspotState(Context context,boolean enable) { try { ...
Chandrakanth's user avatar
  • 3,771
12 votes
7 answers
30k views

Is it possible to USB tether an android device using adb through the terminal?

I'm setting up some tests and it will require a decent number of phones to be usb tethered and configured. I've been successful in configuring them the way I want to once they have been tethered, ...
turbo's user avatar
  • 1,887
24 votes
3 answers
23k views

Android 2.2 wifi hotspot API

What is the API call I need to make in Android 2.2 (Froyo) to create a Wifi hotspot (as seen in the Tethering and Portable Hotspot settings item).
Thomas's user avatar
  • 665
2 votes
1 answer
11k views

How do I change the Portable Hotspot's SSID in Android programmatically?

I want change the Hotspot SSID! Can anybody help? From Android turn On/Off WiFi HotSpot programmatically, here is my code to toggle the Portable Hotspot: import android.content.*;import android.net....
salih's user avatar
  • 324
9 votes
5 answers
8k views

Android 6.0.1 couldn't enable wifi hotspot programmatically

When I tried to enable wifi tethering from the following code it throws the exception java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at com..... .... ...
chinthakaS's user avatar
14 votes
1 answer
13k views

Turn On/Off WiFi Hotspot Programmatically on Android Marshmallow (6.0)

I have come across this thread (Android: How to Enable/Disable Wifi or Internet Connection Programmatically) which is very similar to what I wanted to ask. I have tried the solution provided by an ...
sasawatc's user avatar
  • 427
6 votes
3 answers
18k views

Android: Programmatically Turn on WiFi hotspot

I am trying to turn on the portable Wifi hotspot ON, by referring this link: how to set advanced settings of android wifihotspot This is working well on Samsung Galaxy S3 Android v4.4.2.(no issues) ...
Varun Parikh's user avatar
9 votes
6 answers
875 views

Message from Android to Android without Accesspoint

I have two Android-Devices, i have no IP-Addresses the Mac-Addresses are d0:e7:82:fa:90:33 (a) 8c:bf:a6:a8:77:8f (b) how to send a byte from a to b? Is it possible? EDIT: droped DatagramSocket-...
Grim's user avatar
  • 1,348
21 votes
0 answers
13k views

Android How to turn on hotspot in Android Programmatically [closed]

As long as I know, There is no API for the method of "Enabling AP" but I can use the reflection to set it on. Here is what I does wifi_manager = (WifiManager) this.getSystemService(...
TrisNguyen's user avatar
0 votes
3 answers
5k views

Android: How to change the Mobile hotspot broadcast channel by programmatically?

I tried to change mobile hotsport broadcast channel in android by programmatically by using following code but it not changing any value/channel. Note: I able to change the SSID and Password by ...
kgsharathkumar's user avatar
3 votes
2 answers
5k views

Which android classes to use for controlling wifi hotspot?

I want to connect a hardware device to an android hotspot. My app will setup a hotspot and detect the device connecting. I've tried using the p2p sample provided with SDK 21 but when the hotspot is ...
RonanE's user avatar
  • 51
2 votes
1 answer
3k views

Turn on/off WiFi hotspot programmatically

I need help in creating a C# script that set a android WiFi in hotspot mode. Here is the code that I managed to create. public bool setAPEnabled(bool enabled) { using (AndroidJavaObject ...
BackLogers's user avatar
2 votes
1 answer
2k views

Calling WifiManager.startLocalOnlyHotspot() throws SecurityException even after granting all required permissions on some devices

I am working on a file sharing app. I need to turn on local only hotspot of a device programmatically by calling WifiManager.startLocalOnlyHotspot(). According to the android docs on this page - ...
Mohit Atray's user avatar
2 votes
1 answer
3k views

How to turn off wifi hotspot programmatically in Android 8.0 (Oreo) (setWifiApEnabled is not support this version anymore)

I reference the code to turn on hotspot in Android 8.0, it is work. But I have no idea about how to disable it @RequiresApi(api = Build.VERSION_CODES.O) private void turnOnHotspot(){ WifiManager ...
Lee's user avatar
  • 21

15 30 50 per page