package com.example.patrice.boot_04;


import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class BootUpReceiver extends BroadcastReceiver {


    @Override
    public void onReceive(Context context, Intent intent)
    {

        if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction()))
        {

            Intent i = new Intent(context, MainActivity.class);
            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(i);

            Log.d("*********", "pipo");


        }



    }





}