tethering

Debug app using ADB over Bluetooth for on an Android-x86 netbook

纵饮孤独 提交于 2019-12-09 16:39:39
问题 I managed to set a nicely working Android-x86 on my netbook, with Bluetooth enabled and paired (!) with my Windows 7 development workstation. I was initially hoping to use adb with it just as I am doing with real phones, via USB. So I plugged in a dedicated USB male-to-male cable and... nothing happened. Turns out Android-x86 doesn't support connection via USB cable. I then found great instructions on how to do ADB over WiFi. The problem is that I have WiFi on my Android-x86 netbook but not

How to create wifi tethering Hotspot in Android Marshmallow?

旧城冷巷雨未停 提交于 2019-12-07 04:59:07
问题 I've tried to create a Wi-Fi tethering hotspot in Android Marshmallow using the following code. public class WifiAccessManager { private static final String SSID = "1234567890abcdef"; public static boolean setWifiApState(Context context, boolean enabled) { //config = Preconditions.checkNotNull(config); try { WifiManager mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); if (enabled) { mWifiManager.setWifiEnabled(false); } WifiConfiguration conf =

How to create wifi tethering Hotspot in Android Marshmallow?

假装没事ソ 提交于 2019-12-05 07:52:22
I've tried to create a Wi-Fi tethering hotspot in Android Marshmallow using the following code. public class WifiAccessManager { private static final String SSID = "1234567890abcdef"; public static boolean setWifiApState(Context context, boolean enabled) { //config = Preconditions.checkNotNull(config); try { WifiManager mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); if (enabled) { mWifiManager.setWifiEnabled(false); } WifiConfiguration conf = getWifiApConfiguration(); mWifiManager.addNetwork(conf); return (Boolean) mWifiManager.getClass().getMethod(

Debug app using ADB over Bluetooth for on an Android-x86 netbook

流过昼夜 提交于 2019-12-04 03:12:54
I managed to set a nicely working Android-x86 on my netbook, with Bluetooth enabled and paired (!) with my Windows 7 development workstation. I was initially hoping to use adb with it just as I am doing with real phones, via USB. So I plugged in a dedicated USB male-to-male cable and... nothing happened. Turns out Android-x86 doesn't support connection via USB cable. I then found great instructions on how to do ADB over WiFi . The problem is that I have WiFi on my Android-x86 netbook but not on my Windows 7 desktop PC. I do have the option of buying a WiFi dongle but I prefer a more immediate

Android wifi hotspot client connection events

天大地大妈咪最大 提交于 2019-12-03 18:05:48
问题 I am connecting different devices with wifi hotspot AP programatically in my android app, How can i detect the clients being connected and disconnected and to the wifi hotspot AP i turned on programmatically ? Is there any callback event in Android API to give information regarding the connection or disconnection events of individual devices ? Thanks in advance. 回答1: I think you need to use WifiP2pDevice There you can check for available devices, and also if they are connected or not. Try

Is there a way to check whether tethering is active?

别来无恙 提交于 2019-11-30 14:39:40
can I check programmaticall wheter the android device has tethering activated? I just watched the WifiManager class. All vatraibles from the WifiInfo show the same values as iff the WIFI is turned off on the device. Thnaks, best regards Try using reflection, like so: WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); Method[] wmMethods = wifi.getClass().getDeclaredMethods(); for(Method method: wmMethods){ if(method.getName().equals("isWifiApEnabled")) { try { method.invoke(wifi); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e

Changing Android hotspot settings

心已入冬 提交于 2019-11-30 05:28:33
With the release of API level 26, my app's core functionality broke, this being, changing the users' hotspot setting within the application. To get and set this configuration I am using the following functions from the WifiManager hidden api: getWifiApConfiguration and setWifiApConfiguration . Method getWifiApConfiguration = wifiManager.getClass().getMethod("getWifiApConfiguration"); getWifiApConfiguration.invoke(wifiManager); This is working with devices prior to Android O, but in this version I get the following error: App not allowed to read or update stored WiFi Ap config (uid = 10168) The

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

天涯浪子 提交于 2019-11-30 05:07:28
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, however it would be quite tedious to tether the phones through navigating the menus, each and every time I (re)start my computer or move the test bank. I am currently using Nexus S phones running cyanogenmod v10.1.0, however the test bank will likely be Samsung Galaxy S4's possibly mixed with the few Nexus S phones I have on hand. I want to do this as a bash script, but I'm trying to get it work at

Captive portal on android device

北慕城南 提交于 2019-11-30 00:22:40
I am using my android device as a mobile web server. I want to direct every user that connects through my portable Android hotspot to a specific wellcome page. Does anybody know how to implement this technique in my device (I believe this is called the captive portal technique)? I answer my own question until someone shares some useful information on how to implement the captive portal in a non-rooted device. At the moment I am not aware of such working solution. Captive portal works by intercepting most network packets (using a firewall), regardless of address or port, until the user opens a

ADB over Bluetooth Android

一笑奈何 提交于 2019-11-29 23:45:27
I have no WIFI, I have no cable connection available. Is there hope for me to connect my device to ADB? Juan Cortés With the latest releases of Cyanogenmod (7.2 and 9) and presumably some other roms the option of adb over network has arrived. Similar to ADB over WIFI which has been available for a while, it pretty much does the same. Enable Bluetooth on your laptop and device Pair them Connect from your laptop to your device via Bluetooth PAN (Personal Area Network) Enable the ADB over Network setting (Settings/Applications/Development) Find out your IP address from the terminal ( busybox