android-wifi

Android WifiManager making a phantom connection?

亡梦爱人 提交于 2019-12-12 03:41:37
问题 I'm using WifiManager to test for the presence of a particular SSID and verify a given WPA password, but I'm getting a weird result. The code looks like this: WifiConfiguration wc = new WifiConfiguration(); // init ssid and password as Strings ... wc.SSID = "\"" + ssid + "\""; wc2.preSharedKey = "\"" + password + "\""; wc.hiddenSSID = true; wc.status = WifiConfiguration.Status.ENABLED; wc.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP); wc.allowedGroupCiphers.set(WifiConfiguration

Video Streaming over wifi?

社会主义新天地 提交于 2019-12-12 03:08:43
问题 How do I stream a video from my android smartphone to my Laptop(windows 7) without using any app? Any suggestions? A brief explanation would really help. And, I mean "streaming" and not file transfer. 回答1: You cannot use this feature without using any app,what you need to do is to program a socket client that sends the video to the server which is connected over wifi .try googling about TCP sockets in android 回答2: Go to the following link . https://code.google.com/p/spydroid-ipcamera/ you

How to get wifiList using getter from Standalone class extends BroadcastReceiver?

喜夏-厌秋 提交于 2019-12-12 00:34:57
问题 I create a project using Wifi. I implement a standalone class(WifiScanReceiver) extends BroadcastReceiver. I try to call the standalone class from MainActivity. I want to trigger the wifiList alertdialog when I touch a ImageView. Now I got the null pointer exception. In here It shown another one error You need to use a Theme.AppCompat theme (or descendant) with this activity . Please help me to solve these problems.Any help I would really appreciated. MainActivity : public class MainActivity

Creating P2P Connections with Wi-Fi on Android

放肆的年华 提交于 2019-12-11 22:36:57
问题 So I'm trying to create p2p connection work on android. And I am stuck on following part. code below is what's provided on API and it does not make sense to me. I feel like there must be a type for a mManager and the type is not given. How do I make this Work? Link to API: http://developer.android.com/training/connect-devices-wirelessly/wifi-direct.html @Override Channel mChannel; public void onCreate(Bundle savedInstanceState) { .... mManager = (WifiP2pManager) getSystemService(Context.WIFI

Differences between WifiConfiguration status

吃可爱长大的小学妹 提交于 2019-12-11 19:52:46
问题 What is the difference between WifiConfiguration.Status = CURRENT and ENABLED? I can figure for DISABLED but the difference between CURRENT and ENABLED is not obvious to me. Also, for a given connected network, 4.0.3 doesn't give me the save status as 4.0.4 and 4.2.2 give me. The former gives me ENABLED while the later give me CURRENT. Someone knows why? Thanks! 回答1: From the Javadoc for the Status class: /** this is the network we are currently connected to */ public static final int CURRENT

Adding custom certificate to AndroidCaStore for Wi-Fi and HTTPS

こ雲淡風輕ζ 提交于 2019-12-11 17:34:36
问题 I have a central system App that allows user to install CA's which may be used for HTTPS or Wi-Fi Enterprise connection. This App could be viewed as a Certificate manager which would serve multiple applications. (Although it does other things too, mainly configuration) I am working on Android Pie, and this is my first time working on Android, so pardon my noobness. Based on excellent discussion in the below links including Nikolai's wonderful blog Android Central Keystore https://nelenkov

Transfer data from one device to another - android

给你一囗甜甜゛ 提交于 2019-12-11 17:25:21
问题 so I have created two separate apps, one acts as a client & the other acts as a server. Both devices are connected using hotspot: Connection between the devices is successful. For transferring data from the server to the client, I am using the below code: public static String downloadDataFromSender(String apiUrl) throws IOException { InputStream is = null; try { URL url = new URL(apiUrl); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setReadTimeout(10000 /*

Network Status is Missing

為{幸葍}努か 提交于 2019-12-11 11:45:04
问题 I'm able to add network using following code but not able to get status if its added or authentication failed after Enable Network and reconnect . Please help!!! mWifiManager = (WifiManager) this.getSystemService(Context.WIFI_SERVICE); removeNetwork(); Boolean isWifiConnected = false; WifiConfiguration mWifiConf = new WifiConfiguration(); mWifiConf.SSID = "\"" + networkList.get(item_pos).SSID + "\""; mWifiConf.hiddenSSID = true; mWifiConf.status = WifiConfiguration.Status.ENABLED; mWifiConf

intercepting internet calls android

允我心安 提交于 2019-12-11 11:38:01
问题 i want to create an app that intercepts a HttpPost call to a website, logs all the header info. There will be a java application on a computer that uses adb logcat to identify the header info make the call and then sends the result as data in a broadcast intent to then be used on the device. i understand how to do this using the adb so that it would only work with my applications (using alternatives to standard connection libraries), but dont know what classes/methods to overwrite/extend to

Android application without GUI

折月煮酒 提交于 2019-12-11 03:59:40
问题 I have been developing a simple application without UI using broadcast receiver. The app doesn't contain any ACTIVITIES. I have given necessary permissions. I took the code from this url:http://developerandro.blogspot.in/2013/09/check-internet-connection-using.html The app shows a toast "Not connected to internet" when I click change wifi state. It's working correctly. But my question is There is an activity registered in my manifest file which I don't have. So I delete those lines from my