I found this code on internet and I don't know how to get permission for this Broadcast Receiver..
or I don't need to?
It's in a class SetAlarmActivity..
BroadcastReciever br;
private void setup() {
br = new BroadcastReceiver() {
@Override
public void onReceive(Context c, Intent i) {
Toast.makeText(c, "Rise and Shine!", Toast.LENGTH_LONG).show();
}
};
registerReceiver(br, new IntentFilter("org.example.makwanas.sapalarm") );
pi = PendingIntent.getBroadcast( this, 0, new Intent("org.example.makwanas.sapalarm"),
0 );
am = (AlarmManager)(this.getSystemService( Context.ALARM_SERVICE ));
}