3

I have a problem with Mediacom X530U and Motorola Moto G devices with Android 5.1.

I have this Manifest:

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>

            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
    <receiver
        android:name=".BootCompletedReceiver"
        android:enabled="true"
        android:exported="true">

        <intent-filter android:priority="9999">
            <action android:name="android.intent.action.BOOT_COMPLETED"/>
            <action android:name="android.intent.action.QUICKBOOT_POWERON"/>
            <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED"/>
            <action android:name="android.intent.action.REBOOT"/>
            <action android:name="android.intent.action.USER_PRESENT" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </receiver>
</application>

and this is the BootCompletedReceiver code:

public class BootCompletedReceiver extends BroadcastReceiver {
private static final String TAG = "BootCompletedReceiver";

    @Override
    public void onReceive(Context context, Intent intent) {
        Toast.makeText(context, "You see me now!!", Toast.LENGTH_SHORT).show();
        Log.i(TAG, "You see me now!!");
    }
}

I've tested this code with phisical and emulators devices with android versions 5, 6 and 7 and work well, but with Mediacom X530U and Motorola Moto G devices BOOT_COMPLETED seems not working.

I try with other apps like whatsapp for check device problem on start and whatsapp start on boot correctly.

I've resetted the devices with factory reset but nothing change.

This is my log after device boot, in this case i'm using Mediacom X530U

