"Android" intent related content

Source: Internet
Author: User

"Explicit Intent"

Linerlayout is a linear layout

Orientation is the layout trend vertical is the vertical direction

Android:textallcaps= "false" to enable case sensitivity in views

You need to register in Androidmanifest to make calls through intent

Create a new class to be defined in manifest.

Explicit intent, which directly indicates the startup class, starts with Myaty.class

StartActivity (New Intent (Mainactivity.this, Myaty.class));

Implicit intent do not write startup classes

1. Configure an action

Defined inside the manifest

<intent-filter>
<category android:name= "Android.intent.category.DEFAULT"/>
<action android:name= "Start"/>
</intent-filter>

Named format for the action contract: package name +.intent.action.myaty

Declare its action name in the class that you want to start

public static final String ACTION = package name above

When you start this class, you only need to write

StartActivity (New Intent (myaty.action) can

Launch this app in other apps, intent the full name of the write action

Android:exported = False in manifest If an app does not want to be launched by another app

If more than one application has the same antion startup, a startup item appears

Initiate local activity via a browser link

In the activity configuration, add Intent-filter

Category browsable and Deafult

Action is view

The Data property is app

"Android" intent related content

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.