google-awareness

Google Awareness API cannot register fence on emulator

荒凉一梦 提交于 2020-01-07 01:11:11
问题 I try to update fence using following code: AwarenessFence locationFence = LocationFence.entering(latitude, longitude, radius); Awareness.FenceApi.updateFences( mGoogleApiClient, new FenceUpdateRequest.Builder() .addFence(LOCATION_FENCE_KEY, locationFence, mPendingIntent) .build()) .setResultCallback(new ResultCallback<Status>() { @Override public void onResult(@NonNull Status status) { if (status.isSuccess()) { Log.i(TAG, "Fence was successfully registered."); } else { Log.e(TAG, "Fence

Android Things - can't use Awareness API

寵の児 提交于 2019-12-22 13:31:05
问题 I have the same code with a lower version (9.4.0) working on the phone but for some reason it won't work on RPi3? My build.gradle compile 'com.google.android.gms:play-services:10.0.0' provided 'com.google.android.things:androidthings:0.4-devpreview' The manifest permissions <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.INTERNET" /> The method private void getWeather() { // Check for permission first if

Google Awareness API SecurityException is thrown

那年仲夏 提交于 2019-12-20 11:08:38
问题 I'm using DetectedActivityFence from Google Awareness API. It's working fine on my own devices, but I received a several crashes in Crashlytics about SecurityException . Fatal Exception: java.lang.SecurityException: Invalid API Key for package = [package_name] .Status code received = -1 at android.os.Parcel.readException(Parcel.java:1540) at android.os.Parcel.readException(Parcel.java:1493) at com.google.android.gms.common.internal.zzu$zza$zza.zza(Unknown Source) at com.google.android.gms

Receiving error when trying to connect with Google Awareness services

泄露秘密 提交于 2019-12-19 10:27:02
问题 I'm trying to work with google's awareness api, and register instance of GoogleApiClient to awareness api, but i'm receiving an error which i can't find anywhere. I've followed the manual, and enabled awareness services in the api consule. https://developers.google.com/awareness/android-api/get-started This is how my manifest looks like : <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.test.awarenesstests"> <uses

Awareness API always returning cloudy weather

喜夏-厌秋 提交于 2019-12-11 04:41:25
问题 I want to be able to check the weather in my Android app. I implemented it, but it seems to always be returning conditions: [2] and nothing else, despite the fact it has been raining for almost an hour now here. Here's what it's returning: Temp=67.0F/19.444445C, Feels=67.0F/19.444445C, Dew=58.0F/14.444445C, Humidity=71, Condition=[2] I'm testing this on Android v5.1 and yes fine location is in my manifest and turned on on my phone. <uses-permission android:name="android.permission.ACCESS_FINE

Google Play Services 9.2.0 Selective Compile Awareness API

南笙酒味 提交于 2019-12-10 09:41:27
问题 I'm trying to use the new Awareness API in an app but the only way that I can include it in my code is by using compile 'com.google.android.gms:play-services:9.2.0' in my gradle file. I tried using compile 'com.google.android.gms:play-services-awareness:9.2.0' but it doesn't seem to exist. Does anyone know what the correct compile path for selective compile of the awareness API is? Thanks in advance. 回答1: It actually does exist. //Awareness API compile 'com.google.android.gms:play-services

Google Awareness Api events while app isn't running

a 夏天 提交于 2019-12-10 04:34:05
问题 I would like either a BroadcastReceiver or IntentService (depending on how long my eventual processing takes) to start when a Google Awareness API "fence" fires. For example, perhaps I want to know how many times I activate a set of beacon fences over the course of the day (assuming I keep my phone with me). All the examples I've found show registering broadcast receivers in code, but my understanding is that I would need to register a broadcast receiver in the manifest in order for the OS to

Google Play Services 9.2.0 Selective Compile Awareness API

℡╲_俬逩灬. 提交于 2019-12-06 03:28:10
I'm trying to use the new Awareness API in an app but the only way that I can include it in my code is by using compile 'com.google.android.gms:play-services:9.2.0' in my gradle file. I tried using compile 'com.google.android.gms:play-services-awareness:9.2.0' but it doesn't seem to exist. Does anyone know what the correct compile path for selective compile of the awareness API is? Thanks in advance. It actually does exist. //Awareness API compile 'com.google.android.gms:play-services-contextmanager:9.2.0' Today you have to include: compile 'com.google.android.gms:play-services-awareness:10.2

Google Awareness Api events while app isn't running

自古美人都是妖i 提交于 2019-12-05 07:48:23
I would like either a BroadcastReceiver or IntentService (depending on how long my eventual processing takes) to start when a Google Awareness API "fence" fires. For example, perhaps I want to know how many times I activate a set of beacon fences over the course of the day (assuming I keep my phone with me). All the examples I've found show registering broadcast receivers in code, but my understanding is that I would need to register a broadcast receiver in the manifest in order for the OS to send the broadcast to it if my app isn't running. What's more, the intent ID appears to be a custom

Google Awareness API, Invalid API key, Crash

淺唱寂寞╮ 提交于 2019-12-04 03:42:44
问题 This is my first attempt at creating an android application. In trying to use the Awareness API provided by Google I receive a SecurityException in logcat, and the error: "Invalid API Key for package = com.example.android.project. Status code received = 12". Meaning, mGoogleApiClient.connect() causes the app to crash every time. Is there anyway to know what the status code means? [BaseServerTask]Server task (PingTask) got error statusCode=403. com.android.volley.AuthFailureError at com