Questions tagged [activity-recognition]

Activity recognition tries to detect the user's current physical activity, such as walking, driving, or standing still.

Location Services sends out activity information containing one or more possible activities and the confidence level for each one.

Mark a question with this tag if the problem you have involves the use of Location Services and its receiving its PendingIntent or the implementation of FragmentActivity

From the Android.com site

208 questions
1
vote
0 answers

RequestActivityUpdates takes way longer than detection interval

I'm currently developing an app that uses the activity recogition api. I have a main activity and an intent service which is called using requestActivityUpdates() and returns data for the activity using the broadcast api. According to the…
arvere
  • 727
  • 1
  • 7
  • 21
1
vote
1 answer

Android - get ActivityRecognition service values back to MainActivity

I’m working with the ActivityRecognitionClient class to get the data of the User’s activity whether he walks, runs or on bicycle etc… The thing is that working with PendingIntent, so I’m able to start the PendingIntent, and in the function…
Asaf Baibekov
  • 313
  • 1
  • 5
  • 15
1
vote
1 answer

Is ActivityRecognitionApi or ActivityRecognitionClient deprecated?

In the Google APIs guide, it says ActivityRecognitionApi is deprecated. [15 Oct 2017] So, I tried to use ActivityRecognitionClient. When building the project following error jumps. cannot find symbol import…
1
vote
0 answers

Problems setting up Activity Recognition [Android]

I want to use Activity Recognition API provided by google play services but I have problems in doing so. First I'm not able to find and updated guide that works for me so I made something similar to the "official" example on github witch is working…
1
vote
0 answers

activity recognition android stop when restart device

I using activity recognition in service to check action of user. method ActivityRecognitionResult inside onStartCommand with START_STICKY. every thing work when device running, but when device restart activity recognition not restart. How I can make…
Tiny Dragon
  • 71
  • 2
  • 8
1
vote
1 answer

How to get the steps from activity recognition (Combine ActivityRecognitionApi with SensorEventListener)

I am using Google ActivityRecognitionApi for Android to know when an user is walking, running or cycling. Is there a way to get the steps that the user executed while practicing each of those activities? I am doing the activity recognition on the…
Belen
  • 13
  • 5
1
vote
1 answer

Does Google ActivityRecognitionApi IN_VEHICLE use GPS

My requirement is to detect if a person is driving. I am a bit confused with the Google ActivityRecognitionApi documentation. Does "IN_VEHICLE" mean that the vehicle is in motion or can it be a stationary as well. Does Google ActivityRecognitionApi…
1
vote
0 answers

Create Background service that Update Locations based on User Activity

I am implementing a background service that updates the location based on the user's activity i.e if user is still it updates location after every 15 minutes and if user is moving it updates location after every 1 minute. I have created one…
1
vote
1 answer

ActivityRecognition on Android Wear

I am developing Android Wear app that uses activity recognition to see if a user(office worker) have been in a still position for a certain time (if the user have been on their desk for too long), if so, it pushes notification, telling user to take…
user3210182
1
vote
0 answers

Activity Recognition API for Android wear or other Java open source API

We are using Google Activity Recognition tools, i.e. Google Play Services and Google Fit for our Android Wear app. Google changes its API frequently, with no backward compatibility, every couple of months we should change our code. I would like to…
1
vote
1 answer

How to start Google API - ActivityRecognitionAPI using BroadcastReceivers on device boot?

I have used this API using Activities and it works. I tried starting MainActivity using this BroadcastReceiver and it works. But when I try this, it crashes my App. Do I need to add flags to intent? How to do that in this case? I tried these codes…
1
vote
3 answers

Handling ActivityRecognition.API intents while app is inactive

I'm looking for the general design to implement this: I want to register to the ActivityRecognition API to receive regular updates in a IntentService called from time to time by this API, while everything else in my App is completely inactive (the…
JBA
  • 2,889
  • 1
  • 21
  • 38
1
vote
2 answers

'Activity Detection API' Get current activity only once

I have successfully set up activity recognition tracking but it requires using an interval for activity updates. ActivityRecognition.ActivityRecognitionApi.requestActivityUpdates( googleApiClient, updateInterval, …
G-J
  • 401
  • 7
  • 17
1
vote
1 answer

Difference between Google Fit API and ActivityRecognitionAPI

I'm studying how to get the user activity from the android sensors and I have a question... Whats the difference between Google Fit API and AcitivityRecognitionAPI ? The Google Fit API is newer so it's better than ActivityRecognitionAPI? There's no…
1
vote
0 answers

Activity Recognition does not work in Android For Work

I have an app which requests activity updates via the ActivityRecognition API. When I load it on a device with Android For Work, the work version of the app never gets activity updates, but the personal version works fine. I'm checking the result…
MahlerFive
  • 5,159
  • 5
  • 30
  • 40