- 浏览: 105960 次
- 性别:
- 来自: 成都
最新评论
-
sp42:
Oracle 不是很吊的么,怎么连个分页都这么麻烦?
数据库分页大全(oracle利用解析函数row_number高效分页) -
metarnetyflu:
不知道哪里快了!!!over()是最慢的,rownum其次,r ...
数据库分页大全(oracle利用解析函数row_number高效分页) -
wfd0807:
09年发的博文,五年了,一定影响到了不少人。首先,你描述的三层 ...
数据库分页大全(oracle利用解析函数row_number高效分页) -
diyunpeng:
学习了,写的不错。
python urlOpen使用代理 -
qepwqnp:
帖子沉的好深,涝起来
js_自己封装一个可查询frame中对象的一个方法
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" ><!-- </font-->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" />
<!-- </font-->intent-filter >
<!-- </font-->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" />
<!-- </font-->intent-filter >
搜索的 activity :
<!-- </font-->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"
/>
<!-- </font-->intent-filter
>
<!-- </font-->receiver
>
<!-- Intent received used to <u>uninstall</u> shortcuts from other applications –></font></p>
<p><font face="宋体 "><font style="font-size: 10pt" mce_style="font-size: 10pt" size="3">卸载快捷方式的广播接收器:</font></font><font style="font-size: 10pt" mce_style="font-size: 10pt"> <br /></font><font size="3"><font style="font-size: 10pt" mce_style="font-size: 10pt"><</font><font style="font-size: 10pt" mce_style="font-size: 10pt">receiver</font></font></p>
<p align="left"><font style="font-size: 10pt" mce_style="font-size: 10pt"><font size="3"><font color="#000000"> </font><font color="#7f007f">android:name</font><font color="#000000">=</font><font color="#2a00ff"><i>".UninstallShortcutReceiver"</i></font></font></font></p>
<p align="left"><font style="font-size: 10pt" mce_style="font-size: 10pt"><font size="3"><font color="#000000"> </font><font color="#7f007f">android:permission</font><font color="#000000">=</font><font color="#2a00ff"><i>"com.android.launcher.permission.UNINSTALL_SHORTCUT"</i></font><font color="#008080">></font></font></font><font style="font-size: 10pt" mce_style="font-size: 10pt"> <br /></font><font size="3"><font style="font-size: 10pt" mce_style="font-size: 10pt"><</font><font style="font-size: 10pt" mce_style="font-size: 10pt">intent-filter</font><font style="font-size: 10pt" mce_style="font-size: 10pt">></font></font><font style="font-size: 10pt" mce_style="font-size: 10pt"> <br /></font><font size="3"><font style="font-size: 10pt" mce_style="font-size: 10pt"><</font><font style="font-size: 10pt" mce_style="font-size: 10pt">action</font><font style="font-size: 10pt" mce_style="font-size: 10pt"><font color="#000000"> </font><font color="#7f007f">android:name</font><font color="#000000">=</font><font color="#2a00ff"><i>"com.android.launcher.action.UNINSTALL_SHORTCUT"</i></font><font color="#000000"> </font><font color="#008080">/></font></font></font><font style="font-size: 10pt" mce_style="font-size: 10pt"> <br /></font><font size="3"><font style="font-size: 10pt" mce_style="font-size: 10pt"></</font><font style="font-size: 10pt" mce_style="font-size: 10pt">intent-filter</font><font style="font-size: 10pt" mce_style="font-size: 10pt">></font></font><font style="font-size: 10pt" mce_style="font-size: 10pt"> <br /></font><font size="3"><font style="font-size: 10pt" mce_style="font-size: 10pt"></</font><font style="font-size: 10pt" mce_style="font-size: 10pt">receiver</font><font style="font-size: 10pt" mce_style="font-size: 10pt">></font></font></p>
<p align="left"><font size="3"><font face="宋体 "><font style="font-size: 10pt" mce_style="font-size: 10pt">声明</font></font><font style="font-size: 10pt" mce_style="font-size: 10pt">ContentProvider</font><font face="宋体 "><font style="font-size: 10pt" mce_style="font-size: 10pt">,用于对</font></font><font style="font-size: 10pt" mce_style="font-size: 10pt">launcher.db</font><font face="宋体 "><font style="font-size: 10pt" mce_style="font-size: 10pt">操作:</font></font></font><font style="font-size: 10pt" mce_style="font-size: 10pt"> <br /></font><font style="font-size: 10pt" mce_style="font-size: 10pt" size="3"><!-- 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"
/>
<!-- </font-->application
>
<
uses-sdk
android:minSdkVersion
=
"4"
/>
<!-- </font-->manifest
>
说明:
1.
标签头部还应声明:
android:sharedUserId="android.uid.shared"
,作用是获得系统权限,但是这样的程序属性只能在build整个系统时放进去(就是系统软件)才起作用,手动安装是没有权限的。
发表评论
-
INSERT INTO ON DUPLICATE KEY UPDATE
2017-04-20 17:28 426mysql当插入重复时更新的方法: 第一种方法: ... -
SpringMVC加载WebApplicationContext源码分析
2015-09-06 19:04 735Spring框架提供了构建Web应用程序的全功能MVC模块, ... -
CSS让你的IE浏览器崩溃
2010-06-06 12:58 934原文链接:http://blog.gulu77.com/?p= ... -
Android用户界面详解
2011-03-21 21:56 745这个章节描述怎么实现 ... -
【转】AndroidManifest.xml文件综合详解
2011-03-22 19:56 779转自:http://yangguangfu.j ... -
Javascript的回调机制讲解
2011-04-06 23:05 1064本文出自http://blog.csdn.ne ... -
再次封装IOCP的收获
2010-01-17 23:19 2640以前写过一篇用python封 ... -
译: Code::Blocks手册 使用篇
2010-01-25 00:05 1447原手册下载:http://www.codeblocks.or ... -
python模块学习 ---- Cookie
2010-04-02 23:18 1227最近在用GAE开发自己的 ... -
Python模块学习 ---- datetime
2010-04-07 11:02 889Python提供了多个内置模块用于操作日期时间,像ca ... -
Python模块学习 ---- filecmp 文件比较
2010-04-08 10:53 1091filecmp模块用于比较文件及文件夹的内容,它是一个 ... -
用Python写的图片蜘蛛人
2010-04-10 23:32 741写了个图片蜘蛛人玩玩,抓了几个网页试试,感觉不不错。核 ... -
Python模块学习 --- urllib
2010-04-16 15:13 837urllib模块提供的上层接口,使我们可以像读取本地文 ... -
Python模块学习 ---- atexit
2010-04-19 21:47 841atexit模块很简单,只定义了一个register函 ... -
C语言复杂声明
2010-05-23 21:31 635《C专家编程》第三章介绍了如何分析复杂的声明,讲的非常 ... -
像定义“函数”一样定义宏
2010-06-06 23:40 865可以使用宏定义没有返回值的“函数”。例如: #def ... -
MySQL Connector/C++入门教程(上)
2010-06-10 14:54 2640原文地址:http://dev.mysql.com/te ... -
python版本问题导致Boost.Python无法正常使用
2010-08-08 22:29 1370(www.darkbull.net) 今天打算将Pyth ... -
boost::shared_ptr的性能
2010-08-16 00:10 1831原文出版:http://www.darkbull.net/ ... -
跨语言使用对称加密
2010-09-16 17:27 1396这两天在写GM工具,使用wxPython开发,GM工具 ...
相关推荐
│ │ │ AndroidManifest.xml │ │ │ │ │ ├─java │ │ │ └─com │ │ │ └─bob │ │ │ └─arclayout │ │ │ │ AnimatorUtils.java │ │ │ │ Demo.java │ │ │ │ DemoActivity....
配置AndroidManifest.xml 使用百度SDK时,应用的AndroidManifest.xml主要需要注意以下三项: 4.1、权限 不同的功能需要申请不同的权限,因此在实际使用时,最好参考百度的SDK文档。 其次,在Android 6.0以后引入...
...........\AndroidManifest.xml ...........\ant.properties ...........\assets ...........\bin ...........\build.xml ...........\CheckMemory.iml ...........\gen ...........\...\me ...........\...
1》修改AndroidManifest.xml 主中android.intent.action.MAIN和android.intent.category.LAUNCHER【application】的 android:debuggable="true" 2》在入口处添加waitForDebugger代码进行调试等待。 Activity中a=0...
需要插入包称为非com.android.launcher3,并放置所有com.android.launcher3的引用,如:ProviderConfig.AUTHORITY,AndroidManifest.xml中的权限相关及提供者的权限属性等; ###改屏幕方向AndroidManifest.xml的入口...
代码中动态获取资源ID res\ .settings\ gen\ src\ libs\ assets\ .classpath AndroidManifest.xml project.properties ic_launcher-web.png .project proguard-project.txt
│ │ │ AndroidManifest.xml │ │ │ │ │ ├─java │ │ │ └─org │ │ │ └─tigase │ │ │ └─messenger │ │ │ ├─jaxmpp │ │ │ │ └─android │ │ │ │ ├─caps │ │ │ │ │ ...
/MyAnimationcxy /src com.cxy.myanimation /src/.../gen /assets /bin /libs /res /AndroidManifest.xml /ic_launcher-web.png /lint.xml /proguard-project.txt /project.properties
## 权限清单(AndroidManifest.xml) ```xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android....
1、contacts的androidmanifest.xml android:process="android.process.acore"说明此应用程序运行在acore进程中。 DialtactsActivity的intent-filter的action属性设置为main,catelog属性设置为launcher,所以此...
项目地址:https://github.com/sockeqwe/debugoverlay 效果图:如何使用在清单文件(AndroidManifest.xml)中添加权限及.DebugOverlayService服务: android:name="android.permission.SYSTEM_ALERT_WINDOW"/> ...
* AndroidManifest.xml => app\src\main\AndroidManifest.xml * assets\ => app\src\main\assets * res\ => app\src\main\res\ * src\ => app\src\main\java\ Next Steps: ----------- You can now build the ...
最后在AndroidManifest.xml文件里面,找到这句话删除掉(android:sharedUserId="android.uid.shared")。到现在为止,你就拥有了自己的Launcher了! 关于如何调试代码的问题请参考以下网址: 原帖地址:...
如果您使用此软件包,则无需修改AndroidManifest.xml或Info.plist。 :sparkles: 什么是新的 :open_book: 指导1.设置配置文件将Flutter Launcher名称配置添加到pubspec.yaml 。 一个例子如下所示。 dev_dependencies...
如果你要自己的名称,可以修改AndroidManifest.xml的这个节点: <application Android:icon=@drawable/ic_launcher> 不需要加文件扩展名。 2 修改程序名 请到values/strings.xml下 <?xml version=1.0 ...
示例Nova启动器主题 Nova Launcher是Android的高度可定制的启动器。 这种定制的一部分来自像您这样的开发人员。 ... 这是通过在AndroidManifest.xml中的标签下方添加以下内容来完成的 <actio
4、在AndroidManifest.xml文件中加入权限 <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 和 android:name=".My...
If you tried to view AndroidManifest.xml. You'd be left viewing this. P4F0\fnversionCodeversionNameandroid*...
在AndroidManifest.xml中增加写sd卡的权限: <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> ...
前言 本文主要是将最近工作中遇到的一个问题进行总结分享,...在清单需要配置的AndroidManifest.xml <application android:allowBackup=true android:icon=@mipmap/ic_launcher android:label=@string/app_name