Guest User

Untitled

a guest
Jun 25th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. /* AndroidManifest.xml
  2. <receiver android:name="com.sfn.android.LocalNotifier" >            
  3.     <intent-filter>
  4.         <action android:name="com.transistorsoft.locationmanager.event.GEOFENCE" />
  5.     </intent-filter>
  6. </receiver>
  7. */
  8.  
  9. public class LocalNotifier extends BroadcastReceiver {
  10.     private static final String TAG = "SFNLocalNotifier";
  11.  
  12.     @Override
  13.     public void onReceive(Context context, Intent intent) {
  14.         Log.d(TAG, "Got action: " + intent.getAction());
  15.         final String GEOFENCE_EVENT = "com.transistorsoft.locationmanager.event.GEOFENCE";
  16.         if (GEOFENCE_EVENT.equals(intent.getAction())) {
  17.             showLocalNotification(context, intent);
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment