I use Intent.ACTION_SEND for receiving data in my app. How can I process sending of data type text/x-vcard?
When I use intent.getStringExtra(Intent.EXTRA_TEXT), it’s throws an exception.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This worked for me:
uri.toString()gave me this:which is not terribly useful in that form, but there seem to be several posts on stack about getting a usable path from a URI.
To get the text from the vcard, the following seems to be working for me:
The string will have carriage returns, so to see all of the text in the logcat, make sure to search for the tag (in the above code it’s “TAG”), so you see all the lines (see my screenshot below).