@Override
public void onActivityResult(int requestCode, int resultCode, Intent data)
{
super.onActivityResult(requestCode, resultCode, data);
if(requestCode==392 &&resultCode==RESULT_OK)
{
System.out.println("Google+");
}
}
Intent shareIntent = ShareCompat.IntentBuilder.from(getActivity())
.setText(". http://www.http://stackoverflow.com/")
.setType("text/plain")
.getIntent()
.setPackage("com.google.android.apps.plus");
startActivityForResult(shareIntent, 392);
I want to check if it is posted or not, How to check if user posted successfully or cancelled the Sharing.
onActivityResult()
and listen forRESULT_OK
andRESULT_CANCELED
.