Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2026227
  • 博文数量: 413
  • 博客积分: 10926
  • 博客等级: 上将
  • 技术积分: 3862
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-09 18:14
文章分类

全部博文(413)

文章存档

2015年(5)

2014年(1)

2013年(5)

2012年(6)

2011年(138)

2010年(85)

2009年(42)

2008年(46)

2007年(26)

2006年(59)

分类: Java

2006-12-18 16:29:52

Online Document:
    http://developer.android.com

Tuturial:
  • Android Development Tutorial (Simple)
  • Professional Android 2 Application Development
    )
  • Pro Android 2

  • Android A programmers guide
    %5B1%5D.Hill.Android.A.Programmers.Guide.Jul.2008.eBook-DDU.pdf
     
  1. Preparation
    1. Android Features
      1. Java virtual machine: Dalvik
      2. Browser: based on Webkit engine
      3. Graphic: 2D, and 3D (OpenGL)
      4. Data store: SQLite
      5. Media: audio, video, and images
      6. GSM
      7. Bluetooth, WiFi, 3G, EDGE
      8. Camera, GPS, compass
    2. Supported Operating System
      1. Linux(i386)
      2. Windows
      3. Mac OS X(intel)
    3. Supported Development Environment
      1. Eclipse IDE(Recomended)
        1. Eclipse 3.4 (Ganymede) or 3.5 (Galileo) with Eclipse JDT plugin
        2. JDK (JRE alone is not sufficient)
        3. NDK (optional) to develop native application (JNI)
        4. Android Development Tools(ADT) plugin
      2. Apache Ant
        1. Apache Ant
        2. JDK (JRE alone is not sufficient)
      3. ...
    4. Supported Programming Language
      1. Java to write application
      2. C/C++ to create native shared libraries to be invoked in Java application via JNI (Java Native Interface)
    5. Postfix of Application Installation Package: .apk
    6. SDK Contains
      1. Class library
      2. Emulator
      3. Some use tools, such as ddms, adb, etc.
      4. Sample Code
        ApiDemos under SDK is very useful.
      5. ...
    7. ...
  2. Development Flow
    1. Create Android project with Eclipse, and create run configuration file via Eclipse
    2. Write source code
      1. Prepare layout configuration file in xml format for each window, these xml file must be placed in /res/layout for both landscape and portrait styles screen, or /res/layout-land for landscape style screen, or /res/layout-port for portrait style screen. You can also create UI elements in your source code
      2. Copy necessary images files used in layout xml files or source code to /res/drawable, or /res/drawable-land, or /res/drawable-port
      3. It is optional to create arrays.xml, attrs.xml, dimens.xml, string.xml, and styles.xml in /res/values
      4. Copy necessary raw files to /res/raw which Java application can read datas from during run-time.
      5. Write Java source code, there are 4 typs of java components:
        1. Activities
        2. Services
        3. Content Providers
        4. Broadcast Receivers
      6. Update manifest file named AndroidManifest.xml to:
        1. Declare application name and version
        2. Declare activity(window) when to launch the application and other activities
        3. Declare receivers (optional)
        4. Declare uses-permissions (optional)
      7. ...
    3. Sign
         Any package should be signed, otherwise, it can't be installed to Android mobile devices. No certificate authority takes responsibility to sign application, you just need to sign your appliation by your self.
      1. Build project in Release mode, since Eclipse/Ant will sign apk with debug private key automatically in debug mode.
      2. Use keytool to generate a private key
      3. Use jarsigner to sign .apk
      4. Use zipalign to optimize the final .apk
    4. Install/Uninstall
      1. For application has not published on store
        1. Use via Eclipse
        2. Use tool 'adb'
        3. Use file explorer, such as AndExplorer.apk, astro, etc.
      2. xxx
    5. Debug
      1. Set build mode to "Debug" in Eclipse
      2. Set to "Enable USB debug" on the device
    6. ...
阅读(1514) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~