Callback after sharing is completed

I use the following code to share files in an android application:

Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, "blah blah blah");
this.startActivity(Intent.createChooser(shareIntent, "Choose a sharing option:"));

I need to know if the user was successful or if he failed. Is there a way to get a callback when the sharing action is completed?

+4
source share
1 answer

Using startActivityForResult, these methods will be able to verify the response. Please check: startActivityForResult

, Sharing Intent. Twitter4j twitter Facebook SDK Android Facebook.

+3

Source: https://habr.com/ru/post/1533652/


All Articles