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
6
votes
1 answer

difference b/n on foot and walking in activity recognition

In Android 4.4 google play services introduced "walking" activity Recognition but there is already on_foot recognition. What is the difference between the both?
Niranjan
  • 1,879
  • 2
  • 22
  • 28
6
votes
3 answers

How to use Activity Recognition to detect walking/running vs on_foot

In Google Play Services Activity Recognition there is DetectedActivity.RUNNING, DetectedActivity.WALKING, DetectedActivity.ON_FOOT when ever I get an activity update for either walking or running I get ON_FOOT how do I differentiate? I know it…
Barrie Galitzky
  • 1,166
  • 12
  • 14
5
votes
1 answer

Android Transitions API - stops receiving any updates after 24-48 hours

I'm using Transitions API and everything works fine for the first 24-48 hours - I receive physical activity changes from the API, but after 24-48 hours there's nothing. Under Transitions API Receiver, I use Foreground Service that is still alive…
MaaAn13
  • 264
  • 5
  • 24
  • 54
5
votes
1 answer

Android ActivityRecognition and IMMUTABLE PendingIntent

I am working with Android ActivityRecognition api. When setting the PendingIntent flag to be PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE (as recommended?) the received intent doesn't contains any extras. Here is how I use…
Moti Bartov
  • 3,454
  • 33
  • 42
5
votes
5 answers

Activity Transition API not working

I wish to use the new Activity transition API and after following the tutorial here I am not able to get the desired result. This is the code I have for setting the activity transition I wish to detect : public void setActivityTransitions() { …
5
votes
2 answers

android ActivityRecognition not calling onHandleIntent

I have put together this piece of code to get the users activity, to see is he walking or driving or still, but its not working, onHandleIntent never called. it is connecting to GoogleApiClient. Here is my code Activity Layout
Saqueib
  • 3,484
  • 3
  • 33
  • 56
5
votes
2 answers

Android Activity Recognition on Wearables

I'm researching ways on how to do activity recognition using an android smartwatch. Currently, I'm focusing on detecting whether the user is walking or standing still. My first idea was to use the built in step counter, but then I came across the…
Phil
  • 86
  • 4
5
votes
2 answers

Google Play Service Activity Recognition not working after switching Location mode to GPS and back

Our app is facing a strange problem after Google Play services updated to 4.1. We are using Activity Recognition in the Google Play services. If user changes Location mode to Device Only and back to Battery saving, Activity Recognition Client will…
5
votes
2 answers

Activity Recognition Api Not working in some devices

Does the location access have any dependency on activity recognition process? In some devices i could get my activity recognition sample working only after turning on my location setting
pablogeorge
  • 233
  • 1
  • 10
4
votes
3 answers

Getting 'ActivityRecognitionResult.extractResult(intent)' as null while trying to initiate Activity Recognition in android

I've been trying to get the data from the 'ActivityRecognitionResult.extractResult(intent)' but always getting null. I'm using 'JobIntentService'. And I'm using Sampling API of the activity recognition for the continuous background data. Attaching…
4
votes
0 answers

How exactly does google activity recognition work?

On the web, google documentation and other documents I can find only information related to its implementation. I'd like to know how does it exactly work. For example what sensors is it using, how does the machine learning thing was done, whats the…
Piodo
  • 616
  • 4
  • 20
4
votes
1 answer

Activity Recognition continues services in Oreo

I am breaking my head around it with no solution's so far. I seen many guides how to accomplish this (Documentation, Tutorial) and successfully made it happen in android 7. What I managed to do is successfully get notification with service running…
Dim
  • 4,527
  • 15
  • 80
  • 139
4
votes
1 answer

Which one of "requestActivityTransitionUpdates" and "requestActivityUpdates" does consume battery less than other?

There are two option to play activities in Android: 1st: Detecting the activity in specific time intervals: public Task requestActivityUpdates ( long detectionIntervalMillis, PendingIntent callbackIntent …
efkan
  • 12,991
  • 6
  • 73
  • 106
4
votes
0 answers

Android - Activity Recognition best practices

In my Android application, I want to display a notification only when the user is not moving or only slowly moving. For example, when a user is driving, I don't want to display notifications. To accomplish this, I've looked into the Activity…
Christian
  • 3,239
  • 5
  • 38
  • 79
4
votes
1 answer

Android Detect if vehicle moving

I'm working on an application similar to Uber, and we need to calculate the wait time if the vehicle stops moving (or moving I tried using GPS Location speed, but it doesn't seems to be helping. then we tried Activity recognition API that too is…
Aneef
  • 3,641
  • 10
  • 43
  • 67
1
2
3
13 14