官方文档是这么写的:(http://developer.android.com/about/versions/android-3.1.html#launchcontrols)

Launch controls on stopped applications

Starting from Android 3.1, the system's package manager keeps track of applications that are in a stopped state and provides a means of controlling their launch from background processes and other applications.

Note that an application's stopped state is not the same as an Activity's stopped state. The system manages those two stopped states separately.

The platform defines two new intent flags that let a sender specify whether the Intent should be allowed to activate components in stopped application.

When neither or both of these flags is defined in an intent, the default behavior is to include filters of stopped applications in the list of potential targets.

Note that the system adds FLAG_EXCLUDE_STOPPED_PACKAGES to all broadcast intents. It does this to prevent broadcasts from background services from inadvertently or unnecessarily launching components of stoppped applications. A background service or application can override this behavior by adding the FLAG_INCLUDE_STOPPED_PACKAGES flag to broadcast intents that should be allowed to activate stopped applications.

Applications are in a stopped state when they are first installed but are not yet launched and when they are manually stopped by the user (in Manage Applications).

解决方案:1、在发广播的时候加上intent.setFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES)

2、把apk放在/system/app/下

Android installed app, never used, cannot receiver BroadcastReceiver的更多相关文章

  1. Android——开机启动功能(Service和BroadcastReceiver)

    BroadcastReceiver(广播接收器):发出广播让服务器去接收 BootReceiver.java package com.example.chenshuai.test321; import ...

  2. Android基础新手教程——4.3.1 BroadcastReceiver牛刀小试

    Android基础新手教程--4.3.1 BroadcastReceiver牛刀小试 标签(空格分隔): Android基础新手教程 本节引言 本节我们将来学习Android四大组件中的第三个:Bro ...

  3. Android基础新手教程——4.3.2 BroadcastReceiver庖丁解牛

    Android基础新手教程--4.3.2 BroadcastReceiver庖丁解牛 标签(空格分隔): Android基础新手教程 本节引言: 上节我们对BroadcastReceiver已经有了一 ...

  4. android基础(二)Broadcast Receiver知识

    1.广播的注册 (1)动态广播注册: 优点:可以灵活控制广播的注册与撤销 缺点:必须在程序启动时才能接收广播 IntentFilter :当Intent在组建之间传递时,组件想告诉android系统自 ...

  5. Cordova 打包 Android release app 过程详解

    Cordova 打包 Android release app 过程详解 时间 -- :: SegmentFault 原文 https://segmentfault.com/a/119000000517 ...

  6. 【Android端 APP GPU过度绘制】GPU过度绘制及优化

    一.Android端的卡顿 Android端APP在具体使用的过程中容易出现卡顿的情况,比如查看页面时出现一顿一顿的感受,切换tab之后响应很慢,或者具体滑动操作的时候也很慢. 二.卡顿的原因 卡顿的 ...

  7. 分享我开发的网络电话Android手机APP正式版,图文详解及下载

    分享我开发的网络电话Android手机APP正式版,图文详解及下载 分享我开发的网络电话Android手机APP正式版 实时语音通讯,可广域网实时通讯,音质清晰流畅! 安装之后的运行效果: 第一次安装 ...

  8. Android开发App工程结构搭建

    本文算是一篇漫谈,谈一谈关于android开发中工程初始化的时候如何在初期我们就能搭建一个好的架构.      关于android架构,因为手机的限制,目前我觉得也确实没什么大谈特谈的,但是从开发的角 ...

  9. Android 启动APP黑屏解决方案

    #Android 启动APP黑屏解决方案# 1.自定义Theme //1.设置背景图Theme <style name="Theme.AppStartLoad" parent ...

随机推荐

  1. Qt序列化格式分析(qint,QString)(非常简单好用)

    最近项目需要进行QT开发环境下对传输对象进行序列化与反序列化处理,对基本类型的处理在使用QT默认的序列化方式还是完全手工序列化这两种方式之间有些犹疑不定,边想了解下QT默认序列化基本类型的格式,项目中 ...

  2. CVPapers论文整理工具-开源

    一.工具介绍及运行实例 相信计算机视觉领域的同道中人都知道这个Computer Vision Resource网站, http://www.cvpapers.com/  网页部分截图如下: 可以看到有 ...

  3. c++11 新特性之 autokeyword

    C++11是对眼下C++语言的扩展和修正.C++11包含大量的新特性:包含lambda表达式,类型推导keywordauto.decltype,和模板的大量改进. g++编译c++11命令加上 -st ...

  4. http异步请求

    1.加载异步请求包文件 2.java代码 package com.example.asynchttp; import org.apache.http.Header; import com.loopj. ...

  5. 梳理一下uboot是如何从nandflash挂载文件系统的

    只是找到了比较一点点的线索, 如下: 首先要有的概念是,内核在挂载文件系统之前,自己会做一个虚拟fs. 1. Uboot:从flash启动set bootcmd nand read 0x3000000 ...

  6. STL容器总结

    一. 种类: 标准STL序列容器:vector.string.deque和list. 标准STL关联容器:set.multiset.map和multimap. 非标准序列容器slist和rope.sl ...

  7. js遍历对象的数组

    遍历数组: 1.js关键for遍历 2.jquery提供each功能 ----------------------------------- $.each(array, function(){     ...

  8. android 设置字体颜色、EditText自己主动输入转换成大写字母的多种方式

    在TextView上面设置某一个字的字体颜色为指定颜色时,能够通过java类SpannableString类和Html语言来实现. (一)SpannableString类方式 private void ...

  9. 按钮的图标 Button icons-JQUERY MOBILE 1.0正式版中文手册

    按钮的图标 Button icons-JQUERY MOBILE 1.0正式版中文手册 data-icon属性可以被用来创建如下所示的图标 左箭头data-icon="arrow-l&quo ...

  10. iOS学习——ViewController(六)

    ViewController是iOS应用程序中重要的部分,是应用程序数据和视图之间的重要桥梁,ViewController管理应用中的众多视图. iOS的SDK中提供很多原生ViewControlle ...