0

I am using Android Play services's Activity Recognition API. This api is not working in a very reliable manner. Sometimes i have to restart the phone to notification broadcasts. I am using the latest Google play services library

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.google.android.gms"
    android:versionCode="4323030"
    android:versionName="4.3.23 (1069729-030)" >

    <uses-sdk android:minSdkVersion="9"/>

</manifest>

I am using the sample code provided by on developer.android.com :

http://developer.android.com/training/location/activity-recognition.html

Any thoughts?

PS: Also let me know if you need any other information, I can post it here.

mudit
  • 25,306
  • 32
  • 90
  • 132
  • you might be interested reading my post - http://stackoverflow.com/questions/24177858/activity-recognition-pendingintent-stop-been-called-in-the-middle-of-the-night – Tal Kanel Jul 09 '14 at 07:26
  • define "Unreliable". it's not a secret that this API's are not perfect, but if you'll define exactly what's wrong - someone could help – Tal Kanel Jul 09 '14 at 07:29
  • "Unreliable" means, it suddenly starts misbehaving.. I have setup "detectionIntervalMillis" as 30 secs.. so sometimes it gives proper notification updates but sometimes it give 1 or 2 updates and stops after that without any exception.. – mudit Jul 09 '14 at 07:35
  • do you have phone with SIGNIFICANT_MOTION_SENSOR? – Tal Kanel Jul 09 '14 at 07:40
  • tell me what is your phone model/name – Tal Kanel Jul 09 '14 at 07:42
  • I'm not sure if it have, but if you have, then this member should not return null : mSignificantMotionSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_SIGNIFICANT_MOTION); – Tal Kanel Jul 09 '14 at 07:45
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/56999/discussion-between-mudit-and-tal-kanel). – mudit Jul 09 '14 at 07:47

0 Answers0