google play services - Android ActivityRecognitionApi requestActivityUpdates are too frequent. How can I throttle them? -


i'm trying change how request location updates fusedlocationproviderapi based on activity level of user. android provides activityrecognitionapi great, unfortunately:

"activities may received more detectionintervalmillis parameter if application has requested activity updates @ faster rate." (from: https://developer.android.com/reference/com/google/android/gms/location/activityrecognitionapi.html)

i'd execute code no more once every, say, 10 seconds. what's best way this?

you have found solution now, but..

i working on fork of https://github.com/mcharmas/android-reactivelocation trying add activity recognition. using rxjava observer, define filter let new activities go subscribe() method if x seconds has passed.

the fork can found here: https://github.com/cyrixmorten/android-reactivelocation


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -