Issue
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 :
So, my question is how to get programmatically the waitTime
value ? thanks.
Solution
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.
Answered By - Lino
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.