This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent email = new Intent(Intent.ACTION_SEND); | |
email.putExtra(Intent.EXTRA_EMAIL, new String[]{"velmurugan@androidtoppers.com"}); | |
email.putExtra(Intent.EXTRA_SUBJECT, "Hi"); | |
email.putExtra(Intent.EXTRA_TEXT, "Hi,This is Test"); | |
email.setType("text/plain"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent email = new Intent(Intent.ACTION_SEND); | |
email.putExtra(Intent.EXTRA_EMAIL, new String[]{"velmurugan@androidtoppers.com"}); | |
email.putExtra(Intent.EXTRA_SUBJECT, "Hi"); | |
email.putExtra(Intent.EXTRA_TEXT, "Hi,This is Test"); | |
email.setType("text/plain"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Dialog dialog = new Dialog(Custom_chooser.this); | |
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); | |
WindowManager.LayoutParams WMLP = dialog.getWindow().getAttributes(); | |
WMLP.gravity = Gravity.CENTER; | |
dialog.getWindow().setAttributes(WMLP); | |
dialog.getWindow().setBackgroundDrawable( | |
new ColorDrawable(android.graphics.Color.TRANSPARENT)); | |
dialog.setCanceledOnTouchOutside(true); | |
dialog.setContentView(R.layout.about_dialog); | |
dialog.show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<ResolveInfo> launchables=pm.queryIntentActivities(email, 0); | |
Collections.sort(launchables,newResolveInfo.DisplayNameComparator(pm)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adapter=new AppAdapter(pm, launchables); | |
lv.setAdapter(adapter); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ResolveInfo launchable=adapter.getItem(position); | |
ActivityInfo activity=launchable.activityInfo; | |
ComponentName name=new ComponentName(activity.applicationInfo.packageName,activity.name); | |
email.addCategory(Intent.CATEGORY_LAUNCHER); | |
email.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | | |
Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); | |
email.setComponent(name); | |
startActivity(email); |
OlderNewer