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
45
votes
10 answers

Failed to crunch file - Android studio (app:mergeDebugResources)

i am currentyl trying to implement Google ActivityRecognitionApi. However i get following errors: Error:Failed to crunch file …
16
votes
1 answer

Is there an equivalent to Android's Activity Recognition API in iOS?

On the last Google I/O was introduced a new service in the Location API's in Android - Activity Recognition. Is there such a framework for iOS?
Nikolay Tsenkov
  • 1,128
  • 10
  • 26
14
votes
4 answers

Activity Recognition API

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…
DrkStr
  • 1,752
  • 5
  • 38
  • 90
11
votes
1 answer

The first transition is always the same - Activity Recognition API - Activity Transition

I use activity recognition api and activity transitions. When I first run the app, the first transition is always the. In this app it's WALKING-ENTER. When I tried with only IN_VEHICLE-ENTER and IN_VEHICLE-EXIT in transitions, it was…
ucanyiit
  • 172
  • 1
  • 11
11
votes
2 answers

Is it possible to simulate detected activities for the ActivityRecognitionApi for testing purposes?

Google Play Services provides an ActivityRecognitionApi that lets you detect various user activities (via DetectedActivity) such as if the user is walking or running. Is it possible to mock these activities for development and testing purposes?
AdamK
  • 21,199
  • 5
  • 42
  • 58
10
votes
3 answers

Simulate ActivityRecognition events in Android emulator

Is there a good way to simulate a DetectedActivity.IN_VEHICLE in an Android Emulator. Currently, I'm trying to get the ActivityRecognitionApi to detect an event by sending commands via telnet. sensor set acceleration {x}:{y}:{z} geo fix {latitude}…
Steven Wexler
  • 16,589
  • 8
  • 53
  • 80
9
votes
2 answers

Activity Recognition stops receiving updates when phone goes to standby(screen off state)

I am having some trouble with activity recognition. I have implemented it in an app and it works fine when the device's screen is on. I have a log entry in my Activity recognition intent service class and I can see when it gets an update.So, I know…
8
votes
2 answers

Unable to detect User activity transition , using broadcast receivers

I have used the Activity Transition API launched by Google recently to detect when a User gets in and out of the vehicle. Below is the code I am using to achieve the same. val intent = Intent(context, ActivityTransitionReceiver::class.java) val…
8
votes
0 answers

Activity Recognition not work after "wifi & mobile network location" is turn off and turn on

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…
sreejithmohanan
  • 372
  • 3
  • 9
8
votes
1 answer

Activity Recognition in Android is not working

I have tried to compile example code from new Google location API that should show user's activity. Like on foot, in vehicle etc. Link to the example is http://developer.android.com/training/location/activity-recognition.html In my case what I can…
user986589
  • 201
  • 2
  • 5
7
votes
2 answers

Location Updating on basis of device state

I need to get location(By fusedlocation API) of user after ActivityRecognition Detect user state (Which calls every 3 mins), like IN_VEHICLE,ON_FOOT,RUNNING etc. On each event i need user location after regular interval For example: if user is still…
Ritu
  • 518
  • 2
  • 12
  • 35
7
votes
1 answer

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

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.…
Tom Hammond
  • 5,842
  • 12
  • 52
  • 95
6
votes
0 answers

Android defaultSensor TYPE_SIGNIFICANT_MOTION returns null after 24 hours

I'm little bit confused why my Transitions API solution works usually for first day or two and after that stop receiving any updates. I dug deeper into it and found a lead that talks about how we need to have SIGNIFICAT_MOTION sensor active in order…
6
votes
3 answers

Invalid activities specified in the ActivityTransitionRequest

I'm trying to use ActivityRecognition. However I get an error when i'm trying to get a transition update for DetectedActivity.TILTING or DetectedActivity.UNKNOWN. For all the other activity types I don't have problems. Here is my code to create the…
6
votes
2 answers

Activity Recognition Running permissions in android 6.0

I'm trying to implement activity recognition so it will support api 23. I've followed the running permissions guide from here : https://developer.android.com/guide/topics/security/permissions.html#normal-dangerous And i cant find if activity…
1
2 3
13 14