Ever wonder how developers on XDA take the source code released to the AOSP and create ROMs? While creating software for your phone isn't as easy as this (you also need lots of drivers), the process for compiling Android isn't that difficult. In this video, Shen tells you about the process.

Tuesday, December 27, 2011

Refer to the last exercise "Honeycomb's tab look of DatePicker", the app is created target API level 11. It can run on device with Android 3.0 or above only. If you want to make it run on early version, you can using Android Compatibility package (or named Android Support Package).

Sunday, December 25, 2011

In the last two years, Android has become one of the most popular smartphone platforms in the world. In the same time, Qt has developed an elegant and mature solution for creating mobile apps with Qt Quick. Necessitas is a community project that adds Android support to the Qt SDK. This talk will explain how you can deploy your Qt app to the Android Market using Necessitas.

Thursday, December 22, 2011

At Google, philanthropy is a core value. This year Google gave more than $100 million to various organizations around the world -- including $40 million in grants that celebrate the giving season by supporting four causes that is considered particularly important: science, technology, engineering and math (STEM) education; girls' education; empowerment through technology; and fighting human trafficking and modern-day slavery.

Google invite you to celebrate the giving season along with us by learning about these organizations, the great work they're doing, and how you can support them.

Wednesday, December 21, 2011

You can develop and debug on real Android device (HTC Fly in this case) just as you would on the emulator. Before you can start, there are just a few things to do. Refer to Android document Using Hardware Devices. I will not repeat here. I describe how to add the file /etc/udev/rules.d/51-android.rules on Ubuntu 11.10 only.

Monday, December 19, 2011

The HTML5 test score is an indication of how well your browser supports the upcoming HTML5 standard and related specifications. Even though the specification isn't finalized yet, all major browser manufacturers are making sure their browser is ready for the future. Find out which parts of HTML5 are already supported by your browser today and compare the results with other browsers.

Compatibility Package is a static library that exposes the same Fragments API from Android 3.0, so that applications compatible with Android 1.6 or later can use fragments to create tablet-compatible user interfaces.

Before you can apply Compatibility Package on your project, you have to prepare something first:

Friday, December 16, 2011

Android 4.0.3, an incremental release of the Android 4.0 (Ice Cream Sandwich) platform, announced. The new release includes a variety of optimizations and bug fixes for phones and tablets, as well as a small number of new APIs for developers. The new API level is 15.

Visit theAndroid Developerssite for more information about Android 4.0.3 and other platform versions. To get started developing or testing on the new platform, you can download it into your SDK using theAndroid SDK Manager.

Google just announced the beta launch of Android Training — a collection of classes that will help Android Developer to build better Android apps.

These classes are designed to demonstrate best practices for solving common Android development problems. Each class explains the steps required to solve a problem, or implement a feature, with plenty of code snippets and sample code for you to use within your own apps.

The Android platform continues to aggressively grow in market share against competing mobile platforms, such as Apple iOS and BlackBerry. Android's latest major platform update, Android 4.0, frequently called by its code-name, Ice Cream Sandwich or just ICS merges the smartphone-centric Android 2.3.x (Gingerbread) and the tablet-centric Android 3.x (Honeycomb) platform editions into a single SDK for all smart-devices, be they phones, tablets, televisions, or toasters.

This short e-book provides an overview from the authors on the importance of Ice Cream Sandwich as well as key preview content from the upcoming book, "Android Wireless Application Development, Third Edition, Volume I." This preview content provides some essential references, updated for Android SDK 4.0, for those interested in jumping into Android application development at this exciting time. To use this e-book most effectively, you need to download the Android development SDK and tools, install them on your development machine, and configure them using the development environment of your choice. You can find instructions for installing and configuring your computer for Android software development on the Android Developer website athttp://d.android.com/sdk/.

Wednesday, December 14, 2011

A fragment can be thinked as a modular section of an activity, which has its own lifecycle, receives its own input events, and which you can add or remove while the activity is running (sort of like a "sub activity" that you can reuse in different activities).

A fragment must always be embedded in an activity and the fragment's lifecycle is directly affected by the host activity's lifecycle. For example, when the activity is paused, so are all fragments in it, and when the activity is destroyed, so are all fragments. However, while an activity is running (it is in the resumed lifecycle state), you can manipulate each fragment independently, such as add or remove them.

Usually, you should implement at least the following lifecycle methods:

onCreate()The system calls this when creating the fragment. Within your implementation, you should initialize essential components of the fragment that you want to retain when the fragment is paused or stopped, then resumed.

onCreateView()The system calls this when it's time for the fragment to draw its user interface for the first time. To draw a UI for your fragment, you must return a View from this method that is the root of your fragment's layout. You can return null if the fragment does not provide a UI.

onPause()The system calls this method as the first indication that the user is leaving the fragment (though it does not always mean the fragment is being destroyed). This is usually where you should commit any changes that should be persisted beyond the current user session (because the user might not come back).

Here, modify from the last exercise "Dynamic change fragment using Java code"; implement(modify) onCreate(), onCreateView() and onPause() methods of MyFragment.java and MyFragment2.java, display a Toast to check the lifecycle of fragment.

// Replace whatever is in the fragment_container view with this fragment, // and add the transaction to the back stack transaction.replace(R.id.myfragment, newFragment); transaction.addToBackStack(null);

Last post show how to inflate layout from XML. The Fragment is hard coded in layout XML, "fragment" element in main.xml. Alternatively, it can be specified as ViewGroup, LinearLayout in my example here. Then get an instance of FragmentTransaction and add the fragment in the ViewGroup Programmatically.

Modify the main layout, main.xml, to specify the fragment as LinearLayout instead of MyFragment.

Thursday, December 1, 2011

Android-x86 is a project to port Android open source project to x86 platform. Android-x86-4.0-devel is available to run Android 4.0 Ice Cream Sandwich on machine of AMD Brazos platform, like MSI 110W. Please note that it's for developers, not all function implemented.

In this exercise, we will implement search interface on our activity, without actual searching function. When user press the Search button, a search dialog will be opened; then after user confirm search, the query will be passed to another activity (MySearch.java) for searching.

First we create our search activity, MySearch.java. Simple check if the intent equal to ACTION_SEARCH and display the query only.

Modify AndroidManifest.xml to add MySearch activity to handle intent of "android.intent.action.SEARCH", with meta-data with android:name="android.app.searchable" and android:resource="@xml/searchable". xml/searchable.xml is the searchable configuration, it will be created later.Also add meta-data in the main activity AndroidSearchActivity, with android:name="android.app.default_searchable" and android:value=".MySearch". Where MySearch.java is the search activity we have just created.

Saturday, November 26, 2011

In this exercise, we will implement our OnTouchListener to handle the following MotionEvent:ACTION_DOWN: A pressed gesture has started, the motion contains the initial starting location.ACTION_POINTER_DOWN: A non-primary pointer has gone down.ACTION_MOVE: A change has happened during a press gesture (between ACTION_DOWN and ACTION_UP).ACTION_UP: A pressed gesture has finished.ACTION_POINTER_UP: A non-primary pointer has gone up.