google-nearby

Google Nearby Messages - Cancel initial link between devices

旧街凉风 提交于 2019-12-01 12:55:39
I'm building a app to test Google Nearby Messages API. For that test, I'm using DISTANCE_TYPE_EARSHOT. According to this thread Nearby API's Strategy.DISTANCE _TYPE_ EARSHOT doesn't seem to restrict message proximity , after the initial link between devices, they can receive messages for 10 minutes regardless of distance. I would like to know if this 10 minute limit can be interrupted (in order to prevent that a device can receive a message when its distance to another device is more than ~5ft - EARSHOT). Alternatively, is there a way to get the distance between devices? Thank you. (I work on

Google nearby API background scan doesn´t work after application kill

為{幸葍}努か 提交于 2019-11-30 22:01:27
I have kontakt.io beacon and I try to write application for background scanning with nearby API. I use this method to subscribe messages: SubscribeOptions options = new SubscribeOptions.Builder() // Finds messages attached to BLE beacons. See // https://developers.google.com/beacons/ .setStrategy(Strategy.BLE_ONLY) .build(); Nearby.Messages.subscribe(mGoogleApiClient, getPendingIntent(), options) .setResultCallback(new ResultCallback<Status>() { @Override public void onResult(@NonNull Status status) { if (status.isSuccess()) { Log.i(TAG, "subscribed successfully"); mSubState = SubState

Be able to send Messages/Bytes Simultaneous to multiple devices using Nearby Connections

北慕城南 提交于 2019-11-30 16:56:15
To try out the nearbyAPI, I decided to build an app that would allow a teacher to track attendance of student in a class. Similar to what Caren Chang is doing. I have gone through the google sample codes on rockpaperscissors and walkietalkie But only a single device seems to connect at any one time when i test the samples using 4 phones. I want to build a teacher and student app which the teacher advertises and discovers students, sends payloads to each and every connected device simultaneously as more devices become connected in a classroom set up. How can i use nearby api to connect and send

Nearby Connections 2.0: Both sides request connections, but don't successfully connect

*爱你&永不变心* 提交于 2019-11-30 15:54:20
I'm trying to use the new Android Nearby Connections v2.0 API with the P2P_CLUSTER connection strategy. The following problem (in which both devices request connections, but don't successfully connect) seems to occur on a variety of devices running Android K-N. Sometimes the code gets a successful persistent connection... Sometimes it doesn't. In this scenario, both sides are advertising and discovering, both sides discover each other, and both sides send connection requests (but connection is not initiated). It's difficult to make this situation happen reliably with a specific test case, but

Location requirement to scan for BLE devices

不问归期 提交于 2019-11-30 05:43:26
问题 BLE scanning faced a remarkable difference Marshmallow onwards with the requirement of location of device to be ON. Technically, I don't see a valid reason why location would be required to scan for BLE devices. Why has this been done by Google? 回答1: Q: Why has this been done by Google? A: Because BLE scanning is commonly used to determine a user's location with Bluetooth LE beacons. I discussed this with Google engineers at a Q&A session at Google I/O 2015 when the change was still not

Be able to send Messages/Bytes Simultaneous to multiple devices using Nearby Connections

ⅰ亾dé卋堺 提交于 2019-11-30 00:32:08
问题 To try out the nearbyAPI, I decided to build an app that would allow a teacher to track attendance of student in a class. Similar to what Caren Chang is doing. I have gone through the google sample codes on rockpaperscissors and walkietalkie But only a single device seems to connect at any one time when i test the samples using 4 phones. I want to build a teacher and student app which the teacher advertises and discovers students, sends payloads to each and every connected device

Nearby Connections 2.0: Both sides request connections, but don't successfully connect

ぐ巨炮叔叔 提交于 2019-11-29 22:28:02
问题 I'm trying to use the new Android Nearby Connections v2.0 API with the P2P_CLUSTER connection strategy. The following problem (in which both devices request connections, but don't successfully connect) seems to occur on a variety of devices running Android K-N. Sometimes the code gets a successful persistent connection... Sometimes it doesn't. In this scenario, both sides are advertising and discovering, both sides discover each other, and both sides send connection requests (but connection

Find Eddystone Beacons using Nearby Google API

孤街醉人 提交于 2019-11-29 12:46:52
I attached data to Eddystone Beacons using The Proximity Beacon API. I want to fetch the Beacon attachments using Nearby Messages API. I followed the steps mentioned at https://developers.google.com/nearby/messages/android/get-beacon-messages . But I am not able to read Beacon attachments. The onFound() method is not getting called Check the following... Set a callback on the response to subscribe and call startResolutionForResult on the Status object if the Status was APP_NOT_OPTED_IN . See github example Make sure you've enabled the Nearby API in the Developer Console for your app. Step 3

How to show both MarkerIcon and Title in google map as like Google Apps?

耗尽温柔 提交于 2019-11-29 10:02:10
When I find nearest restaurants in Google's Maps Android Application the restaurant name is showing near to marker icon as default. (Refer Google Image). But in my application I need to do same when I search for nearest restaurants, I able to display only marker icons. (Refer My Application Image). Google Image: My Application Image: Partial Solution : Here I found partial solution for this we get this by drawing a text using canvas. I used below code refer by these links here and here But canvas drawing cutting of my text. Refer attached image TextDrawn Image Marker myLocMarker = map

Find Eddystone Beacons using Nearby Google API

£可爱£侵袭症+ 提交于 2019-11-28 06:10:53
问题 I attached data to Eddystone Beacons using The Proximity Beacon API. I want to fetch the Beacon attachments using Nearby Messages API. I followed the steps mentioned at https://developers.google.com/nearby/messages/android/get-beacon-messages. But I am not able to read Beacon attachments. The onFound() method is not getting called 回答1: Check the following... Set a callback on the response to subscribe and call startResolutionForResult on the Status object if the Status was APP_NOT_OPTED_IN .