I want to mantain a log in my android application , log will contain the Device Started (Bootup) and Device Stop Times. Any Idea how to do this ?
I have to start my appl
Use BroadCastReceiver
to receive BOOT_COMPLETED
broadcast. This broadcast is thrown in device startup
The receiver will be like
You will need to use the following persmission
now in code write a BroadCastReceiver
class like
public class ReceiverName extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// do startup tasks or start your luncher activity
}
}