Implicit jump of activity display in Android
Activity jump is often involved in Andrews. How to implement jump in Andrews is as follows.
Creating a second activity is to create a class, which inherits from Android. App. Activity
When creating the second activity, it needs to be configured in the manifest file, otherwise it will not be found
The entry activity has the following code. As long as the activity has the following code, an icon will be created. The default icon is the same
You can set the name of the icon through Android: label = "".
If the package in which the activity is located has the same name as the application package name, it may not be written.
The configuration in the complete list is as follows:
Implicit jump and display jump
Show jump to activity
The following configuration needs to be added to the manifest file in the display jump
The implementation in the code is as follows
Implicit jump to activity
The intent filter has three parameters: action, category and data. Multiple can be configured for action and data. Category is the configuration of the system. The name in action is defined casually. After definition, the value of name is the action of activity. When implicitly starting an activity, the configuration in the intention must be consistent with the name of the action here. Data is the parameter carried in the jump process, and mimeType is the type of data carried. According to the configuration in the intention filter, different processing needs to be done for the configuration of data in the jump.
The implementation in the code is as follows
Method to get passed parameters in activity:
How to choose which startup method: it is suitable to use display to start activities in the same application, and implicit to start activities in different applications. There is no problem with using implicit, and the efficiency of using display is higher. When there are multiple activities in the system that match the action you intend to set, a dialog box will pop up when you start the activity, containing the matching activities.
Configuration of calling application
How to launch the browser
The above is what Xiaobian introduced to you. The activity in Android shows an implicit jump. I hope it will help you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!