I'm working hard to understand these concepts how they are working.
can someone explain these concepts to me??
here is the code I want to understand
Intent intent = new Intent();
        intent.setAction("com.example.akshay.proximityalertexample2");
        PendingIntent intent1 = PendingIntent.getBroadcast(this, 0, intent, 0);
        locationManager.addProximityAlert(LAT, LONG, 200, -1, intent1);
        IntentFilter filter = new IntentFilter("com.example.akshay.proximityalertexample2");
        registerReceiver(new ProximityAlert(), filter);
Broadcast class file
package com.example.akshay.proximityalertexample2;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.location.LocationManager;
import android.util.Log;
import android.widget.Toast;
/**
 * Created by Akshay on 9/18/2015.
 */
public class ProximityAlert extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String key = LocationManager.KEY_PROXIMITY_ENTERING;
        Toast.makeText(context, key, Toast.LENGTH_SHORT).show();
        Boolean entering = intent.getBooleanExtra(key, false);
        if (entering) {
            Log.e(getClass().getSimpleName(), "entering");
        } else {
            Log.e(getClass().getSimpleName(), "exiting");
        }
        NotificationManager notificationManager = (NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE);
        Notification notification = createNotification();
        PendingIntent pendingIntent = PendingIntent.getActivity(context , 0 , null , 0 );
        notification.setLatestEventInfo(context,"Proximity Alert!!","You Are Near the Point of intereste " ,pendingIntent);
    }
    private Notification createNotification() {
        Notification notification = new Notification();
        notification.when = System.currentTimeMillis();
        notification.flags |= Notification.FLAG_AUTO_CANCEL;
        notification.flags |= Notification.FLAG_SHOW_LIGHTS;
        notification.ledOffMS = 1500;
        notification.ledOnMS = 1500;
        return notification;
    }
}
Please explain me the working of these concepts.. any help would mean me alot
thanks a lot
 
    