how to use sendOrderedBroadcast function
<p>I want to use   </p>

<p><code>context.sendOrderedBroadcast(intent, receiverPermission)</code> or   <code>context.sendBroadcast(intent, receiverPermission);</code> </p>

<p>in my application
but I don't know to pass receiverPermission parameter in function and also how to set in manifest file
please any body help me</p>

<p>I want to show you my source code</p>

<pre><code>public class LocationReceiver extends BroadcastReceiver {
    public static final String BROADCAST_ACTION = "LOCATION_CHANGE";
    @Override
    public void onReceive(Context context, Intent intent) {
        intent.setAction(BROADCAST_ACTION);
        Bundle b = intent.getExtras();
        Location loc = (Location)b.get(android.location.LocationManager.KEY_LOCATION_CHANGED);
        Logger.debug("Loc:"+loc);
        if(loc != null){
            doBroadCast(context,intent,loc);
        }
    }

    public void doBroadCast(final Context context,final Intent i1,final Location loc){
        Handler h = new Handler();
        h.post(new Runnable() {

            @Override
            public void run() {
                // TODO Auto-generated method stub
                Logger.debug("LocationReceiver-&gt;sendLocation update broadcast");
                i1.putExtra("Latitude", loc.getLatitude());
                i1.putExtra("Longitude", loc.getLongitude());
                context.sendBroadcast(i1,null);
            }
        });
    }
}
</code></pre>

<p>and on activity I have write</p>

<pre><code>  @Override

        protected void onResume() {
            registerReceiver(broadcastReceiver, new IntentFilter(LocationReceiver.BROADCAST_ACTION));
}

    private BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
            @Override
            public void onReceive(Context context, Intent intent) {
                UpdateUI(intent);
            }
        };

        private void UpdateUI(Intent i){
            Double Latitude = i.getDoubleExtra("Latitude",0); 
            Double Longitude = i.getDoubleExtra("Longitude",0);
            showMap(Latitude, Longitude);
        }
</code></pre>

<p>Now my problem is when it sendbroadcast it execute infinitly doBroadcast function(), please help me to come out.</p>
