android-wifi

Share Wifi credentials via NFC tag without special apps

只愿长相守 提交于 2019-12-04 07:48:41
问题 I am looking for a way to create a NFC-tag that shares the wifi credentials of my network without my guests having to have any special NFC apps on their phone (other than whats coming with the phone). I have been looking at apps and services like NFC Tag Writer, WifiTap, NFC Task Launcher and NFCLabels.com, but it seems to me like it I would need to have the apps on the guest mobile as well to be able to use it, but I am not able to test it as I only have one NFC-enabled phone available. (Yes

Android O issues with WiFi Peer Discovery

前提是你 提交于 2019-12-04 05:21:20
I am developing an Android Application that employs WiFi (Direct) for service discovery and P2P peer discovery/connection. My development enviromment is as follows:- Android Studio 3.0 Beta 4 Build #AI-171.4304935, built on August 29, 2017 JRE: 1.8.0_152-release-915-b01 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.11.6 My Gradle build:- apply plugin: 'com.android.application' apply plugin: 'realm-android' android { compileSdkVersion 26 buildToolsVersion "26.0.1" defaultConfig { applicationId "com.research.wifi_direct" minSdkVersion 19 targetSdkVersion 26 versionCode 1

Is there a way to explicitly control WiFi scan intervals in Android?

一个人想着一个人 提交于 2019-12-04 02:46:44
I am doing my Master thesis at the moment on WiFi positioning and in order to test my algorithms I needed to collect some data. To do this I have written a short and very simple program for Android which simply collects the RSSI for all availible access points found by each scan and saves them to file. I have set up a BroadcastReceiver that listens on the event WifiManager.SCAN_RESULTS_AVAILABLE_ACTION and I use a Timer , here called tim, to initiate scans with a WifiManager , called wifi as follows: tim.schedule(new TimerTask(){ @Override public void run(){ wifi.startScan(); } }, 0, 1000);

need to run service while device got wifi/data connection

别来无恙 提交于 2019-12-04 01:58:10
问题 Last time, I use following coding to run background service. Intent intent = new Intent(InitActivity.this, GetService.class); PendingIntent pintent = PendingIntent.getService(InitActivity.this, 0, intent, 0); Calendar calendar = Calendar.getInstance(); AlarmManager alarm = (AlarmManager)getSystemService(Context.ALARM_SERVICE); alarm.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), 50 * 1000, pintent); return getZipInfo.toString(); to make better performance, I want to run my

Connecting to WiFi network automatically in Android 5 and 6

被刻印的时光 ゝ 提交于 2019-12-04 01:51:02
问题 Been struggling with connecting to WiFi network in Android 5 and 6 for a while and other similar questions don't seem to work for me. I could get the same code working in Android 4.4.2 Adding the code snippet below. String networkSSID = getSsid(); String networkPass = getNetworkPass(); WifiConfiguration conf = new WifiConfiguration(); conf.SSID = "\"" + networkSSID + "\""; conf.status = WifiConfiguration.Status.ENABLED; conf.priority = 40; conf.allowedProtocols.set(WifiConfiguration.Protocol

Constructing a WifiConfiguration from a ScanResult or: Interpreting ScanResult's 'capabilities' String

隐身守侯 提交于 2019-12-04 01:28:00
Do any of you Android gurus out there know of any open source code to create a WifiConfiguration from a given ScanResult ? It would be helpful. Indeed, line 483 (/624) of my capture (mid April 2012) of the Android source of WifiConfiguration.java is a commented-out constructor intended to do exactly this, with a big TODO wondering whether it's worth implementing (see quote below). I motion yes, can I hear a second? The main challenge I see (which is actually the brunt of this question) is how to interpret the ScanResult.configuration String. can I expect just a simple list of things like [WPA2

What is the difference between active scan and passive scan?

偶尔善良 提交于 2019-12-04 01:19:39
What is the difference between mWifiManager.startScanActive() and mWifiManager.startScan() . What is the difference between active scan and passive scan ? Passive scanning listens to beacons sent by the access points. That means waiting for the beacon to be sent (usually a few seconds). An active scanning will emit probes to those APs immediately. please note that an active scan will consume more energy and as "ordinary" wifi access points broadcast their beacons several times per second, an active scan is rarely needed. e.g. requesting a list of wifi networks in reach takes approx 0.7 seconds

Android 6.0 Cannot add WifiConfiguration if there is already another WifiConfiguration for that SSID

谁说我不能喝 提交于 2019-12-04 00:40:24
问题 Android 6.0 made some changes to the WiFi behavior and it breaks my app behavior and cannot find a solution for it. Basically, for Android 6.0 you are not permitted to modify or delete WifiConfiguration objects that are not created by your app. This means I need to always create my own WifiConfiguration objects. However, if there is already a WifiConfiguration for a particular AP made by the user or other app, I cannot create another one for that AP. wifiManager.addNetwork(wifiConfiguration)

Sending data to ESP8266 Wi-Fi chip from Android device

我是研究僧i 提交于 2019-12-03 22:58:11
I have a ESP8266 chip which is connected to the microcircuit. When chip gets value "200" the light is starting to blink 4 times and than it returns "100" value. I need to make an Android app using Java which will connect to the ESP8266 chip, send data to it and will get value "100". I don't know what library I should use to deal with it. Please, help me, how can I do that? I think it is not the most hard question here. For your Controller you dont need any Libary. You just can use the serial AT Commands: http://www.electrodragon.com/w/ESP8266 After setting up your ESP like this: In your App

How send data through WiFi?

左心房为你撑大大i 提交于 2019-12-03 21:20:43
In my Application I want to send files through WiFi to multiple users if they are using the same WiFi connection Without TCP. how to get the list of the users who are connected to a specified wify. I have tried with Samples But I didn't get anything . Wi-Fi peer-to-peer (P2P) allows Android 4.0 (API level 14) or later devices with the appropriate hardware to connect directly to each other via Wi-Fi without an intermediate access point (Android's Wi-Fi P2P framework complies with the Wi-Fi Alliance's Wi-Fi Direct™ certification program). Using these APIs, you can discover and connect to other