Email Client")); Ten, Direct texting Uri uri= uri.parse ("smsto://100861"); Intent Intent = new Intent (intent.action_sendto, URI); Intent.putextra ("Sms_body", "Android Send mail Test http://www.android-study.net"); Xi. send MMS Uri uri= uri.parse ("Content://media/external/images/media/23"); Intent Intent = new Intent (intent.action_send); Intent.putextra ("Sms_body", "
Android Studio Intent An implicit start, texting, dialing, calling, accessing a Web page, and other instance code
Function
Create 5 buttons, implicitly start, text message, dial button, phone button, open Web button. By using intent to complete the functions under the respective buttons
The code directory is as follows
The detailed code is as follows:
The Activity_main.xml code is as follows
System Phone Interface:Intent Intent = new Intent ();The default ACTION of the system to open the default phone interface intent.setaction (Intent.action_call);Number that needs to be dialedIntent.setdata (Uri.parse ("Tel:" +i)); CallPhoneAndSendMessage.this.startActivity (Intent);The system sends the text message interface:Intent Intent = new Intent ();System default ACTION, used to open the default SMS interface Intent.setaction (INTENT.ACTION_SENDTO);A number Intent.setdata (Uri.parse ("Smsto
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.