0

I am developing android geofence app which released this year in google I/O.I am passing users current location lat-lon to geofence with diffrent radius like 2,5,10,50..etc but I am not able to get notification.I don't know what is the problem but logcat shows geofence successfully added,it not starts Intent service and also not called handleGeofenceTransition().

Nitish Patel
  • 1,026
  • 2
  • 19
  • 36
  • what do you mean by "not able to get notification", does the notification not get displayed? – Ilan.K Jul 10 '13 at 07:10

1 Answers1

0

if you want you application to act in case of a transition you can broadcast it forward, the same way the google geofence example handles Errors.

simple add:

broadcastIntent.putExtra(
                    GeofenceUtils.EXTRA_GEOFENCE_TRANSITION_TYPE,
                    transition).putExtra(
                    GeofenceUtils.EXTRA_GEOFENCE_IDS_ARRAY,
                    Arrays.toString(geofenceIds))
                    .setAction(GeofenceUtils.ACTION_GEOFENCE_TRANSITION);

// Broadcast *locally* to other components in this app
LocalBroadcastManager.getInstance(this).sendBroadcast(broadcastIntent);

you'll of course need to add code handling intent at the receiving class

Ilan.K
  • 673
  • 14
  • 22