Git Product home page Git Product logo

hello-beacons's Introduction

Hello Beacons Codelab

This folder contains the source code for a Google I/O 2016 codelab.

License

Copyright 2016 Google, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership. The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.

hello-beacons's People

Contributors

mco-gh avatar shailen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hello-beacons's Issues

Step 7: MessageFilter.Builder() error

I'm following the tutorial from here:
https://codelabs.developers.google.com/codelabs/hello-beacons/#6

But after following it step by step I'm getting an error on this line:


                .setFilter(new MessageFilter.Builder()
                        .includeNamespacedType("some_namespace", "some_type")
                        .build();

Error:

/Users/xxxxx/AndroidStudioProjects/hello-beacons/HelloBeacons-Subscribe/app/src/main/java/com/google/android/gms/nearby/messages/samples/hellobeacons/MainActivity.java
Error:(198, 33) error: ')' expected
:app:compileDebugJavaWithJavac FAILED
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

Subscription state is not stored on rotation

On '7. Subscribe to beacon attachments using Nearby' section it is highlighted that we create mSubscribed field to 'not bother replacing that subscription with a new one.'. Appropriate filed is created, stored on rotation and checked before create a subscription. But it is actually never set to true. I think, we should set it up on ResultCallback callback:
@Override public void onResult(@NonNull Status status) { if (status.isSuccess()) { Log.i(TAG, "Subscribed successfully."); mSubscribed = true; startService(getBackgroundSubscribeServiceIntent()); } else { Log.e(TAG, "Operation failed. Error: " + NearbyMessagesStatusCodes.getStatusCodeString( status.getStatusCode())); } }

HelloBeacons-Subscribe issue

the correct method:

SubscribeOptions options = new SubscribeOptions.Builder() .setStrategy(Strategy.BLE_ONLY) // Note: If no filter is specified, Nearby will return all of your // attachments regardless of type. You must use a filter to specify // a particular set of attachments (by type) or to fetch attachments // in a namespace other than your project's default. .setFilter(new MessageFilter.Builder() .includeNamespacedType("some_namespace", "some_type") .build()) .build();

continous scans for beacons in the foreground not working

when i turn on the app if within a few seconds (maybe 10sec) it tries to find beacons but after that even if i turn off the beacon or turn on new beacons there is no response from the app . Unless i exit to main screen(home screen) and turn on the activity again is when the changes to beacons are detected. Is there some issue with the code or is it hardware. I have followed the code lab to the end. I use nexus 7 2013(android 6) for the app. And beacon simulator on moto g4 (android 7)

Wrong codelab step description

On the step 9 it is stated that we should

open HelloBeacons-Display-Messages.

but really in this step we are working with 'HelloBeacons-Finished' project

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.