Android - How do I detect if user has chosen to share to Facebook or twitter using intent?
问题 I've created an application which shares to facebook, twitter etc. But I want to perform different functions dependent on who the user is sharing to , for instance if the user is sharing to Facebook do one thing but if the user shares to twitter do another. How do I do this? My code so far is below: private void ShareSub() { Intent i = new Intent(Intent.ACTION_SEND); i.setType("text/plain"); i.putExtra( Intent.EXTRA_TEXT, "You've just shared " + "Awesome"); startActivity(i); } Further