I am developing a free android app which will have in app purchases for upgrades. I would also like to implement a share button button, and give the user limited upgrades for sharing the app.
The code for the share button works, and the user can select to share from whatever comes up such a gmail, facebook, messages or whatever. The problem is, I know that the button got pressed, but I have no way of knowing whether the user actually shared with anyone.
I've searched the web and haven't found anything.
Maybe there is a third party solution for this or something?
shareButton.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View v) {
Intent shareintent = new Intent(android.content.Intent.ACTION_SEND);
shareintent.setType("text/plain");
shareintent.putExtra(android.content.Intent.EXTRA_SUBJECT, "My app name");
shareintent.putExtra(android.content.Intent.EXTRA_TEXT, "Here is the share content body");
startActivity(Intent.createChooser(shareintent, "Share via"));
}
});