tethering

Wi-Fi tethering - how to get list of connected clients

余生颓废 提交于 2019-11-29 21:29:25
问题 Is there any way to get a the list of connected MAC addresses when my phone is on Wi-Fi tethering mode? 回答1: Firstly, you must have a rooted device. When it's done just read dnsmasq.leases file. Usually it is placed at: /data/misc/dhcp/dnsmasq.leases . A structure of the file is pretty simple - each line is a summary of a connected user. The summary has several fields including MAC. I didn't find a possibility to get MAC without root. Please correct me if I'm wrong. 回答2: Reading /proc/net/arp

Android: Programmatically Turn on WiFi hotspot

夙愿已清 提交于 2019-11-29 07:19:01
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) But on other devices with the same or lower Android version, the application crashes and restarts the device. The code is as follows: package com.android.startwifi; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import android.app.Activity; import android.content.Context; import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiManager; import

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

柔情痞子 提交于 2019-11-29 02:53:49
问题 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

Captive portal on android device

吃可爱长大的小学妹 提交于 2019-11-28 20:32:15
问题 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)? 回答1: 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

Android: Programmatically Turn on WiFi hotspot

久未见 提交于 2019-11-28 00:48:52
问题 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) But on other devices with the same or lower Android version, the application crashes and restarts the device. The code is as follows: package com.android.startwifi; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import android.app.Activity; import android

ADB over Bluetooth Android

非 Y 不嫁゛ 提交于 2019-11-27 20:21:46
问题 I have no WIFI, I have no cable connection available. Is there hope for me to connect my device to ADB? 回答1: 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

Create Wifi Hotspot Configuration in android

穿精又带淫゛_ 提交于 2019-11-27 19:11:54
I am using android 4.1.1 ... I am making an application that allows the user to make his own network using Wifi Hotspot and then the clients can connect to it and share data. I have successfully created the Wifi hotspot in android but I cannot configure it for the purpose. Is there any way to configure Wifi Hotspot on android through coding ?? This answer maybe outdated! if(wifiManager.isWifiEnabled()) { wifiManager.setWifiEnabled(false); } WifiConfiguration netConfig = new WifiConfiguration(); netConfig.SSID = "MyAP"; netConfig.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);

How I can enable USB Tethering programmatically on an Android 4.0 device?

柔情痞子 提交于 2019-11-27 13:54:34
问题 I want to enable USB Tethering from my app on my Android 4.0 Device? The following code works for Android 2.2 but it does not work for 4.0. Can anyone help? int USBTethering(boolean b) { try { ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); Log.d(tag, "test enable usb tethering"); Method[] wmMethods = cm.getClass().getDeclaredMethods(); String str = ""; if (b) str = "tether"; else str = "untether"; for (Method method : wmMethods) { Log.d("in usb

detect hotspot enabling in iOS with private api's

て烟熏妆下的殇ゞ 提交于 2019-11-27 13:50:24
ok so i want to detect weather the user has enabled hotspot/tethering or not in a iOS device. I can use private api's knowing it wont make it to the app store. i was trying to go through private api's list/ runtime headers but there are too many to decide which might be helpful. or if i could get to know where UIApplicationWillChangeStatusBarFrameNotification gets fired from in private api's(probably called for active call and activated hotspot etc) i tried this detect personal hotspot and also used CaptiveNetwork but it only returns the connected wi-fi ssid and not the created hotspot. any

Android 2.3 wifi hotspot API

拟墨画扇 提交于 2019-11-26 21:42:39
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). There is no official API, but you can use reflection to handle it. I know some say, it's not recommended, however imho I say, screw it if Google doesn't want to provide an API for whatever reason. Below is the code of an activity I used in my application, where the user can enable/disable the Wifi AP. When you enable Wifi AP, usually the regular Wifi will be turned off, so after the user disables the Wifi AP again, we'll be activating regular wifi