经过测试,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标签的更多相关文章

  1. Android中的Intent Filter匹配规则介绍

    本文主要介绍了隐式Intent匹配目标组件的规则,若有叙述不清晰或是不准确的地方希望大家指出,谢谢大家: ) 1. Intent简介 Intent用于在一个组件(Component,如Activity ...

  2. intent Filter

    intent Filter 一.介绍 如果一个 Intent 请求在一片数据上执行一个动作, Android 如何知道哪个应用程序(和组件)能用来响应这个请求呢? Intent Filter就是 用来 ...

  3. Android Google官方文档(cn)解析之——Intents and Intent filter

    应用程序核心组件中的三个Activity,service,还有broadcast receiver都是通过一个叫做intent的消息激活的.Intent消息传送是在相同或不同的应用程序中的组件之间后运 ...

  4. Android中的Intent详解

    前言: 每个应用程序都有若干个Activity组成,每一个Activity都是一个应用程序与用户进行交互的窗口,呈现不同的交互界面.因为每一个Acticity的任务不一样,所以经常互在各个Activi ...

  5. Android--Activity中使用Intent传值

    Intent,又称为意图,是一种运行时绑定机制,它能在程序运行的过程中链接两个不同的组件(Activity.Service.BroadcastReceiver).通过Intent,程序可以向Andro ...

  6. Android 4 学习(13):Local Broadcast Manager & Intent Filter

    参考<Professional Android 4 Development> Local Broadcast Manager 简介 Local Broadcast Manager由Andr ...

  7. android中使用Intent在activity之间传递数据

    android中intent传递数据的简单使用: 1.使用intent传递数据: 首先将需要传递的数据放入到intent中 Intent intent = new Intent(MainActivit ...

  8. Android Fragment中使用Intent组件拍照

    要在activity里面去接受,然后传递给fragment对象,fragment有很多回调调用不到 你的设备有摄像头吗? 为了确保市场上的大多数设备都能运行你的程序,必须在项目中做一些检测,保证使用的 ...

  9. Android菜鸟的成长笔记(9)——Intent与Intent Filter(下)

    原文:[置顶] Android菜鸟的成长笔记(9)——Intent与Intent Filter(下) 接着上一篇的内容,下面我们再来看看Intent的Data与Type属性. 一.Data属性与Typ ...

  10. Android菜鸟的成长笔记(8)——Intent与Intent Filter(上)

    原文:[置顶] Android菜鸟的成长笔记(8)——Intent与Intent Filter(上) Intent代表了Android应用的启动“意图”,Android应用将会根据Intent来启动指 ...

随机推荐

  1. editplus重新载入文档

    editplus重新载入文档 :document->reload

  2. Lazarus安装使用

    Lazarus安装使用 最后还是安装了Lazarus: 安装之后,新建了项目,还引入了Unit,就可以跑了: 学习:http://tieba.baidu.com/p/3164001113 progra ...

  3. Unity3D:Gizmos画圆(原创)

    Unity3D引擎技术交流QQ群:[21568554] Gizmos是场景视图里的一个可视化调试工具. 在做项目过程中.我们常常会用到它,比如:绘制一条射线等. Unity3D 4.2版本号截至.眼下 ...

  4. Qt跨平台的一个例程

    我的同事penk在近期北京的Hackathon展示了一个在多平台的例程. 非常多开发人员对这个挺感兴趣的. 今天我就把这个资源介绍给大家. 这是同一个用Qt写的应用.能够同一时候在Ubuntu Des ...

  5. Scala 基础新手教程

    1.前言 近期在參加Hadoop和Spark培训.须要使用Scala,自学了一下作为入门.这里作一个记录. 2.下载 1) 在scala官网下载.地址: http://www.scala-lang.o ...

  6. hdoj 2188 悼念512汶川大地震遇难同胞——选拔志愿者 【巴什博弈】

    题意:. . . 策略:最简单的典型的巴什博弈. 代码: #include<stdio.h> int main() { int n, m; int t; scanf("%d&qu ...

  7. 《图论》——广度优先遍历算法(BFS)

    十大算法之广度优先遍历: 本文以实例形式讲述了基于Java的图的广度优先遍历算法实现方法,详细方法例如以下: 用邻接矩阵存储图方法: 1.确定图的顶点个数和边的个数 2.输入顶点信息存储在一维数组ve ...

  8. What is the relationship between Xcode, Swift and Cocoa?

    Xcode is an IDE for developing Swift or Objective-C applications, which can use the Cocoa API (which ...

  9. 牛顿迭代法(Newton&#39;s Method)

    牛顿迭代法(简称牛顿法)由英国著名的数学家牛顿爵士最早提出.可是,这 一方法在牛顿生前并未公开发表(讨厌的数学家们还是鼓捣出来了) 牛顿法的作用是使用迭代的方法来求解函数方程的根. 简单地说,牛顿法就 ...

  10. Dos下mySql

    2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 ...