Sending intent with bundle using console

前端 未结 3 1053
予麋鹿
予麋鹿 2020-11-29 12:36

I\'m developing an Android app listening for specific intent containing a bundle with some data. I would like to send an intent to my app using adb. I have tried with:

3条回答
  •  孤城傲影
    2020-11-29 13:15

    You can start it by using the following command: adb shell am startservice -a android.intent.action.MAIN -e "key" "value" -n com.example.test/.TestService Key and value should be your bundle values you want to send. TestService should be your ServiceName Add for your Service in androidmanifest.xml Snippet:

    
                
                    
                    
                
    
    
    

提交回复
热议问题