任何资料在官方文档面前都逊色啊。算是中文的总结吧,对Android Develop API 可以对着看,大家交换下意见,错误请务必指正。
Android应用
- .Android是基于Linux内核的多用户操作系统,默认会给每一个应用分配唯一的User ID,并为该应用所有的文件赋予基于此User ID的访问限制(应该是沿用linux自身基于用户的权限管理实现)
- Android应用以独立的linux进程执行,拥有自己的虚拟机。
- 不同的应用可以共用一个User Id,相互共享文件或者是共用进程和虚拟机(使用相同证书的情况下)--没实践过
- 应用安装时必须让用户赋予访问资源的权限,比如相机,通讯录。
Android组件
Activity
用户界面
Service
后台服务
Content provider
应用共享数据
Broadcast receivers
系统级别广播
AndroidManifest.xml
位于应用根目录声明应用组件
声明应用依赖
声明组件功能
Activity

Table 1. A summary of the activity lifecycle's callback methods.
|
Called when the activity is first created. This is where you should do all of your normal static set up — create views, bind data to lists, and so on. This method is passed a Bundle object containing the activity's previous state, if that state was captured (see Saving Activity State, later).
Always followed by |
No | onStart() |
|
|
Called after the activity has been stopped, just prior to it being started again.
Always followed by |
No | onStart() |
|
|
Called just before the activity becomes visible to the user.
Followed by |
No |
onResume() or onStop()
|
|
|
Called just before the activity starts interacting with the user. At this point the activity is at the top of the activity stack, with user input going to it.
Always followed by |
No | onPause() |
|
|
Called when the system is about to start resuming another activity. This method is typically used to commit unsaved changes to persistent data, stop animations and other things that may be consuming CPU, and so on. It should do whatever it does very quickly, because the next activity will not be resumed until it returns.
Followed either by |
Yes |
onResume() or onStop()
|
|
|
Called when the activity is no longer visible to the user. This may happen because it is being destroyed, or because another activity (either an existing one or a new one) has been resumed and is covering it.
Followed either by |
Yes |
onRestart() or onDestroy()
|
|
|
Called before the activity is destroyed. This is the final call that the activity will receive. It could be called either because the activity is finishing (someone called on it), or because the system is temporarily destroying this instance of the activity to save space. You can distinguish between these two scenarios with the method. |
Yes | nothing |
ActivityA 启动ActivtyB时,两个activty都经历状态转换,当A与B需要数据交互需要注意调用时序列。
ActivityA.onPause() ->ActivityB.onCreate()-> ActivityB.onStart()->ActivityB.onResume->ActivityA.onStop()
系统将会保存stop的activity至堆栈,Back Button按下之后会弹出上一个Activty。
当activity的手机方向改变时系统会destroy并create。这时onRestoreInstanceSate()跟onStoreInstanceState()方法就会被调用,默认实现是保存当前的view状态,如果希望不同手机方向有不同的布局,需要自己保存View的状态。
android系统通过intent在不同组件之间相互调用。
android允许activityA启动其他应用的activtyB(通过进程间通信的binder机制),但是是通过向系统发布intent调用消息来实现的,activtyB运行在B进程,通过intent返回数据。
相关推荐
综上所述,"android4.0_API_develop"文件很可能包含了这些关键功能的文档和指南,帮助开发者理解和利用这些新特性来构建兼容API 4.0的应用程序。对于想要学习或升级旧版应用的开发者来说,这份资源无疑是宝贵的参考...
Android Develop Tools 和 Android SDK 是Android应用开发的核心工具集,它们为开发者提供了构建、测试和调试Android应用程序所需的所有组件。在本文中,我们将深入探讨这两个工具的重要性、功能以及如何使用它们。 ...
1. **API文档与指南**:Android官方提供了详尽的API文档,包括类库、方法和接口的使用说明,是开发者必备的学习资料。此外,还有各种开发者指南,如UI设计规范、性能优化建议等,帮助开发者提升代码质量和用户体验。...
总结来说,通过研究WordPress-Android-develop项目,开发者可以学习到Android应用的基本架构,如何利用WordPress REST API,使用网络请求库进行数据交互,本地数据存储的方法,UI设计技巧,以及安全性和权限管理的...
源码中包含了各种动画和过渡效果的实现,如淡入淡出、滑动切换等,这些都是通过Android的Animation和Transition API实现的。学习这部分代码可以帮助我们了解如何在应用中添加流畅的交互体验。 6. **手势检测** ...
Chapter 1 Android Overview Android Overview History Android Versions Android Flavors Summary Chapter 2 Java Review Comments Data Types: Primitives and Objects Modifiers Arrays Operators Control Flow ...
【标题】"PaddleOCR-develop-android_demo.rar"指的是一个基于PaddleOCR开发的Android应用程序的压缩包。PaddleOCR是百度飞桨(PaddlePaddle)框架下的一个开源OCR(Optical Character Recognition,光学字符识别)...
本地离线,最新Android官方API文档P版。使用IE游览,无法显示左导航栏(Google公司的问题),可以点击上面《develop》进入文档,主页有其它6个包的链接,老司机可以直接进文件夹游览;另外两大游览器都可以正常显示...
理解Android的网络API和处理异步任务的方式,如AsyncTask或Retrofit,是实现网络功能的基础。 十、多媒体与传感器 Android支持音频、视频和图像处理,以及各种传感器的访问。学习如何处理多媒体数据和利用传感器,...
android开发离线API html格式
《Apress Pro Android Web Apps Develop for Android Using HTML5, CSS3 & JavaScript》这本书详细探讨了如何利用HTML5、CSS3和JavaScript技术在Android平台上构建高效、功能丰富的移动Web应用。以下是一些关键知识...
此书《Android UI Fundamentals: Develop & Design》由Jason Ostrander撰写,旨在向开发者详细介绍如何设计并实现一个用户体验良好的Android应用程序。在这本出版于2012年3月5日的图书中,作者详细介绍了Android UI...
1. **Android SDK**:Android软件开发工具包(SDK)是开发者入门的基础,包括Java Development Kit(JDK)、Android API库、Android Studio IDE、模拟器以及其他必要的工具。 2. **Activity生命周期**:Activity是...
1. **AndroidManifest.xml**:每个Android应用的核心配置文件,用于定义应用的基本属性,如应用名、所需的权限、启动活动等。通过查看源码,开发者可以学习如何正确配置应用权限和组件。 2. **Activity**:Android...
1. **Android SDK与环境配置** - **Android SDK**:Android软件开发工具包,是开发Android应用的基础,包含了编译、调试所需的各种工具和库文件。 - **Android Studio**:Google推荐的官方集成开发环境(IDE),...
在Android应用开发中,使用百度地图API是一项常见的需求,它能帮助开发者集成地图功能,实现定位、导航、路径规划等多种服务。本教程将详细介绍如何在Android应用中集成和使用百度地图API。 首先,我们需要了解百度...
《Pro Android Web Apps: Develop for Android Using HTML5, CSS3 & JavaScript》是一本旨在教授开发者如何利用HTML5、CSS3及JavaScript等前端技术来创建高质量Android Web应用的专业指南。本书不仅介绍了基本的理论...
- 安装Android SDK,并配置环境变量指向SDK的安装路径(例如:D:\Software\Develop\Android\android-sdk-windows)。 - 在Eclipse中安装Android Development Tool(ADT)插件,通过Help -> Install New Software.....
本文将基于提供的"Android auto-update-service-develop"源码Demo,深入剖析自动更新服务的实现机制,为学习者提供详尽的指导。 首先,自动更新服务通常基于Google的Play服务框架,利用Google Play Store的更新机制...
在Android开发领域,"MusicLake-develop_android开发_MusicLake_"是一个可能的项目名称,暗示了开发者正在构建一个与音乐和地理位置相关的应用。这个项目的核心功能是获取用户当前的地理位置,并实时更新地图显示。...