Android : How can i check that whether a broadcast receiver is working or not in android?

on Thursday, August 7, 2014


here is bootstartup java file. As TestService java file is working properly i have checked it But I just want to know how can i check that data is broadcasted ?



bootstartup.java


package com.example.myglobalbroadcastreceiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class bootstartup extends BroadcastReceiver {

@Override

public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
// start the service
Intent service=new Intent(context,TestService.class);
context.startService(service);
Log.e(“com.example.myglobalbroadcastreceiver”,“Broadcast Received:”+intent.getAction());

// start the app
Intent app= new Intent(context,Abhijeet.class);
context.startService(app);
}


}


0 comments:

Post a Comment