I want to check the BROADCAST RECEIVER with Action BOOT_COMPLETED in the emulator.
This my code
public class AutoRunService extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
Toast.makeText(UApplication.getInstance(), "Application is ready to open ", Toast.LENGTH_SHORT).show();
myFunciton(context);
}
}
public void myFunciton(Context context) {
}
}
<receiver
android:name=".AutoRunService"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
I'm using windows 10 and genymotion emulator. Is there any way to check that broadcast receiver in emulator ? How can i restart emulator to check that receiver ? is there any direct command?
Thanks in advance.