I have tried to use this command : adb shell am startservice com.bytel.velizy.automation/.ExchangeService -es "begin" "lol" -es "priority" "hjhjhj"
but it's seems that my Android app doesn't receive Extras "begin" and "priority"
I have these lines in my service ExchangeService :
if(intent.hasExtra("begin") && intent.hasExtra("priority")){
Log.i("AUTOMATION_ADB" , "EXTRAS : " + intent.getStringExtra("begin") + " " + intent.getStringExtra("priority") );
}else{
Log.i("AUTOMATION_ADB" , "NOTHING" );
}
I get the "Nothing" in the logcat;
in the cmd command I have this message :
Starting service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.bytel.velizy.automation/.ExchangeService launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 } }
How can I pass Extras using ADB for startservice ?