launching email client from my app(android)
hi i have used the following code to launch an email client but it is launching only messaging app...so what should get modified in this code....
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emai开发者_运维问答lIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] {"vgsl.manju@gmail.com"});
emailIntent.setType("text/plain");
startActivity(Intent.createChooser(emailIntent, "Send a mail ..."));
Code snippet looks fine. Try it on an actual device, it should work fine.
Intent intent = getPackageManager().getLaunchIntentForPackage("com.android.email");
startActivity(intent);
Try this, it works on me.
first check if your email client is configured.
精彩评论