zoukankan      html  css  js  c++  java
  • Android Send Email

    Sending E-mail
    Now that you’ve seen how to send SMS messages in Android, you might assume that
    you can access similar APIs to send e-mail. Unfortunately, Android does not provide
    APIs for you to send e-mail. The general consensus is that users don’t want an

    Sending E-mail

    Now that you’ve seen how to send SMS messages in Android, you might assume thatyou can access similar APIs to send e-mail. Unfortunately, Android does not provideAPIs for you to send e-mail. The general consensus is that users don’t want an

    application to start sending e-mail on their behalf. Instead, to send e-mail, you have to

    go through the registered e-mail application. For example, you could use ACTION_SEND to

    launch the e-mail application:

    Intent emailIntent=new Intent(Intent.ACTION_SEND);

    String subject = "Hi!";

    String body = "hello from android....";

    String[] extra = new String[]{"aaa@bbb.com"};

    emailIntent.putExtra(Intent.EXTRA_EMAIL, extra);

    emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);

    emailIntent.putExtra(Intent.EXTRA_TEXT, body);

    emailIntent.setType("message/rfc822");

    startActivity(emailIntent);

    This code launches the default e-mail application and allows the user to decide whether

    to send the e-mail or not. Other “extras” that you can add to an email intent include

    EXTRA_CC and EXTRA_BCC.

    Now let’s talk about the telephony manager.

  • 相关阅读:
    PSP编程
    题库软件1.0发布
    ubuntu上安装netgear wg511v2驱动
    boost的编译
    Plot3D 0.3发布
    立体画板Plot3D
    求教团队内的朋友,在directx中,如何画虚线?
    OpenGL如何显示文本?
    JZ028数组中出现次数超过一半的数字
    JZ027字符串的排列
  • 原文地址:https://www.cnblogs.com/enricozhang/p/1772162.html
Copyright © 2011-2022 走看看