I'm writing an automation script to check my new photo gallery application. I've been trying to get am to show images using the ACTION_VIEW intent but for some reason it doesn't work. Here's what I've tried:
adb shell am start -a android.intent.action.VIEW -d "file:///sdcard/Android/test.jpg"
or
adb shell am start "file:///sdcard/Android/test.jpg"
however, both commands fail with the following error:
Starting: Intent { act=android.intent.action.VIEW dat=/sdcard/Android/test.jpg } Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=/sdcard/Android/test.jpg flg=0x10000000 }
Any ideas?
Thanks.