在Android开发中,如果我们用到V4包里面的Fragment,在应用被切换到后台的时候,Activity可能被回收,但是创建的所有Fragment则会被保存到Bundle里面,下面是FragmentActivity的部分源码 /** * Save all appropriate fragment state. */ @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState…
overide FragmentActivity  onSaveInstanceState method like this. @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if(outState != null) { String FRAGMENTS_TAG = "android:support:fragments"; // remov…
reference to : http://blog.csdn.net/happy_horse/article/details/51518280 最近项目中涉及到加载本地的地名.db文件,数据量大,自然不能直接放在UI线程中操作,好在Google在Android3.0以后,提供了AsyncTaskLoader来做一些耗时的异步任务. 一 官方对AsyncTaskLoader的定义及特点介绍如下: Abstract Loader that provides an AsyncTask to do t…
reference to : http://blog.csdn.net/yihongyuelan/article/details/40977323 概况 Android在4.3的版本中(即API 18)加入了NotificationListenerService,根据SDK的描述(AndroidDeveloper)可以知道,当系统收到新的通知或者通知被删除时,会触发NotificationListenerService的回调方法.同时在Android 4.4 中新增了Notification.e…
reference : http://m.blog.csdn.net/blog/langzxz/45308199 reference : http://blog.csdn.net/hyhyl1990/article/details/46842915 Android原生是有应用程序权限管理的,即是AppOps,只是Google把它默认隐藏了. 本文对AppOps机制做一简要的分析和描述. 1.     AppOps 简介 AppOps全称是 Application Operations,类似我们平…
reference to  :  http://www.infoq.com/cn/articles/android-accessibility-installing?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global 对于国内Android设备,应用的自动批量安装/更新一直是一个痛点,在之前,第三方应用商店通常要求设备Root,然后调用系统的 PackageManagerServic…
reference to : http://www.linuxidc.com/Linux/2014-12/110165.htm 前一篇文章主要讲了自定义View为什么要重载onMeasure()方法(见 http://www.linuxidc.com/Linux/2014-12/110164.htm),那么,自定义ViewGroup又都有哪些方法需要重载或者实现呢 ? Android开 发中,对于自定义View,分为两种,一种是自定义控件(继承View类),另一种是自定义布局容器(继承ViewG…
转载自: http://www.thinksaas.cn/group/topic/335449/ http://blog.csdn.net/u010571535/article/details/8992543# 一.Android证书的格式 Android签名中证书的格式采用X.509标准的版本三,不过省略了一些内容. X.509证书格式如下图所示: 二.证书的格式示例 从Chrome浏览器中导出一个证书,打开之后的样子如下图所示: 说明:由上图可以看出,在证书中,开发者的公钥是显式存在的. 三…
android.permission.ACCESS_CHECKIN_PROPERTIES允许读写访问"properties”表在checkin数据库中,改值可以修改上传( Allows read/write access to the “properties” table in the checkin database, to change values that get uploaded) android.permission.ACCESS_COARSE_LOCATION允许一个程序访问Cel…
一般来说Application的onCreate方法只会执行一次, 如果应用中采用多进程方式,oncreate方法会执行多次,根据不同的进程名字进行不同的初始化, 就是在application中多添加几个if else String processName = OsUtils.getProcessName(this, android.os.Process.myPid()); if (processName != null) { boolean defaultProcess = processNa…