I have followed the ten steps outlined in the Hello Beacon app tutorial at https://codelabs.developers.google.com/codelabs/hello-beacons/. There are no errors being thrown up during build. The only issue is that the virtual beacon (using Beacon Simulator app) is not detected by the Hello Beacon app. I know the problem is not with the beacon simulator because it gets detected by the beacon tools app by Google.
I don’t think there is any issue with the code because I have followed the tutorial exactly without deviation. However there are a few areas in the code and in the google developers console where parameters have to be defined. I suspect this could be causing the issue:
I am not sure if I have defined "some_namespace", "some_type" correctly.
SubscribeOptions options = new SubscribeOptions.Builder() .setStrategy(Strategy.BLE_ONLY) .setFilter(new MessageFilter.Builder() .includeNamespacedType("some_namespace", "some_type").build()) .build();
Here are a few parameters I tried –
“beacon-proximity-app”, “impdata”
“a72d91966ecd43888771”
(from the Beacon Simulator app),“beacon-proximity-app/imdata”
(from Beacon Tools app)“beacon-proximity-app/impdata”, “”
“beacon-proximity-app”, “string”
“a72d91966ecd43888771”
(from the Beacon Simulator app),“beacon-proximity-app/string”
(from Beacon Tools app)
I also tried implementing the code with and without -
.setFilter(new MessageFilter.Builder()
.includeNamespacedType("some_namespace", "some_type")
.build()
- I am not sure where to run the command to generate the SHA1 fingerprint because I don’t completely understand its purpose. I have tried generating it from the .android folder, hello beacons folder and the JRE bin folder
Google Developers Console - SHA1 fingerprint / API Key
I have placed the API key created at Google Developers Console in the Android Manifest file at:
<meta-data android:name="com.google.android.nearby.messages.API_KEY" android:value="API_key_placed_here" />
I am not sure if that is the only place the API key needs to be placed.
I would appreciate any help from the community to resolve this issue.