I am trying to make my app shareable by users on whatsapp, fb and twitter, I have seen that it is possible with intent like this:
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, getResources().getString(R.string.mensajeShared));
intent.setPackage("com.whatsapp");
startActivity(intent);
So far so good, the problem I'm facing is that I'm trying to have a reward system, and the user cannot receive said reward unless it is confirmed that he DID send or share said text and not only clicked the button, no I have an idea how to do this confirmation, I hope someone can help me. Thanks in advance.
In an easy way I don't think it can be done, it should be something signed between the two applications and that they know each other. I was working on an app that was trying to do this too, to know if a user has shared a news sent from our app, but we couldn't solve it, a solution could be that the link you use to share your app or whatever you want to share It is not directly Google Play or something similar, but a link created by you that has been generated specifically for that user and in your backend have proof of it and every time a user clicks on that link you could be notified, but you would have to Also keep in mind that a user cannot click more than once so that the "sharer" is benefited more than once.
If it's just sharing a link and you don't need anything to be downloaded I would go for this option, if you need to know if something has been downloaded there you could also play with the UUID of the device and in your app have a check if that UUID exists and it comes from part of someone and then you could reward him.
I hope I have helped you, if I did not understand the question very well let me know and I will edit my answer.