18 lines
589 B
Java
18 lines
589 B
Java
package com.example.exoplayertv;
|
|
|
|
import android.content.BroadcastReceiver;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import com.example.exoplayertv.DemoDownloadService;
|
|
|
|
public class StartActivityOnBootReceiver extends BroadcastReceiver {
|
|
@Override
|
|
public void onReceive(Context context, Intent intent) {
|
|
if(Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
|
|
Intent i = new Intent(context, SampleChooserActivity.class);
|
|
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
context.startActivity(i);
|
|
}
|
|
}
|
|
}
|