12-12 11:32:08.449 1538-1538/? I/VoiceCommandApp/BootCompletedReceiver: [BootCompletedReceiver]new... 12-12 11:32:13.305 1561-1561/? D/ActivityThread: BDC-Calling onReceive: intent=Intent { act=android.intent.action.SIM_STATE_CHANGED flg=0x4000010 cmp=com.android.stk/.BootCompletedReceiver (has extras) }, receiver=com.android.stk.BootCompletedReceiver@261f95ea 12-12 11:32:13.311 1561-1561/? D/ActivityThread: BDC-RECEIVER handled : 0 / ReceiverData{intent=Intent { act=android.intent.action.SIM_STATE_CHANGED flg=0x4000010 cmp=com.android.stk/.BootCompletedReceiver (has extras) } packageName=com.android.stk resultCode=0 resultData=null resultExtras=null} 12-12 11:32:14.389 755-787/? I/ActivityManagerAR: remove Intent=Intent { act=android.intent.action.BOOT_COMPLETED flg=0x8000010 (has extras) } receiver=ResolveInfo{1b2b95b9 com.example.mdonatello.bootstart/.BootCompletedReceiver p=9999 m=0x108000} for User App 12-12 11:32:14.389 755-787/? I/ActivityManagerAR: remove Intent=Intent { act=android.intent.action.BOOT_COMPLETED flg=0x8000010 (has extras) } receiver=ResolveInfo{1f434dfe com.teleniasoftware.android.mcsclient/.receiver.BootCompletedReceiver p=9999 m=0x108000} for User App 12-12 11:32:14.571 1561-1561/? D/ActivityThread: BDC-Calling onReceive: intent=Intent { act=android.intent.action.SIM_STATE_CHANGED flg=0x4000010 cmp=com.android.stk/.BootCompletedReceiver (has extras) }, receiver=com.android.stk.BootCompletedReceiver@1aa62689 12-12 11:32:14.572 1561-1561/? D/ActivityThread: BDC-RECEIVER handled : 0 / ReceiverData{intent=Intent { act=android.intent.action.SIM_STATE_CHANGED flg=0x4000010 cmp=com.android.stk/.BootCompletedReceiver (has extras) } packageName=com.android.stk resultCode=0 resultData=null resultExtras=null} 12-12 11:32:15.748 1561-1561/? D/ActivityThread: BDC-Calling onReceive: intent=Intent { act=android.intent.action.SIM_STATE_CHANGED flg=0x4000010 cmp=com.android.stk/.BootCompletedReceiver (has extras) }, receiver=com.android.stk.BootCompletedReceiver@29e24eaf 12-12 11:32:15.750 1561-1561/? D/ActivityThread: BDC-RECEIVER handled : 0 / ReceiverData{intent=Intent { act=android.intent.action.SIM_STATE_CHANGED flg=0x4000010 cmp=com.android.stk/.BootCompletedReceiver (has extras) } packageName=com.android.stk resultCode=0 resultData=null resultExtras=null} 12-12 11:32:15.880 1561-1561/? D/ActivityThread: BDC-Calling onReceive: intent=Intent { act=android.intent.action.SIM_STATE_CHANGED flg=0x4000010 cmp=com.android.stk/.BootCompletedReceiver (has extras) }, receiver=com.android.stk.BootCompletedReceiver@dc1a245 12-12 11:32:15.882 1561-1561/? D/ActivityThread: BDC-RECEIVER handled : 0 / ReceiverData{intent=Intent { act=android.intent.action.SIM_STATE_CHANGED flg=0x4000010 cmp=com.android.stk/.BootCompletedReceiver (has extras) } packageName=com.android.stk resultCode=0 resultData=null resultExtras=null} 12-12 11:32:17.647 755-2498/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1466 com.mediatek.search.SearchEngineManagerService.broadcastSearchEngineChangedInternal:199 com.mediatek.search.SearchEngineManagerService.initSearchEngines:182 com.mediatek.search.SearchEngineManagerService.access$100:78 com.mediatek.search.SearchEngineManagerService$BootCompletedReceiver$1.run:124 12-12 11:32:17.648 1538-1538/? I/VoiceCommandApp/BootCompletedReceiver: [onReceive]... 12-12 11:32:17.648 1538-1538/? I/VoiceCommandApp/BootCompletedReceiver: [registerObserver]... 12-12 11:32:17.651 1538-1538/? I/VoiceCommandApp/BootCompletedReceiver: [registerObserver]register contacts. 12-12 11:32:18.834 1561-1561/? D/ActivityThread: BDC-Calling onReceive: intent=Intent { act=android.intent.action.BOOT_COMPLETED flg=0x8000010 cmp=com.android.stk/.BootCompletedReceiver (has extras) }, receiver=com.android.stk.BootCompletedReceiver@21414d9a 12-12 11:32:18.849 1561-1561/? D/ActivityThread: BDC-RECEIVER handled : 0 / ReceiverData{intent=Intent { act=android.intent.action.BOOT_COMPLETED flg=0x8000010 cmp=com.android.stk/.BootCompletedReceiver (has extras) } packageName=com.android.stk resultCode=0 resultData=null resultExtras=null} 12-12 11:32:21.366 755-1220/? I/ActivityManager: Start proc 3169:com.android.vending/u0a16 for broadcast com.android.vending/com.google.android.finsky.boothandler.BootCompletedReceiver 12-12 11:32:22.058 3169-3169/? D/ActivityThread: BDC-Calling onReceive: intent=Intent { act=android.intent.action.BOOT_COMPLETED flg=0x8000010 cmp=com.android.vending/com.google.android.finsky.boothandler.BootCompletedReceiver (has extras) }, receiver=com.google.android.finsky.boothandler.BootCompletedReceiver@1f31e123 12-12 11:32:22.081 3169-3169/? D/ActivityThread: BDC-RECEIVER handled : 0 / ReceiverData{intent=Intent { act=android.intent.action.BOOT_COMPLETED flg=0x8000010 cmp=com.android.vending/com.google.android.finsky.boothandler.BootCompletedReceiver (has extras) } packageName=com.android.vending resultCode=0 resultData=null resultExtras=null} 12-12 11:32:24.330 755-775/? I/ActivityManagerAR: remove Intent=Intent { act=android.intent.action.USER_PRESENT flg=0x24000010 } receiver=ResolveInfo{3b3ab846 com.example.mdonatello.bootstart/.BootCompletedReceiver p=9999 m=0x108000} for User App 12-12 11:32:24.330 755-775/? I/ActivityManagerAR: remove Intent=Intent { act=android.intent.action.USER_PRESENT flg=0x24000010 } receiver=ResolveInfo{2849fa07 com.teleniasoftware.android.mcsclient/.receiver.BootCompletedReceiver p=9999 m=0x108000} for User App

but i don't see my Log "You see me now!!" from my receiver.

Anyone know anything about it?

Mattia
  • 133
  • 2
  • 8

0 Answers0