Android Geofence detection sample app closes when i turn off location services

376 Views Asked by At

I installed and tested the sample app geofence detection. In my experience i registered geofence keeping location services On.Once i turn Off the location service the app get closed and a alert dialog appears Unfortunately, "Geofence Detection has stopped. OK.". If any one experienced this please explain how we can block that and what might be the problem.

11-24 15:46:14.813: E/AndroidRuntime(27963): FATAL EXCEPTION: IntentService[ReceiveTransitionsIntentService]
11-24 15:46:14.813: E/AndroidRuntime(27963): Process: com.example.android.geofence, PID: 27963
11-24 15:46:14.813: E/AndroidRuntime(27963): java.util.IllegalFormatConversionException: %d can't format java.lang.String arguments
11-24 15:46:14.813: E/AndroidRuntime(27963):    at java.util.Formatter.badArgumentType(Formatter.java:1489)
11-24 15:46:14.813: E/AndroidRuntime(27963):    at java.util.Formatter.transformFromInteger(Formatter.java:1689)
11-24 15:46:14.813: E/AndroidRuntime(27963):    at java.util.Formatter.transform(Formatter.java:1461)
11-24 15:46:14.813: E/AndroidRuntime(27963):    at java.util.Formatter.doFormat(Formatter.java:1081)
11-24 15:46:14.813: E/AndroidRuntime(27963):    at java.util.Formatter.format(Formatter.java:1042)
11-24 15:46:14.813: E/AndroidRuntime(27963):    at java.util.Formatter.format(Formatter.java:1011)
11-24 15:46:14.813: E/AndroidRuntime(27963):    at java.lang.String.format(String.java:1999)
11-24 15:46:14.813: E/AndroidRuntime(27963):    at android.content.res.Resources.getString(Resources.java:1505)
11-24 15:46:14.813: E/AndroidRuntime(27963):    at android.content.Context.getString(Context.java:376)
11-24 15:46:14.813: E/AndroidRuntime(27963):    at com.example.android.geofence.ReceiveTransitionsIntentService.onHandleIntent(ReceiveTransitionsIntentService.java:58)
11-24 15:46:14.813: E/AndroidRuntime(27963):    at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
11-24 15:46:14.813: E/AndroidRuntime(27963):    at android.os.Handler.dispatchMessage(Handler.java:102)
11-24 15:46:14.813: E/AndroidRuntime(27963):    at android.os.Looper.loop(Looper.java:146)
11-24 15:46:14.813: E/AndroidRuntime(27963):    at android.os.HandlerThread.run(HandlerThread.java:61)
0

There are 0 best solutions below