Android implicit intent and explicit use scenario, android intent
This article implements an application with implicit intent to activate the text message application.
Public void click4 (View view) {Intent intent = new Intent (); intent. setAction ("android. intent. action. SENDTO "); intent. addCategory ("android. intent. category. DEFAULT "); intent. setData (Uri. parse ("sms: 119"); startActivity (intent );}
Summary of intentions:
1. Implicit intent
Do not specify the activity to be enabled. by specifying a group of actions and data, let the system find this specific activity, and then enable it.
Application Scenario: an interface needs to be enabled by another application
Enable other applications
The system needs to query the matching activity, which is less efficient.
2. explicit intent
Specifies the activity to be enabled, the class name, and the package name.
Application: Open the internal interface of your application. High efficiency.