- 浏览: 911367 次
- 性别:
- 来自: 上海
最新评论
-
liu149339750:
我勒个去,搜到你的博客了,关注!
Android make脚本简记 -
ihopethatwell:
楼主,这个修改时间有个问题,退出修改界面就不保存设置的时间了, ...
Android中如何修改系统时间(应用程序获得系统权限) -
flyar520:
你好...我也遇到屏幕半屏刷成黑屏的问题...但是我的时在开机 ...
Android横屏状态下返回到壁纸界面屏幕刷新问题 -
flyar520:
你好...我也遇到屏幕半屏刷成黑屏的问题...但是我的时在开机 ...
Android横屏状态下返回到壁纸界面屏幕刷新问题 -
taowayi:
推荐android一键反编译神器 apkdec
Android apk反编译
Launcher
的AndroidManifest.xml文件有很多特殊性,分析一下就会理解整个程序的大概结构。
代码如下:
< manifest xmlns:android = "http://schemas.android.com/apk/res/android"
package = "net.sunniwell.launcher"
android:versionCode = "1" android:versionName = "1.0.1" >
关于自定义权限,这是很好的例子,其他 apk 程序要想使用 Launcher 的功能必须添加这些权限,而这些权限都是在这里声明的。
这个是安装快捷方式的权限定义:
<
permission
android:name = "com.android.launcher.permission.INSTALL_SHORTCUT"
android:permissionGroup = "android.permission-group.SYSTEM_TOOLS"
android:protectionLevel = "normal"
android:label = "@string/permlab_install_shortcut"
android:description = "@string/permdesc_install_shortcut" />
这个是卸载快捷方式的权限定义:
<
permission
android:name = "com.android.launcher.permission.UNINSTALL_SHORTCUT"
android:permissionGroup = "android.permission-group.SYSTEM_TOOLS"
android:protectionLevel = "normal"
android:label = "@string/permlab_uninstall_shortcut"
android:description = "@string/permdesc_uninstall_shortcut" />
这个是读取
launcher.db
内容的权限定义:
<
permission
android:name = "net.sunniwell.launcher.permission.READ_SETTINGS"
android:permissionGroup = "android.permission-group.SYSTEM_TOOLS"
android:protectionLevel = "normal"
android:label = "@string/permlab_read_settings"
android:description = "@string/permdesc_read_settings" />
这个是修改和删除
launcher.db
内容的权限定义:
<
permission
android:name = "net.sunniwell.launcher.permission.WRITE_SETTINGS"
android:permissionGroup = "android.permission-group.SYSTEM_TOOLS"
android:protectionLevel = "normal"
android:label = "@string/permlab_write_settings"
android:description = "@string/permdesc_write_settings" />
这些是 Launcher 的权限声明,通过这些就能看出 launcher 的大概功能了:
打电话权限:
<
uses-permission
android:name
=
"android.permission.CALL_PHONE"
/>
使用状态栏权限:
<
uses-permission
android:name
=
"android.permission.EXPAND_STATUS_BAR"
/>
获取当前或最近运行的任务的信息的权限:
<
uses-permission
android:name
=
"android.permission.GET_TASKS"
/>
读取通信录权限 :
<
uses-permission
android:name
=
"android.permission.READ_CONTACTS"
/>
设置壁纸权限:
< uses-permission android:name = "android.permission.SET_WALLPAPER" />
允许程序设置壁纸 hits 的权限:
< uses-permission android:name = "android.permission.SET_WALLPAPER_HINTS" />
使用震动功能权限:
< uses-permission android:name = "android.permission.VIBRATE" />
修改删除 launcher.db 内容权限:
< uses-permission android:name = "android.permission.WRITE_SETTINGS" />
绑定 widget 权限:
< uses-permission android:name = "android.permission.BIND_APPWIDGET" />
读取 launcher.db 内容权限:
< uses-permission android:name = "net.sunniwell.launcher.permission.READ_SETTINGS" />
修改删除 launcher.db 内容权限:
< uses-permission android:name = "net.sunniwell.launcher.permission.WRITE_SETTINGS" />
读写外部存储设备权限:
< uses-permission android:name = "android.permission.WRITE_EXTERNAL_STORAGE" ></ uses-permission >
<
application
android:name = "LauncherApplication"
activity 应该运行的进程的名字:
android:process = "android.process.acore"
android:label = "@string/application_name"
android:icon = "@drawable/swicon" >
<
activity
android:name = "Launcher"
是否
android:launchMode = "singleTask"
android:clearTaskOnLaunch = "true"
这个 activity 是否在被杀死或者重启后能恢复原来的状态:
android:stateNotNeeded = "true"
android:theme = "@style/Theme"
android:screenOrientation = "landscape"
android:windowSoftInputMode = "stateUnspecified|adjustPan" >
<
intent-filter
>
<
action
android:name
=
"android.intent.action.MAIN"
/>
<
category
android:name
=
"android.intent.category.LAUNCHER"
/>
桌面应用的标记:
< category android:name = "android.intent.category.HOME" />
<
category
android:name
=
"android.intent.category.DEFAULT"
/>
自动化测试工具
Monkey
的标记,待研究
…
< category android:name = "android.intent.category.MONKEY" />
</
intent-filter
>
</
activity
>
选择壁纸的
activity:
< activity
android:name = "WallpaperChooser"
android:label = "@string/pick_wallpaper"
android:icon = "@drawable/ic_launcher_gallery" >
设置壁纸的
intent-filter
:
<
intent-filter
>
<
action
android:name
=
"android.intent.action.SET_WALLPAPER"
/>
<
category
android:name
=
"android.intent.category.DEFAULT"
/>
</
intent-filter
>
搜索的 activity :
</ activity >
<!-- Enable system-default search mode for any activity in Home -->
<
meta-data
android:name = "android.app.default_searchable"
android:value = "*" />
安装快捷方式的广播接收器:
<!-- Intent received used to install shortcuts from other applications -->
<
receiver
android:name = ".InstallShortcutReceiver"
android:permission = "com.android.launcher.permission.INSTALL_SHORTCUT" >
<
intent-filter
>
<
action
android:name
=
"com.android.launcher.action.INSTALL_SHORTCUT"
/>
</
intent-filter
>
</
receiver
>
<!-- Intent received used to uninstall
shortcuts from other applications -->
卸载快捷方式的广播接收器:
<
receiver
android:name = ".UninstallShortcutReceiver"
android:permission = "com.android.launcher.permission.UNINSTALL_SHORTCUT" >
<
intent-filter
>
<
action
android:name
=
"com.android.launcher.action.UNINSTALL_SHORTCUT"
/>
</
intent-filter
>
</
receiver
>
声明 ContentProvider ,用于对 launcher.db 操作:
<!-- The settings provider contains Home's data, like the workspace favorites -->
<
provider
android:name = "SWLauncherProvider"
android:authorities = "net.sunniwell.launcher.settings"
android:writePermission = "net.sunniwell.launcher.permission.WRITE_SETTINGS"
android:readPermission = "net.sunniwell.launcher.permission.READ_SETTINGS" />
</
application
>
<
uses-sdk
android:minSdkVersion
=
"4"
/>
</
manifest
>
说明:
1.
<manifest
标签头部还应声明:
android:sharedUserId="android.uid.shared"
,作用是获得系统权限,但是这样的程序属性只能在build整个系统时放进去(就是系统软件)才起作用,手动安装是没有权限的。
发表评论
-
运营商MCC+MNC
2012-02-15 10:24 662720201, "Cosmote", ... -
Android 手机玩转技巧
2011-05-10 19:32 2795快速查看手机充电情况 ... -
模拟器上安装Android Market
2011-03-15 19:42 3035模拟器上安装Android Market 一. 基 ... -
Android onSaveInstanceState和onRestoreInstanceState的用处
2011-02-12 20:11 1592很多不明白Activity类中包含的onSaveInstanc ... -
Android 用于GPRS的AT命令
2011-02-11 18:59 5737这个文档是基于GSM标准07.07的,微控可以 ... -
Android Google应用移植时包依赖关系
2011-01-26 16:44 2198Canledar : system/app Google ... -
Android EditView属性解析
2011-01-13 20:27 12263本文主要研究一下EditText的属性(还没研究完,边 ... -
Android preference与ActivityGroup UI更新
2011-01-10 21:22 3199之前发过一篇有关于自定义preference 在Activit ... -
Android2.3新特性
2011-01-07 10:18 1739在北京时间12月7日凌晨 ... -
Android 节约用电技巧
2010-12-31 17:19 15051.降低屏幕亮度。通过 设置->声音和显示设置-> ... -
Android PreferenceActivity浅析
2010-12-30 18:47 1641看到很多书中都没 ... -
Android getprop解析
2010-12-29 19:39 6614在超级终端中输入getprop,就会输出机器 全部信息,包括 ... -
Android中Intent对应的category列表大全
2010-12-24 10:57 1979在Android中使用Intent对应的category列表最 ... -
Android android.intent.category解析
2010-12-24 10:07 17431、要弄清楚这个问题,首先需要弄明白什么是implicit(隐 ... -
Android 适配不同分辨率&hdpi、mdpi、ldpi&横屏竖屏
2010-12-20 10:54 3652一:不同的layout Android手机屏幕大小不一, ... -
Android 模拟器安装及使用
2010-11-14 02:21 1926你是否想测试下最新的 Google Android 操作系统, ... -
Android DDMS使用
2010-11-13 20:51 2529DDMS 的全称是Dalvik Debug M ... -
Android 学习e资源
2010-11-07 23:43 1448[url]http://www.3gfeixun.com/de ... -
Android SDK安装
2010-11-07 23:36 16571.下载:http://developer.android.c ... -
Android简介
2010-11-01 23:17 5398Android一词的本义指“机器人”,同时也是Google于2 ...
相关推荐
android源码的Launcher详细解析,分析Launcher的运行机制
Androidlauncher开发.pdf
Android Launcher源码下载,PagedView,PagedViewIcon
Android系统桌面Launcher3源码,可直接在Android Studio中编译。
安卓Android源码——安卓Android Launcher 桌面分页滑动代码.rar
android laucnher3 源码,仅供学习使用。
本书以Launcher为解析核心,全面深入地介绍了Launcher的清单、应用程序组件、资源配置、UI组件以及Launcher的操作等,包含了整个桌面的体系和技巧。本书语言通俗易懂,解析全面,有利于读者理解整个Launcher桌面的...
Android-launcher源码全面分析 一 Launcher默认界面配置(default workspace) 2 1 界面默认配置文件 2 2 LauncherProvider java的loadFavorites分析 3 二 Icon修改 界面布局调整 壁纸设置 5 1 图标大小和标题大小 5...
Android_launcher的源码详细分析.pdf
安卓Android源码——Android Launcher 源码修改可编译.zip
Android 6.0 Launcher3 增加屏幕切换动画的资源和源码包
Android Launcher 源码修改可编译.zip源码资源下载Android Launcher 源码修改可编译.zip源码资源下载
这个是android Launcher2.2 源码,我最近在学习,有人想跟我交流就到我的博客:http://blog.csdn.net/gqdy365
Android高级应用源码-Android Launcher 源码修改可编译.zip
仿Mac的dock android Launcher
SlidingDrawer隐藏屏外的内容,并允许用户通过handle以显示隐藏内容。该demo演示了SlidingDrawer应用及效果。
一个闪电般快的Android launcher,运行几乎不需要内存
android 桌面 launcher2的源代码, 可以编译运行。 作为学习参考
Android Launcher 桌面分页滑动代码,Launcher下可分多个界面,通过滑动实现界面切换。代码简单,适合初学者。需要预先下载Launcher源码
Android源码之Android Launcher2代码分享