Stuck on "Connecting to WiFi" screen while provisioning Android Lollipop device - android

I am trying to auto connect with WiFi when provisioning Android Lollipop device using below NFC tags:
p.setProperty(DevicePolicyManager.EXTRA_PROVISIONING_WIFI_SSID, "-----");
p.setProperty(DevicePolicyManager.EXTRA_PROVISIONING_WIFI_PASSWORD, "----");
It seems it is getting connected with WiFi but stuck on Connecting to Wi-fi... Screen and it is not finishing with provisioning process.
Can anybody guide me to resolve this issue?

You need to surround SSID with double quotes :
p.setProperty(DevicePolicyManager.EXTRA_PROVISIONING_WIFI_SSID, "\"my SSI\"");

To make it work I had to set the also the flag android.app.extra.PROVISIONING_WIFI_SECURITY_TYPE.
Specify only the two EXTRA for SSID and PASSWORD as stated in the docs isn't enough. Probably the default security type remains NONE.

Yes, it's broken in L MR0 (Android 5.0).
However, it's my experience that it has been fixed in L MR1 (Android 5.1).
It works for us now (I work at Sony Mobile).
The fix went into ManagedProvisioning git:
https://android.googlesource.com/platform/packages/apps/ManagedProvisioning/

I've tried several things without success. The feature seems broken.
You should probably enter the WiFi info manually.

Related

Intermitent SSL_PROTOCOL_ERROR when using Android hotspot

When browsing the internet using the Wi-Fi hotspot of my Android phone (Xiaomi Redmi Note 10 Pro), some requests fail with the following error: net::ERR_SSL_PROTOCOL_ERROR
Here is a screenshot of the error I'm getting in Chrome for Mac OS:
I noticed that it is happening only on specific websites (I have no issues on Stack Overflow for example).
This seems to be happening regardless of the LTE network quality.
I tried using the Wi-Fi hotspot from another phone, and everything is working as intended.
Anybody have an idea on how to debug this issue?
Thank you
I fixed the issue, turns out the default APN was not correctly configured.
I re-configured my APN with the config given by my phone provider (for Orange in France, the config is here: https://assistance.orange.fr/mobile-tablette/tous-les-mobiles-et-tablettes/installer-et-utiliser/se-connecter-et-parametrer-un-reseau/se-connecter-a-un-reseau-mobile-3-4g/comment-ajouter-un-point-d-acces-internet-apn-sur-votre-mobile-xiaomi-sous-android-_321636-856633)

Ping doesn't work on Samsung Devices

I wanna use a library from GitHub named "Android Network Tools", but actually I have a complex issue when using that. I tested the ping of this library on different type of devices and Android versions, and it worked correctly and was perfect, but when I tested it on my Samsung Galaxy S8 with android 8 I saw pinging external IP(like google.com) didn't work! at the first, I thought it happens in Android 8 and tried to solve it, but I launched it in Android 8 with the emulator that was ok! after that, I decided to test it on my friend's Samsung J7, you can guess that what happened, it didn't work again!
Right now, I'm really really confused because of I don't know why it happens just on Samsung devices, do you have any idea?
The problem is not with your code , the problem is occurring because of Device manufacturers They change the Os according to there need which causes issue with ping , see
Why does ping works on some devices and not others?
Finally, I found the problem, this was about control running apps in the background! when that feature be enabled some methods and ping doesn't work correctly in real-time.
power saving mode
Yes this is correct. With any power saving mode active, on at least some Android o/s versions, ping will not function. I'm guessing icmp echo reply packets are dropped. A sniffer app would confirm this. It is possible icmp echo (outbound) packets aren't even generated. Crazy in my view. Most ping utilities are very lightweight and I would have thought consume minimal power. I'm running a Samsung J5 / Android v.7.0. Ping started working once I disabled power saving mode

Android device requires PIN code after running CTS

I ran CTS PLAN and after it finished, I saw that my Android device asked me enter a PIN code to access the device. However, I didn't set a PIN to lock the device, and I don't know which PIN I'm supposed to provide.
This problem happened to me on 2 more Android devices when I ran CTS on them.
I tried some passwords but they have not solved this.
I'm looking for a solution to this problem, but can't find any other mention of this problem.
NOTE: I ran CTS with a script, but has it really change something?
I had same issue,I entered pin as 12345.It's worked for me try from your side and let me know

Selected Device Incompatible - Android Studio

I have fixed this problem before but I can't now and I need a permanent fix. Everything has been going fine in Android Studio when it comes to testing my app. I now run into the problem "The selected device is incompatible." when I go to run the app. I'd like to know how I can keep it from reading my phone's API as 1 rather than changing my minSDK to cater to this problem, if possible.
EDIT: Literally just found a fix, not sure if it is permanent. I just restored my defaults in Development Options, turned USB Debugging off and on again and that did the trick.
All I had to do was turn off USB debugging, then turn it back on and it worked immediately. I didn't have to reboot or change any other settings.
Not sure if this helps. I had a similar issue using my MotoG 2nd generation with Android Studio on Ubuntu. I switched the settings as how my phone was connected from MTP to PTP. That worked for me.
I had a very similar issue,
Usually whenever I connect the android device for usb debugging, the device will prompt me asking for the permission from to access from the development PC
In my case, for some reason, I didnt get this prompt and hence, I got this error. I have turned off developer options & USB debugging, turned on again. Then, I got the prompt and the issue is solved

Android Wifi Direct inter-workability between ICS and JellyBean

I was testing WiFi Direct on my Android Devices. I have a Galaxy Note running 4.0.4, and a Nexus 7 running 4.2.1. I followed exactly from the official API on WiFiDirect.
After the devices found each other, if I try to make them "connect", I'll be able to see an invitation of WifiDirect connection, but after I "accept" this invitation, the status of this device changed to "invited", while on the other device (which sent the invitation initially) got no response. Thus a wifi-direct connection can never be made among the two device.
I then tried the official Wifi-Direct Demo program... but it doesn't seems to work also.
After I rooted my Galaxy Note and upgraded it to 4.1.2, this problem disappeared.
But I wonder if anyone encounter same problem as I did? And if so how did you solved it?
Thanks a lot.
To find the exact reason you have to look at the log report of wpa_supplicant(this can be seen from the log report using android debug bridge(adb) available in adt bundle with eclipse # http://developer.android.com/sdk/index.html ).
I have faced a similiar problem while trying to connect androd 4.0 tablet with ubuntu laptop.The problem was with the dhcp server which was supposed to assign an IP address after the Group negotiation is successful but it wasn't respondig may be due to difference in the versions or some other reason.This wasn't a bug with wifi direct.
I fixed it by assigning a static IP address to the p2p_wlan0 interface on both the devices.

Categories

Resources