Android 使用Intent

Posted superxuezhazha

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android 使用Intent相关的知识,希望对你有一定的参考价值。

使用intent可以吊起其他应用

例如发送电子邮件

    public void  sendEmail(View view)
        Intent intent = new Intent(Intent.ACTION_SENDTO);
        intent.setData(Uri.parse("mailto:")); // only email apps should handle this
        //intent.putExtra(Intent.EXTRA_EMAIL, addresses);
        intent.putExtra(Intent.EXTRA_SUBJECT, "订单汇总");
        if (intent.resolveActivity(getPackageManager()) != null) 
            startActivity(intent);
        
    

 

以上是关于Android 使用Intent的主要内容,如果未能解决你的问题,请参考以下文章