Questions tagged [google-awareness]

A unified sensing platform enabling applications to be aware of multiple aspects of a users context, while managing battery and memory health.

Google's Awareness API unifies 7 location and context signals in a single API, enabling you to create powerful context-based features with minimal impact on system resources. Combine optimally processed context signals in new ways that were not previously possible, while letting the API manage system resources so your app doesn't have to.

76 questions
0
votes
1 answer

Google Awareness API cannot register location fence (Fence API) Kotlin

Ive been trying to use Google Awareness API (Fence API) and I can register every other kind of fence - headphones, walking- and my broadcast reciever that handles callbacks from fence state changes is working but keep getting…
0
votes
1 answer

Awareness API is failing with status code 12

We are facing the below issue with Google Awareness API java.lang.SecurityException: Invalid API Key for package = com.mypackage. Status code received = 12 at android.os.Parcel.createException(Parcel.java:1966) at…
0
votes
1 answer

How accurate is Android's Activity/Transition recognition for trains?

I'm developing an application that should be able to detect when a user has got on a mode of public transport, such as a train or bus. I've seen the Activity and Transition API made by Google, but all of the references to the "IN_VEHICLE" activity…
0
votes
2 answers

Android - Get notified when near BLE device

I need my app to get notified when it is in range of a specific BLE device. Once in range, I want to connect to the device and send data to it. Approach 1: Periodic BLE scans at some interval (i.e. every 30 seconds). However, this would not be good…
Ivan Stalev
  • 303
  • 1
  • 3
  • 11
0
votes
1 answer

Best way to use TriggerEventListener in the background?

I'm looking to make an application that runs in the background, logging location data without the user actually having to have the application in the foreground but at the same time doesn't use too much battery. I originally thought of setting a…
TobRod
  • 61
  • 3
0
votes
0 answers

Snapshot API - ResultCallBack not triggered

I am using the Google Snapshot API in Android. I use this code to get the user's activity and store it to Firebase. //Get user's current activity private void myCurrentActivity(final String timestamp) { if (checkPermission()) { …
Michalis G.
  • 21
  • 1
  • 6
0
votes
0 answers

Set the value of textview out of Awareness.SnapshotApi.getWeather

I want to set the value of my textView out of the block Awareness.SnapshotApi.getWeather,but it's not working. Everytime I set the value at the marked area program crashes. I also want to know, how can I call getWeather() from another…
0
votes
1 answer

Google Awareness Location Fence is not working

I tried using Google Awareness API for Location Fence: https://medium.com/exploring-android/exploring-the-new-google-awareness-api-bf45f8060bba But it's not working all times, is there any special trick?
AVEbrahimi
  • 17,993
  • 23
  • 107
  • 210
0
votes
1 answer

Getting location with the Google Play Services Location API vs getting it with the Awareness API

I've read many good comparisons between Android's framework location API and the Google Play Services Location API. However, is there any benefit in using (exclusively to obtain location) the Google Play Services Awareness API over the Google Play…
diazdeteran
  • 1,144
  • 1
  • 13
  • 25
0
votes
1 answer

Combine Weather state with User Activity state

I have a use-case wherein a notification will be issued when the weather is sunny, user activity is walking and there's also a particular location. How should i go about combining these three conditions? I know that we can use AwarenessFence.and()…
div
  • 1,475
  • 3
  • 22
  • 32
0
votes
1 answer

Minimum SDK version when using Google Awareness API?

Just knew about Google's new Context aware popularly known as Google Awareness API , What should be the minimum version when using Google Awareness API? Are there any restrictions or precautions should be taken when using it?
TapanHP
  • 5,969
  • 6
  • 37
  • 66
0
votes
2 answers

Google Awareness Snapshot.getLocation SecurityException is thrown

I know this seems like a duplicate of (Google Awareness API SecurityException is thrown) and it probably is but since my stackoverflow mojo isn't great enough I can't vote the question up or add comment and this is definitely not an answer. So I…
0
votes
1 answer

Always getting ON_FOOT from Google Awareness API Detection Activity. How to get sub-activity WALKING?

I am using the class DetectedActivity from the Google Awareness API. When I walk or run, I always get the response ON_FOOT. For example, when I am just walking, I want to get back WALKING only but I still get ON_FOOT. I do see the following note in…
user1406716
  • 9,565
  • 22
  • 96
  • 151
0
votes
3 answers

Google Awareness API cannot register fence on emulator

I try to update fence using following code: AwarenessFence locationFence = LocationFence.entering(latitude, longitude, radius); Awareness.FenceApi.updateFences( mGoogleApiClient, new FenceUpdateRequest.Builder() …
RMK
  • 1,897
  • 1
  • 10
  • 17
0
votes
1 answer

HeadphoneFence.unplugged in the Google Awareness API fires regardless of the state

I am using a Nexus 5X phone and trying out the Google Awareness API HeadphoneFence.unplugged() https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/HeadphoneFence I found that it fires my pending intent when the…
Herman
  • 1,882
  • 3
  • 14
  • 17