Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Intent intent = new Intent(Intent.ACTION_SEND);
- intent .setType("text/plain");
- intent .setPackage("com.android.twitter");
- intent .putExtra(Intent.EXTRA_TEXT, "Hello World this message came from android app");
- try {
- getActivity().startActivity(intent);
- } catch (android.content.ActivityNotFoundException ex) {
- Toast.makeText(getActivity(),"Twiter not been installed.", Toast.LENGTH_LONG).show();
- }
Add Comment
Please, Sign In to add comment