Android Application基本组成部分


四个核心的组件
  1. Activity活动,主要用于前台和用户交互,即UI,Activity只是加载一个View而并非一个UI对象
  2. Service服务,主要用于后台并不和用户交互,处理一些后台程序,这些程序往往是不需要和用户交互的,Service具备RPC(RemoteProcedureCallProtocol)——远程过程调用协议能力
  3. ContentProvider,数据提供主要用户数据在各个程序之间的共享,特别是sqlite数据库,因为sqlite数据库是独享的数据库,也就是每个应用程序自己独享自己的的数据库
  4. BroadcastReceiver,广播,主要应用与整个应用程序在整个操作系统范围内发布和接收事件,即全局事件

组件之间的数据通信

Intent意图:主要用于四个核心的组件相互之间的数据通信,和各个组件的启动。意图是立即执行。
IntentFilter意图过滤器:用于意图精确的说明。
PendingIntent:用于事件激发执行意图。即率先说明意图,但不执行,待某事件激发后才会执行意图。【类似诸葛亮的锦囊妙计】

The Manifest File【应用程序配置文件】
AndroidManifest.xml文件形式出现。
主要配置:
  1. 四个组件
  2. 用户权限
  3. 商城的搜索关键字等【Google Play filters】
  4. 应用程序的唯一包名称
  5. 应用程序执行和编译的android最低或当前版本号【 Platform Version 】
  6. Screen size and density
  7. Input configurations
  8. Device features

Application Resource
  1. 文件夹为res/XXX里面
  2. 都会生成当前应用包名为前缀的R.java文件以供java程序调度和使用
  3. 静态,一旦生成不可修改
 
 

Android Application基本组成部分的更多相关文章

  1. My First Android Application Project 第一个安卓应用

    一.前言: 安卓(Android):是一种基于Linux的自由及开放源代码的操作系统,主要用在移动设备上,如手机.平板电脑.其他的设备也有使用安卓操作系统,比如:电视机,游戏机.数码相机等等. 二.具 ...

  2. Failed to apply plugin [id 'com.android.application'] 和 Could not find com.android.tools.build:gradle:2.XX的最正确的解决方法

    发现android studio是真的可爱啊,上一秒还没问题可以build运行,下一秒就出错...好,你任性,你牛逼.. 说下今天又遇到的两个问题:Failed to apply plugin [id ...

  3. eclipse:File->New没有Android Application Project的解决办法

    我的Eclipse版本是:Kepler Service Release 1,截图: 解决步骤: 1.单击Window,选择Customize Perspective,如图: 2.勾选Android A ...

  4. Professional Android Application Development

    Professional Android Application Development 访问地址 http://docs.google.com/fileview?id=0ByVHV5sjM4fNNj ...

  5. Plugin with id 'com.android.application' not found.

    构建报错: Error:(1, 0) Plugin with id 'com.android.application' not found. <a href="openFile&quo ...

  6. android application plugins framework

    android插件式开发 android application plugins framework http://code.google.com/p/android-application-plug ...

  7. Compile a native C Android application

    原文: Compile a native C Android application翻译: Zhiwei.Li 通过上网搜索,你可以发现很多种编译Android native应用的方法.我想说的是,不 ...

  8. android application类的用法

    android application类的用法 Application是android系统Framework提供的一个组件,它是单例模式(singleton),即每个应用只有一个实例,用来存储系统的一 ...

  9. Android Application Fundamentals——Android应用程序基础知识

    Application Fundamentals--应用程序基础知识 Key classes--关键类 Activity Service BroadcastReceiver ContentProvid ...

随机推荐

  1. qt read excel

    void exceladapter::readfile(QString filename, QString sheetname, int colNo){ QSqlDatabase db = QSqlD ...

  2. iOS 二维码的生成 QREncoder

    生成二维码: 在生成二维码的库中QREncoder最为常见,但是由于中文字符的特殊性,生成中文的时候有时会出现一定的错误,所以建议使用libqrencode,是一个纯C编写的类库. 以libqrenc ...

  3. 更新github上的代码

    昨晚熬夜写完了"git上传本地项目代码到github"的任务,早上来公司先把早上的工作完成后,抽点时间继续来继续更新文章 更新github上的代码 一.克隆代码 1.把大神的代码c ...

  4. php用面向对象从mysql取数据

    <?php //建立数据库的链接@$_mysqli = new mysqli('localhost','root','123456','dbname');if(mysqli_connect_er ...

  5. HashMap详解 基于jdk1.7

    转载自:http://zhangshixi.iteye.com/blog/672697 1.    HashMap概述: HashMap是基于哈希表的Map接口的非同步实现.此实现提供所有可选的映射操 ...

  6. Qt_为什么学习Qt

    1)学习GUI编程,市场上任何一款产品几乎都带有图形界面,市场上很火的Androoid.IOS编程无非也是GUI app编程,GUI编程都是差不多的,学习Qt后再学习ANdroid IOS ,那都是S ...

  7. Microsoft Windows Server

    Microsoft Windows Server Microsoft Windows Microsoft Windows 是微软推出的个人版操作系统: Microsoft Windows Server ...

  8. python⽤户登陆

    ⽤户登陆(三次输错机会)且每次输错误时显示剩余错误次数(提示:使⽤字符串格式化) count = 3 while count < 4: count -= 1 username = input(' ...

  9. [LOJ] 分块九题 4

    https://loj.ac/problem/6280 区间修改,区间求和. 本来线段树的活. //Stay foolish,stay hungry,stay young,stay simple #i ...

  10. (9) openssl enc(对称加密)

    对称加密工具,了解对称加密的原理后就很简单了,原理部分见下文. openssl   enc  -ciphername   [-in filename]   [-out filename]   [-pa ...