I am developing an app which reads NFC tags. If the tag is plain text, it gets displayed in a TextView. If it is a vCard, I want to pass the intent right through to the contacts where it can be handled the same way it would if there was no app in the foreground.
I know that I can insert a user using
Intent intent = new Intent(ContactsContract.Intents.Insert.ACTION);
intent.setType(ContactsContract.RawContacts.CONTENT_TYPE);
startActivity(intent);
but this would only open the contacts app without actually passing the data. Using the intent my app recieved, throws a NullPointerException (startActivity(recievedIntent)
). This is probably because I handle the recieving and the passing in a different method, even though I pass the intent from one method to the other.
Thank you for your time!