I am currently trying to automate some Android actions through ADB and getting stuck with the contact import through vCards. There are 2 ways of doing this :
automate the exact "tappings" of the user, which supposes you have to determine the position of each "button" according to the screen resolution, etc. It is what I have done right now but it really seem hard to maintain, since there are too much parameters to take into account (custom roms, wierd resolutions, portrait/landscape mod, etc).
find what's happening when you click on "import contact from vCards" and do this action through ADB
Basically, I would like to apply the 2nd option, but I don't know what is happening when you click on "import contacts from vCard", which I would need to call the same action/intent from ADB. Any idea on the ADB command I should execute ?
Try this. Update
-d
option with correctvcf
path.text/vcard
ortext/x-vcard
android.intent.action.VIEW
com.android.contacts
Selected answer didn't work for me. I needed that functionality for several specific tests. So what I did is added Override BeforeSuite to test class inside which I called methods from the below classes and called super class method after.
}
and
}