Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use exported component properties

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Editor to share with you how to use exported component properties, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

What is exported?

Android:exported is one of the four components of Android, which is one of the four components of Activity,Service,Provider,Receiver.

Generally speaking, its main function is whether it supports other applications to call the current component.

Default value: if intent-filter is included, the default value is true; without intent-filter, the default value is false.

Exported component Properties

Let's take a closer look at this property in the component:

1. Let's take a look at: in Activity:

The meaning is as follows:

In Activity, this attribute is used to indicate whether the current Activity can be started by another Application component: true is allowed to be started; false is not allowed to be started.

If set to false, the Activity will only be called by the current Application or components that have the same userID.

The default value of exported depends on whether there is an intentfilter in the Activity. The absence of any filter means that the Activity cannot be awakened until its classname is described in detail. This means that the Activity can only be used within the application, because other application are not aware of the existence of the class. So in this case, its default value is false. On the other hand, if there is at least one filter in the Activity, it means that the Activity can be evoked externally by other applications, and its default value is true.

2. In Service:

...

The above is all the content of the article "how to use exported component properties". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report