1

I'm using ADB to show Waiting Time Activity on launching app, the command I used is : adb shell am start -S -W com.example.app/.MainActicity -c android.intent.category.LAUNCHER -a android.intent.action.MAIN here's the result :

RESULT

So, my question is how to get programmatically the waitTime value ? thanks.

Lino
  • 5,084
  • 3
  • 21
  • 39
Abderazak Amiar
  • 776
  • 7
  • 22

1 Answers1

1

As suggested in the comments sections, having a Linux-based terminal you can retrieve the WaitTime programmatically by parsing the output of the the am start command and filtering the value like this:

adb shell am start -S -W "com.example.abder.emarque/.Activities.EMarque" -c android.intent.category.LAUNCHER 
-a android.intent.action.MAIN | grep -i waittime | cut -d' ' -f2

3813

whereas grep -i waittime filters the line containing the waittime and the cut command retrieves the value itself.

Hope this helps.

Lino
  • 5,084
  • 3
  • 21
  • 39