Android BLE Scan unstable 6.0.1 - android

I am using Android 6.0.1 and I am facing BLE Scan issue. The problem is sometimes the scan results return no device and sometimes it returns device. It means I have a remote device by name 'A'. 'A' is discovered and shown in my app once and again after few seconds, 'A' disappears in my discovered window and again re-appears after few seconds. This is the problem which I am facing in Samsung S5. But the same app running in Samsung S6 and S7 works fine with scanning.
I have given necessary permission for Location Services too and my GPS is ON. What could be the problem stil?

Related

FusedLocationProviderClient.requestLocationUpdates not working on physical device

FusedLocationProviderClient.requestLocationUpdates() is working fine on the emulator but not working, I mean onLocationResult() callback is not getting called, on a physical device (i.e. on my Moto G4 Play). I can't figure out why

Sticky service not restarting on OnePlus 2

I have a background service that handles network traffic for my app. The service returns START_STICKY and it works perfectly (restarts after app is swiped) on Emulated Google Pixel (Android 7.1.1) and on a physical Motorola G4 (Android 7.0).
However, when I test the same app on my OnePlus 2 (Android 6.0.1 - my main driver), the service just disappears when the app is swiped away without any trace or restart attempt...
If anyone has any ideas or suggestions I'd love to hear them.

Android Studio Bluetooth LE gatt sample scan finds RN4871 on samsung galaxy 3 & alcatel fierce XL, but cannot on both of my HTC 's

I have compiled and signed the sample and it scans and connects flawlessly to the Microchip RN4871 on the Samsung Galaxy 3 & Alcatel Fierce XL. However, the scan does not find the RN4871 on either of my HTC's.
The HTC's can see the RN4871 in the settings -> Bluetooth menu, and will pair.
Even after this, the app still fails to find the device when it scans.
I plan on trying to get the mac address from the list of paired devices and trying to connect that way.
What kind of device specific issue could I be running into?
ANSWER: wow that was fast, but I had to turn on location services under setting->apps->"app name" then turn on location services

Android - Connecting Android Phone and Gain Span Module

I am connectiong a Gain Span wifi module to an android phone and I need the android phone connected as the Group Owner. Currently I am starting the group negotiations from the device that has the Gain Span module connected.
This works with devices such as the Nexus 5, Samsung Galaxy s2 and Samsung Galaxy s4. But when trying this with a Nexus 6p it fail all of the time. I currently thing that the issue I am having is the group owner intent on the Nexus 6p is set by default wierdly low and I need to change it before the GainSpan module initiates the group formation.
Problem is I can't seem to find a way of doing this so I still don't know for sure this is my issue.
Edit (13/10/2016):
Now thinking that the issue isn't with the GO intent. I am currently initiating the group negotiations from the gain span module using the commands:
at+p2ppd=mac,0
at+p2pgrpform=mac,listenChan,0,,1,0,0
I would prever to initiate this from the phone side as currently I have to hard code the name of the device to ensure the correct phone is connected to. This means I need to respond to a 'p2p-prov-disc-req' response from the GainSpan side, but I am unsure of how to do this. The programmers user guide says that the correct reponse is the command 'at+p2pprovok' but still im unsure of what else needs to be done.
Also I realise that the question has changed now but still open solution to the original problem. Also I have realiszed the s2 connects every time and it takes allot of attempts to get the s4 to connect and the nexus 6p doesn' connect.
Edit (14/10/2016):
Ok solved the 6p issue, it was because the 6p was connected to a via wifi to my office network. Problem is the other phones where connected to the same network and worked. Any Ideas why only the 6p would behave this way.
Per the documentation, the higher the number, the higher the odds that you will be the group owner, however this might not be 100% sure. Has the group information been persisted on the phone? Check the WiFi Direct settings on the phone and see if the group has been saved. If so, delete it and try to connect again, specifying the highest number possible.
You can edit the values of your Wifip2pConfig object. Including the groupOwnerIntent
Right ive managed to get it working on the 6p, problem is I had to disconnect it from the office wifi for it to connect. The 6p must do something wierd when being connected to network as the Galaxy s2(which worked always) was connected to the same network and so was the Galaxy s4(which worked some of the time).
So I have solved the problem but it would be more convienient if I could connect to both the internet(WiFi) and the GainSpan Module(WiFiDirect). Any Ideas why this only caused an issue on the 6p.

android 6.0.1 bluetooth list of devices

I tried a bluetooth code to show bluetooth devices and making connection in android and it worked in android 4.4.2 very well. when running the same app in android 6.0.1 (Samsung Note 5) it doesnt show list of devices and only asks for bluetooth only one time. How can I fix this problem?

Categories

Resources