手机开发的相关内容,也许以后会有收集 (Android etc)
今天的发现,有预置的key->value的系统存储接口:
另外,文章介绍的 Activity 的 Intent Filter 部分也是不错的,详细的得看原文。
引用
使用 SharedPreferences
SharedPreferences 使用 xml 格式为 Android 应用提供一种永久的数据存贮方式。对于一个 Android 应用,它存贮在文件系统的 /data/ data/your_app_package_name/shared_prefs/目录下,可以被处在同一个应用中的所有 Activity 访问。Android 提供了相关的 API 来处理这些数据而不需要程序员直接操作这些文件或者考虑数据同步问题。
SharedPreferences 使用 xml 格式为 Android 应用提供一种永久的数据存贮方式。对于一个 Android 应用,它存贮在文件系统的 /data/ data/your_app_package_name/shared_prefs/目录下,可以被处在同一个应用中的所有 Activity 访问。Android 提供了相关的 API 来处理这些数据而不需要程序员直接操作这些文件或者考虑数据同步问题。
// 写入 SharedPreferences
SharedPreferences preferences = getSharedPreferences("name", MODE_PRIVATE);
Editor editor = preferences.edit();
editor.putBoolean("boolean_key", true);
editor.putString("string_key", "string_value");
editor.commit();
// 读取 SharedPreferences
SharedPreferences preferences = getSharedPreferences("name", MODE_PRIVATE);
preferences.getBoolean("boolean_key", false);
preferences.getString("string_key", "default_value");
SharedPreferences preferences = getSharedPreferences("name", MODE_PRIVATE);
Editor editor = preferences.edit();
editor.putBoolean("boolean_key", true);
editor.putString("string_key", "string_value");
editor.commit();
// 读取 SharedPreferences
SharedPreferences preferences = getSharedPreferences("name", MODE_PRIVATE);
preferences.getBoolean("boolean_key", false);
preferences.getString("string_key", "default_value");
另外,文章介绍的 Activity 的 Intent Filter 部分也是不错的,详细的得看原文。
没有时间细看那么多文章,在此摘录和备忘一些内容:
(有些都是人家三年前的研究了。。落伍啊,部分可能正常方式访问不到,再次和国外落伍了。。)
1 The Android boot process from power on
2 Android Initialization Process
(有些都是人家三年前的研究了。。落伍啊,部分可能正常方式访问不到,再次和国外落伍了。。)
1 The Android boot process from power on
引用
1. Power on and boot ROM code execution
2. The boot loader
3. The Linux kernel
4. The init process
5. Zygote and Dalvik
6. The system server
7. Boot completed
2. The boot loader
3. The Linux kernel
4. The init process
5. Zygote and Dalvik
6. The system server
7. Boot completed
2 Android Initialization Process
引用
init is the first process after kernel started. The corresponding source code lies in: device/system/init. It does the following tasks step by step:
1. Initialize log system.
2. Parse /init.rc and /init.%hardware%.rc.
3. Execute early-init action in the two files parsed in step 2.
4. Device specific initialize. For example, make all device node in /dev and download firmwares.
5. Initialize property system. Actually the property system is working as a share memory. Logically it looks like a registry under Windows system.
6. Execute init action in the two files parsed in step 2.
7. Start property service.
8. Execute early-boot and boot actions in the two files parsed in step 2.
9. Execute property action in the two files parsed in step 2.
10. Enter into an indefinite loop to wait for device/property set/child process exit events. For example, if an SD card is plugined, init will receive a device add event, so it can make node for the device. Most of the important process is forked in init, so if any of them crashed, init will receive a SIGCHLD then translate it into a child process exit event, so in the loop init can handle the process exit event and execute the commands defined in *.rc(it will run command onrestart).
1. Initialize log system.
2. Parse /init.rc and /init.%hardware%.rc.
3. Execute early-init action in the two files parsed in step 2.
4. Device specific initialize. For example, make all device node in /dev and download firmwares.
5. Initialize property system. Actually the property system is working as a share memory. Logically it looks like a registry under Windows system.
6. Execute init action in the two files parsed in step 2.
7. Start property service.
8. Execute early-boot and boot actions in the two files parsed in step 2.
9. Execute property action in the two files parsed in step 2.
10. Enter into an indefinite loop to wait for device/property set/child process exit events. For example, if an SD card is plugined, init will receive a device add event, so it can make node for the device. Most of the important process is forked in init, so if any of them crashed, init will receive a SIGCHLD then translate it into a child process exit event, so in the loop init can handle the process exit event and execute the commands defined in *.rc(it will run command onrestart).
android里,很多命令都没有,但可以借助一个工具箱子,使用这些命令,那就是buxybox。
busybox简介
busybox简介
引用
BusyBox 是标准 Linux 工具的一个单个可执行实现。BusyBox 包含了一些简单的工具,例如 cat 和 echo,还包含了一些更大、更复杂的工具,例如 grep、find、mount 以及 telnet。有些人将 BusyBox 称为 Linux 工具里的瑞士军刀.简单的说BusyBox就好像是个大工具箱,它集成压缩了 Linux 的许多工具和命令。
1、BusyBox 的诞生
BusyBox 最初是由 Bruce Perens 在 1996 年为 Debian GNU/Linux 安装盘编写的。其目标是在一张软盘上创建一个可引导的 GNU/Linux 系统,这可以用作安装盘和急救盘。
2、busybox的用法
可以这样用busybox
#busybox ls
他的功能就相当运行ls命令
最常用的用法是建立指向busybox的链接,不同的链接名完成不同的功能.
#ln -s busybox ls
#ln -s busybox rm
#ln -s busybox mkdir
然后分别运行这三个链接:
#./ls
#./rm
#./mkdir
就可以分别完成了ls rm 和mkdir命令的功能.虽然他们都指向同一个可执行程序busybox,但是只要链接名不同,完成的功能就不同,很多linux网站都提供busybox的源代码下载。
1、BusyBox 的诞生
BusyBox 最初是由 Bruce Perens 在 1996 年为 Debian GNU/Linux 安装盘编写的。其目标是在一张软盘上创建一个可引导的 GNU/Linux 系统,这可以用作安装盘和急救盘。
2、busybox的用法
可以这样用busybox
#busybox ls
他的功能就相当运行ls命令
最常用的用法是建立指向busybox的链接,不同的链接名完成不同的功能.
#ln -s busybox ls
#ln -s busybox rm
#ln -s busybox mkdir
然后分别运行这三个链接:
#./ls
#./rm
#./mkdir
就可以分别完成了ls rm 和mkdir命令的功能.虽然他们都指向同一个可执行程序busybox,但是只要链接名不同,完成的功能就不同,很多linux网站都提供busybox的源代码下载。
碰到一篇教程,有点兴趣,也许某天用的上,于是乎跟着操作了一下,证实是可行的,提供的下载都还有效,很多配置的说明都提供的下载不太好用,比较讨厌。。
用到的软件:
Jdk1.5 :
ActivePerl-5.6.1.635-MSWin32-x86.msi :
S60 Platform SDKs for Symbian OS, for C++:
Carbide.c++ 2.0
不转内容了,参考原文吧:
http://www.cppblog.com/kesalin/archive/2009/07/09/89615.html
不知道水深如何,只是了解了一下
一篇文章:《为什么大家觉得Symbian开发比较难?》
引用
Symbian开发入门教程
罗朝辉(飘飘白云) 2009.07.09
http://www.cppblog.com/kesalin
(转载时请注明作者和出处。未经许可,请勿用于商业用途)
目录:
一, 环境配置
二, 项目设置
三, 开发流程
四, 参考书籍
罗朝辉(飘飘白云) 2009.07.09
http://www.cppblog.com/kesalin
(转载时请注明作者和出处。未经许可,请勿用于商业用途)
目录:
一, 环境配置
二, 项目设置
三, 开发流程
四, 参考书籍
用到的软件:
Jdk1.5 :
ActivePerl-5.6.1.635-MSWin32-x86.msi :
S60 Platform SDKs for Symbian OS, for C++:
Carbide.c++ 2.0
不转内容了,参考原文吧:
http://www.cppblog.com/kesalin/archive/2009/07/09/89615.html
不知道水深如何,只是了解了一下
一篇文章:《为什么大家觉得Symbian开发比较难?》
这是产品图,不是真机图,但可以看到我写的程序的icon,在左下角,Z的图标。
这个也算断断续续的忙活了几个月的时间了
程序里面设计的比较传统,没有什么好展示的了。。。
看看现场的截图:
引用
1月7日,联想在美国拉斯维加斯发布新一代智能手机“乐phone”,从目前公布的图片来看,该手机内置了大量应用软件,其中手机支付宝的Logo赫然在列。由于乐phone采用Android系统,分析人士指出,这意味着Android版支付宝即将面世。
据了解,随着3G网络的发展,手机端的成为各大网络巨头抢占的重点。支付宝在去年6月推出Windows Mobile版手机软件以来,先后发布了塞班、iPhone平台下的相关软件,而何时覆盖黑莓与Android系统成为用户关心的话题。
据了解,随着3G网络的发展,手机端的成为各大网络巨头抢占的重点。支付宝在去年6月推出Windows Mobile版手机软件以来,先后发布了塞班、iPhone平台下的相关软件,而何时覆盖黑莓与Android系统成为用户关心的话题。
android的程序定义各种语言的环境很简单,定义不同的语言环境下的文字。
比如,我们要在中文环境下显示程序名为“阿权的书房”,在英文环境下叫“hqlulu's blog”。
引用
internationalization (国际化)简称 i18n,因为在i和n之间还有18个字符,localization(本地化 ),简称L10n。 一般说明一个地区的语言时,用 语言_地区的形式,如 zh_CN, zh_TW.
各国语言缩写 http://www.loc.gov/standards/iso639-2/php/code_list.php
国家和地区简写 http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
android 对i18n和L10n提供了非常好的支持。android没有专门的API来提供国际化,而是通过对不同resource的命名来达到国际化,同时这种命名方法还可用于对硬件的区分,如不同的新视屏用不同的图片。
各国语言缩写 http://www.loc.gov/standards/iso639-2/php/code_list.php
国家和地区简写 http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
android 对i18n和L10n提供了非常好的支持。android没有专门的API来提供国际化,而是通过对不同resource的命名来达到国际化,同时这种命名方法还可用于对硬件的区分,如不同的新视屏用不同的图片。
比如,我们要在中文环境下显示程序名为“阿权的书房”,在英文环境下叫“hqlulu's blog”。





