I want to say enjoy your android walk through with these android notes …

Know How / Android Platform .. 

Dalvik virtual machine

 Android use DVM (Dalvik Virtual Machine.) Following are some points  on DVM and android relation….

1. byte code vm similar to JVM
2. .dex byte code files -> java class files got converted into .dex files.
3. In Every process run in it’s own Dalvik VM runtime.
4. Mobstr cpus are register based so dalvik cuts over head
.dex allows proicesses to share system classes saves memory
5. Integrating and Extending the existing components …
Integrating existing components –>
Fire Intent and pick one of the already available set of library which we need for
example    –> Gmail wants photo and it integrate picasa lib for picking photos …
6. Android has flushed issue tracker
http://code.google.com/p/android
Group for discussion ….
http://code.google.com/groups.html
7. Bluetooth API –> Is part of the Android API..

  Introduction to SDK

  Concepts …. Application building blocks , There are Four building blocks of every android application. Every android application can have one of these or all of these in it.

1. Activity –> UI Components …
2. Intent Receivers –> Pices of code responds to notifications or status changes
3. Services –> dont have UI and runs in backgrounds ..
4. Content Provider –> Provide Handel to Deal with Data.

Some More Detail on these Building blocks

    1/ Activity –>
1/ Can be faceless
2/ can be in a floating window
3/ Can return a value.
4/ Can be embedded.

Views - Used for building android screens…

1. TextView EditText, Button, Image View
CheckBox, Lists
2. Every activity has a tree of views
1. view can be in xml
2. view can be instantiated from code.
3. support xml based styles and themes.

Layouts

1.  FrameLayout
2.    Linear layout
3.    RelativeLayout
4.    TableLayout
5.    AbsoluteLayout view given specific layout

   2/ Intents and Intents Filers

Intents description what you want to do.        
- Moving from one screen to another screen (we can declare intents what will do following task…)
- Caller calles startActivity(myintent),
- System picks Activity whose IntentFilter best matches myIntent.
- New Activity is informed of the Intent.
Intent Receivers
- Respond to alarms and notifications
- Will wake up your process if necessary
- System can broadcast intents : data


connections, phone state changes, etc.
- Intent receivers can start Services for lengthy tasks(e.g downloading new data).
- IntentReceivers in AndroiidManifest.xml
- Can also attach Intent Receivers to other objects so they can receive notifications( Activities , Views etc.)

 3/ Services

- Faceless classes that run in the background.
- Music player , network download, etc.
- Services run in your applications process or their own process.
- your code can bind to Services in your process or another process.
- Once bound, you communicates with Services using a remotable interface defined in IDL.

 4/ Content Providers

- enabling data sharing across Applications .
- Query data (Returns Cursor)
- delete , Update , and insert rows.
- Hide underlaying implementation
- Work across processes.
- All content is rep by URI’s
- Convenience methods mean clients dont’ need to know syntax

 Application Life Cycle …

        - Applications run in their own processes.
- Processes are started and stopped as needed to run an app components Process.

         Life cycle Methods …   
onCreate() –> we can check revive all the states when we get back to here ….
onPause()  –> we would like to pause and save all of our states ….
onStop()    –> we like to close services or other system resources that we have acquired.

-  There is a limit for amt of computations in onCreate() or lifeCycle Methods So be careful while using them and decide  what to put what not to put …..

 

 Other API’s in Android

1. 2D Graphics ….
We can build custon graphics components ….

2. Location Manager
-    Applicationa can refister for notifications of current locations
-  Can register for app specific Intents to be fired based on proximity.
- We can register with location manager for particular loc so that we can get to know the location
- Track files …  lugia@mit.edu (Anh Nguyen) xml file containing lat long, or google earth file …
- Map view , MapActivity,

3. Media Support …
- Play back and record media files
- Audio , Pictures and video
- Codec’s still being decided (mp4, wma etc ….)

- Access through intents
Stream from a URL
Set MIME type to help decide action

- Also class level API
Embed playback
Recording.
- Streaming through RTP

4. XMPP Service –> we can use GTalk service ….
logged-in to Gtalk -> we can send messages to friends …

5. Application management services …

6. LowLevel H/W API’s
- API’s not yet available.
- Accessing Bluetooth.
- Accessing Wifi.