Sending intent to BroadcastReceiver from adb

前端 未结 8 1745
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-29 20:26

I\'ve got BroadcastReceiver class:

public class IntentReceiver extends BroadcastReceiver {

    final String tag = \"Intent Intercepter\";

    @Override
            


        
8条回答
  •  無奈伤痛
    2020-11-29 21:00

    I had the same problem and found out that you have to escape spaces in the extra:

    adb shell am broadcast -a com.whereismywifeserver.intent.TEST --es sms_body "test\ from\ adb"
    

    So instead of "test from adb" it should be "test\ from\ adb"

提交回复
热议问题