AndroidManifest中的Intent-filter标签
经过测试,intent-filter标签中的:
1.
<action android:name="android.intent.action.MAIN" />
代表这是程序的入口Activity。如果没有Activity有这个声明,程序将没有图标。
2.
<category android:name="android.intent.category.LAUNCHER" />
引用API:Should be displayed in the top-level launcher.
代表这个Activity的category是LAUNCHER类型。LAUNCHER类型的Activity会显示在程序列表中,如果没有Activity有这个声明,程序将没有图标,但在「已安装列表」中会有。
3.原理类似,在2.3的系统上使用如下代码会使得用户在卸载程序列表中找到这个Activity的选项。
<activity android:label="卸载程序" android:name="com.example.hardtouninstall.Uninstall">
<intent-filter android:priority="2147483647">
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.DELETE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="package" />
</intent-filter>
</activity>
Android4.3以上这个方法失效,会直接卸载。
4.「category.DEFAULT」牵涉到implicit intent,先到这了。。
参考:http://developer.android.com/reference/android/content/Intent.html#ACTION_DELETE
AndroidManifest中的Intent-filter标签的更多相关文章
- Android中的Intent Filter匹配规则介绍
		
本文主要介绍了隐式Intent匹配目标组件的规则,若有叙述不清晰或是不准确的地方希望大家指出,谢谢大家: ) 1. Intent简介 Intent用于在一个组件(Component,如Activity ...
 - intent Filter
		
intent Filter 一.介绍 如果一个 Intent 请求在一片数据上执行一个动作, Android 如何知道哪个应用程序(和组件)能用来响应这个请求呢? Intent Filter就是 用来 ...
 - Android Google官方文档(cn)解析之——Intents and Intent filter
		
应用程序核心组件中的三个Activity,service,还有broadcast receiver都是通过一个叫做intent的消息激活的.Intent消息传送是在相同或不同的应用程序中的组件之间后运 ...
 - Android中的Intent详解
		
前言: 每个应用程序都有若干个Activity组成,每一个Activity都是一个应用程序与用户进行交互的窗口,呈现不同的交互界面.因为每一个Acticity的任务不一样,所以经常互在各个Activi ...
 - Android--Activity中使用Intent传值
		
Intent,又称为意图,是一种运行时绑定机制,它能在程序运行的过程中链接两个不同的组件(Activity.Service.BroadcastReceiver).通过Intent,程序可以向Andro ...
 - Android 4 学习(13):Local Broadcast Manager & Intent Filter
		
参考<Professional Android 4 Development> Local Broadcast Manager 简介 Local Broadcast Manager由Andr ...
 - android中使用Intent在activity之间传递数据
		
android中intent传递数据的简单使用: 1.使用intent传递数据: 首先将需要传递的数据放入到intent中 Intent intent = new Intent(MainActivit ...
 - Android Fragment中使用Intent组件拍照
		
要在activity里面去接受,然后传递给fragment对象,fragment有很多回调调用不到 你的设备有摄像头吗? 为了确保市场上的大多数设备都能运行你的程序,必须在项目中做一些检测,保证使用的 ...
 - Android菜鸟的成长笔记(9)——Intent与Intent Filter(下)
		
原文:[置顶] Android菜鸟的成长笔记(9)——Intent与Intent Filter(下) 接着上一篇的内容,下面我们再来看看Intent的Data与Type属性. 一.Data属性与Typ ...
 - Android菜鸟的成长笔记(8)——Intent与Intent Filter(上)
		
原文:[置顶] Android菜鸟的成长笔记(8)——Intent与Intent Filter(上) Intent代表了Android应用的启动“意图”,Android应用将会根据Intent来启动指 ...
 
随机推荐
- android listview 添加数据
			
<span style="white-space:pre"> </span>listView = (ListView) findViewById(R.id. ...
 - 织梦dede如何去除Power by DedeCms
			
自从dedecms织梦系统更新到6.7日的版本,底部版权信息调用标签{dede:global.cfg_powerby/}会自动加上织梦官方的链接[Power by DedeCms ],想必很多新用户使 ...
 - [c++菜鸟]《Accelerate C++》习题解答
			
第0章 0-0 编译并运行Hello, world! 程序. #include <iostream> using namespace std; int main() { cout < ...
 - Go Programming Blueprints 读书笔记(谈到了nsq/mgo处理数据持久化,可是业务逻辑不够复杂)
			
Go Programming Blueprints http.Handle("/", &templateHandler{filename: "chat.html& ...
 - vue2.0 + vux (五)api接口封装 及 首页 轮播图制作
			
1.安装 jquery 和 whatwg-fetch (优雅的异步请求API) npm install jquery --save npm install whatwg-fetch --save 2. ...
 - UVA - 11354Bond最小生成树,LCA寻找近期公共祖先
			
看懂题目意思.他的意思是求将全部的城市走一遍,危急度最小.而且给 你两个s,t后让你求在走的时候,从s到t过程中危急度最大的值,并输出它, 然后就是怎样攻克了,这个题目能够说简单,也能够说难 通过思考 ...
 - SQL获取年月日方法
			
方法一:利用DATENAME 在SQL数据库中,DATENAME(datetype,date)函数的作用是从日期中提取指定部分数据,其返回类型是nvarchar.datetype类型见附表1. SEL ...
 - Spring学习【Spring概述】
			
从本文開始,我们就要一起学习Spring框架,首先不得不说Spring框架是一个优秀的开源框架. 当中採用IoC原理实现的基于Java Beans的配置管理和AOP的思想都是非常值得学习与使用的.以下 ...
 - 使用C#解决部分Win8.1系统窗体每隔几秒失去焦点的问题
			
使用了Win8.1 With Update 1后,发现重新启动系统后,当前激活的窗体总是每隔几秒失去焦点.过0.5~1秒焦点回来.导致输入无法正常工作,严重影响使用心情和效率. 在网上找了非常久,也没 ...
 - iOS Dev (26) 初步了解下UIColor的最常用知识
			
作者:CSDN 大锐哥 地址:http://blog.csdn.net/prevention - 内置的颜色有啥? // Some convenience methods to create colo ...