activity-recognition

The interval of results from Google's activity recognition isn't regular

若如初见. 提交于 2020-01-14 14:06:03
问题 I was working on google's activity recognition and finally I got results from this service. However, The function requestActivityUpdates(long detectionIntervalMillis, PendingIntent callbackIntent) doesn't seem to work correctly. The detection interval is not regular and decreases to 30~50 seconds when my current activity is changing. It doesn't work like the live demo on google I/O 2013 (Google I/O 2013 Location API, from 27:47 to 28:45). Does anyone have same issue on it? 回答1: Well it's a

Activity Recognition not work after “wifi & mobile network location” is turn off and turn on [closed]

孤街浪徒 提交于 2020-01-01 09:23:22
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I'm using Activity recognition to detecting user activity. I found a strange behavior, after I turn off and turn on "WiFi & mobile network location" the application did not get any activity recognition updates. After restarting the phone, the application is getting update from

Activity Recognition not work after “wifi & mobile network location” is turn off and turn on [closed]

空扰寡人 提交于 2020-01-01 09:23:04
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I'm using Activity recognition to detecting user activity. I found a strange behavior, after I turn off and turn on "WiFi & mobile network location" the application did not get any activity recognition updates. After restarting the phone, the application is getting update from

Android ActivityRecognition java.lang.NullPointerException: Appropriate Api was not requested

旧城冷巷雨未停 提交于 2019-12-30 18:46:37
问题 I'm attempting to follow Google's Activity Recognition example. In the example they start the activity recognition when you click a button, however I'd like to just start it up when the app starts - so I tried putting it in the onConnected method. However, it ends up throwing a null pointer exception. Here's how I'm calling it: @Override public void onConnected(Bundle connectionHint) { Log.d(TAG, "onConnected"); try { ActivityRecognition.ActivityRecognitionApi.requestActivityUpdates(

Android - GoogleApiClient ActivityRecognitionIntentService is never called

佐手、 提交于 2019-12-24 22:13:07
问题 I need to detect user dynamics in my application. I started by using GooglePlayServicesClient which till three months ago worked perfectly, Then it stopped working on my HTC one device (although it was still working on three different devices I've checked). I know it is now replaced by GoogleApiClient, so I thought this was my problem, but it keeps not working even after changing to the new API. The problem is that the intent given to ActivityRecognition.ActivityRecognitionApi

Imported Project in Android Studio can't resolve ActivityRecognnitionClient

Deadly 提交于 2019-12-24 21:09:13
问题 I imported a project from Eclipse to Android Studio. It uses Activity Recognition and Location Services. Now, this Android Studio project can resolve : 1) GooglePlayServicesClient (com.google.android.gms.common.GooglePlayServicesClient) and even 2) DetectedActivity (com.google.android.gms.location.DetectedActivity) but can't resolve ActivityRecognitionClient (com.google.android.gms.location.ActivityRecognitionClient). What might be the issue? 回答1: I think you are not including Google play

Activity Recognition using new GoogleApiClient not firing Activity Updates

久未见 提交于 2019-12-24 12:22:31
问题 I am trying to set up ActivityRecognition in my app using the new GoogleApiClient. I couldn't find any documentation anywhere (Official android docs still refer to the now deprecated ActivityRecognitionClient). The code that I managed to write is not triggering Activity Updates. 1) Inside my MainActivity's onCreate : mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(ActivityRecognition.API) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build();

Activity Recognition API

孤人 提交于 2019-12-20 08:49:45
问题 Anyone have trouble with the Activity Recognition API in the recent Google Play Services update? I have it implemented in an app. It was working perfectly fine before the 5.0 update. Now it returns IN_VEHICLE when the user is walking or sitting still. :/ And doesn't return WALKING , RUNNING or ON_FOOT at all. Were there any changes to the Activity Recognition API I should be aware of? Let me know if you need any more details. 回答1: The WALKING and RUNNING activities come in as secondary

Android Activity Recognition not working with Nexus 5

懵懂的女人 提交于 2019-12-20 05:48:12
问题 I had a code working that was using Google's Activity Recognition Updates. Now all of a sudden these seem to send updates either several times per second or never although requested every 20 seconds. I haven't changed the code and checked earlier versions but got the same problem. I built a minimal example from the tutorial but also get no activity updates with my Nexus 5 device. With my HTC Desire (MildWild 5.0 based on Android 2.3.7) it works perfectly fine. I suspected Google Play Services

Activity Recognition PendingIntent stop been called in the middle of the night

眉间皱痕 提交于 2019-12-18 17:34:36
问题 my application collects periodically Activity Recognition's Detected activity data. I implemented it exactly as described in the documentation , but with one minute interval. as long as the user is logged in - the application registered with a PendingIntent to receive updates from google play process.. please not lecture me about battery usage, network, and performance problem derived from request updates each minute, unless it have something to do with my problem: the problem: in some