凌乱的碎片~
地球小野花 · 共 42 篇文章
一个看不到的东西叫Service
一个看不到的东西叫Service 官方文档是这么说: A Service is an application component that can perform long-running operations in the background and does not provide a user interface. Another application component can start a service and it will continue to run in the background even if the user switches to another app…
2014-01-21 11:32 · Android 应用开发 · 评论(0)
Intent这个东西
Intent这个东西 Intent学名:意图,主要用于android应用的各个组件之间的通讯。它包含发生请求的组件中的一组信息送给被请求的对象。你可以想象它是快递员,它携带了各中“物件“给客户。 要寄快递,我们得先打电话。拿起你的Android手机,按下拨号键盘的时候你的android手机做了些什么?“意图“有用吗? 按下按键这个动作后 public void dialButtonPressed() { if (isDigitsEmpty()) { // No number entered. handleDialButtonClickWithEmptyDigits(); } else { f…
2014-01-21 10:35 · Android 应用开发 · 评论(0)
从Android Activity开始
从Android Activity开始 (转载注明出处) 至于Activity是什么,不做详细述说可参考 Google Android 开发文档。生命在于运动,Activity是怎么动起来的?它的“能量“又是怎么传递的?看两个东西 1.Starting an Activity 2.Starting an activity for a result 详细: 1 Starting an Activity startActivity Param: intent Extra:(参考:Intents and Intent Filters) Intent 包括 activity action data(…
2014-01-17 15:17 · Android 应用开发 · 评论(0)
两年多没来,整理一下知识
伴随Android开发已经4个年头,应用、系统、驱动都开发过。也没好好整理过相关知识,是时候风骚一下了。 Android 应用开发 从Android Activity开始 Intent这个东西 一个看不到的东西叫Service Android 系统开发 Android 驱动开发
2014-01-17 15:04 · 知识整理 · 评论(0)
Android 4.0 编译全程...
进过几天的等待 ,几经波折终于把android 4.0 的代码下载下来。( http://android-sz.iteye.com/blog/1259206 ) 终于可以编译了,期待…… 编译环境: 1,系统: Ubuntu 10.10 (64bit) 2,Jdk: java (64bit) 3,交叉编译链: 自带 为了避免编译过程中出现错误,执行如下命令安装下面软件 $:sudo apt-get install zlib1g-dev lib64z1-dev bison flex libncurses5-dev libgl1-mesa-dev gperf gnupg zip libsdl-d…
2011-11-18 13:35 · Android · 评论(5)
写一些ALSA的文章
什么是ALSA ALSA是Advanced Linux Sound Architecture,高级Linux声音架构的简称,它在Linux操作系统上提供了音频和MIDI(Musical Instrument Digital Interface,音乐设备数字化接口)的支持。在2.6系列内核中,ALSA已经成为默认的声音子系统,用来替换2.4系列内核中的OSS(Open Sound System,开放声音系统)。 ALSA的主要特性包括:高效地支持从消费类入门级声卡到专业级音频设备所有类型的音频接口,完全模块化的设计, 支持对称多处理(SMP)和线程安全,对OSS的向后兼容,以及提供了用户空间的…
2011-11-17 15:43 · Android Drivers · 评论(0)
Android 4.0 亮点之WI-FI Direct
Wi-Fi Direct 来自官网: Android now supports Wi-Fi Direct for peer-to-peer (P2P) connections between Android-powered devices and other device types without a hotspot or Internet connection. The Android framework provides a set of Wi-Fi P2P APIs that allow you to discover and connect to other devices whe…
2011-11-15 20:01 · Android · 评论(0)
Android 4.0 源码下载中....
经过3.0+ 版本不开源,终于等到4.0的开源,也可以看看4.0的绚丽界面实现的source了。 源码下载地址:(参考google文档) http://source.android.com/source/downloading.html 过程中 repo sync -j16 代码同步不下来 (链接有问题?) 先不管咯。 迫不及待,先看看android-4.0.1_r1里源码包含了什么。 先把manifest clone 下载下来看看。 $: git clone https://android.googlesource.com/platform/manifest -b android-4.0.…
2011-11-15 11:02 · Android · 评论(2)
Android RIL CDMA分支总结(1)
Android RIL CDMA分支总结 1. CDMA分支代码结构 代码结构如下: ril |-- include | `-- telephony | |-- ril.h | `-- ril_cdma_sms.h |-- libril | |-- ril.cpp | |-- ril_commands.h | |-- ril_event.cpp | |-- ril_event.h | `-- ril_unsol_commands.h |-- reference-cdma-sms | |-- reference-cdma-sms.c | `-- reference-cdma-sms.h |--…
2011-05-16 21:36 · Android · 评论(0)
Linux中的工作队列
Linux中的工作队列 (2008-06-11 15:40) 分类: Linux http://blog.chinaunix.net/space.php?uid=487105&do=blog&cuid=971040 [前记]Linux自从2.6.20之后,工作队列发生了一些变化,目前从网络上搜索的资料一般都是介绍老版本的工作队列,很少见到对新版本的介绍。本文对新老版本都做了简要概述,并分别提供了简单的实作案例。 *******************************************************************************************…
2011-04-06 15:14 · 评论(0)
Marvell pxa310/300中断唤醒源的设置
软硬件环境: Pxa310/300 + WinCE + WinMobile 中断唤醒源的设置可以说是一个纯“硬件”的活,因为它跟CPU关系非常紧密,不同的CPU即使同样在wince或者winmobile环境下,对于中断唤醒源的设置都是不同的。最近对于marvell pxa310/300里面中断唤醒源的设置了解了一下,发现跟之前pxa270系列的CPU也有很大差别。 将一个GPIO设置为中断唤醒源,在pxa270里面需要做如下工作: 1. 将此GPIO配置为输入GPIO功能,根据要求使能该GPIO是上升沿触发还是下降沿触发; 2. 用动态方式或者静态方式,让此GPIO关联上一个系统中断; 3.…
2011-04-06 12:53 · 评论(0)
evdev的一个BUG
自己调试的系统偶有死机,跟同事们一起琢磨的结果如下:在evdev.c文件中存在一个隐患的BUG。 static int evdev_open(struct inode *inode, struct file *file) { struct evdev *evdev; struct evdev_client *client; int i = iminor(inode) - EVDEV_MINOR_BASE; int error; if (i >= EVDEV_MINORS) return -ENODEV; error = mutex_lock_interruptible(&evdev_tabl…
2011-03-31 10:53 · Android Drivers · 评论(0)
Framework添加AIDL文件
Framework编译AIDL文件 今天下午下载一个开源的Android系统,编译中老遇到如下aidl错误,思考了很久,终于找到解决办法。AIDL是什么?不清楚的可以google。这里重点是如何在android framework中添加新的接口。如下例子,如果没有添加AILD文件,编译系统的时候会出现如下错误。 f rameworks/base/core/java/android/bluetooth/BluetoothHid.java:86: cannot find symbol symbol : class IBluetoothHid location: class android.blu…
2011-03-30 18:30 · 评论(1)
android移植整理
android 移植整理 转自: http://blogold.chinaunix.net/u3/90973/showart_2205463.html
2011-03-25 10:49 · Android Drivers · 评论(0)
Linux Kernel and Android 休眠与唤醒
Linux Kernel and Android 休眠与唤醒(中文版) 转自: http://www.thinksrc.com/2010/04/18/suspend-cn.html#sec-1 Table of Contents 简介 国际化 版本信息 对于休眠(suspend)的简单介绍 Linux Suspend 的流程 相关的文件: 准备, 冻结进程 让外设进入休眠 Resume Android 休眠(suspend) 涉及到的文件: 特性介绍 Early Suspend Late Resume Wake Lock Android Suspend Early Suspend Late …
2011-03-24 17:33 · Android Drivers · 评论(0)