Android adb shell am broadcast: Bad component name

后端 未结 4 1312
说谎
说谎 2020-12-07 20:32

I am trying to \'emulate\' a reboot (or anything else with the adb shell am) and am unable to figure out how to reference my component. Then again, maybe I don

4条回答
  •  执念已碎
    2020-12-07 20:58

    Try

    adb shell am broadcast \ -a android.intent.action.BOOT_COMPLETED \ -n net.fstab.checkit_android/.StartupReceiver

    (note the -n net.fstab.checkit_android/.StartupReceiver) to aim at a specific receiver.

    Also make sure your app uses permission to receive specific broadcast intents - in this case it would be

提交回复
热议问题