Due to hurricane Arthur, most of my July 4th outdoor activities have been canceled, and I decided to start learning Android Wear programming.
Following the tutorial at http://developer.android.com/training/wearables/apps/creating.html, I have updated my emulators to support SDK Level 20, assign ARM image, and downloaded the Android Wear app from Google Play store.
I am using an older Android phone. After downloading Android Wear app from Google Play store and installed it, the device suggested I need to update Google Search service and Google Play app. After these 2 apps got updated, the Android Wear app started on the phone.
Developer needs to
start up the emulator first, and
wait for the emulator to fully start up with home screen displayed
connect the phone to the PC/laptop
forward the port adb -d forward tcp:5601 tcp:5601 in the command prompt of Android Studio
start up the Android Wear app on the device
In the Android Wear app on the phone, a view similar to the home screen of the emulator is also displayed. There is an watch icon in the action bar on the left side, next to it is the title "Emulator", below it is the status. On the right side of the action barm there is an Android Smartwatch icon, settings icon, and menu. tapping on watch icon, the status of the emulator in the Android Wear app would say "Connected". Now we can see the notifications on the phone is available on the emulator.
If the phone can not connect to the emulator, please unplug the phone from the PC/laptop, and plug it again, it is also helpful to wipe the data when the emulator is started.
Friday, July 04, 2014
Friday, June 27, 2014
Android Studio 0.8 beta: where is the menu item for Android SDK Manager
Google released the Android Studio beta 0.8.
It is said developer can not apply this update to version 0.6, and need to download the latest version 0.8 and install it directly.
That was what I did today. But I also removed the older version, and did not import the settings of version 0.6.
In the new version, when I first looked for the Android SDK Manager under "Tools" I could not see it in the dropdown list.
I was wondering where the menu item is hidden, and tried to find it out, because I need to install other SDKs.
So I checked several menu and did not find it.
After a while I realized it may be hidden at the end of the drop down list and it would not be seen under "Tool".
In Preferences -> Menu and Toolbars -> Main Menu ->Tools, there is an item "Android". Under this item, there are AVD Manager, SDK Manager, Android Device Monitor, etc..
In the right pane of the Preference Window, there are buttons allowing user to move up, move down, buttons. I moved the item "Android" up close to its parent node "Tools".
But I still could not see the item "Android" under "Tools".
OK, now I have moved the item "Android" to the first child node position under "Tools", and I have run the SDK manager from Android Studio startup window, and I can see the item "Android" from the dropdown menu of "Tools".
It is said developer can not apply this update to version 0.6, and need to download the latest version 0.8 and install it directly.
That was what I did today. But I also removed the older version, and did not import the settings of version 0.6.
In the new version, when I first looked for the Android SDK Manager under "Tools" I could not see it in the dropdown list.
I was wondering where the menu item is hidden, and tried to find it out, because I need to install other SDKs.
So I checked several menu and did not find it.
After a while I realized it may be hidden at the end of the drop down list and it would not be seen under "Tool".
In Preferences -> Menu and Toolbars -> Main Menu ->Tools, there is an item "Android". Under this item, there are AVD Manager, SDK Manager, Android Device Monitor, etc..
In the right pane of the Preference Window, there are buttons allowing user to move up, move down, buttons. I moved the item "Android" up close to its parent node "Tools".
But I still could not see the item "Android" under "Tools".
OK, now I have moved the item "Android" to the first child node position under "Tools", and I have run the SDK manager from Android Studio startup window, and I can see the item "Android" from the dropdown menu of "Tools".
Sunday, June 15, 2014
Use app to dial into conference call automatically on Android device
Mobile device is so widely used in the population. User can setup exchange mail account on the device, and sync the corporate emails, calendar events including the conferences calls.
Traditionally when people dial into the conference, they need to type in the phone numbers, pin, and password. It is not very easy for people to remember these numbers, and sometimes when people type the numbers on the virtual dial pad, they could make mistake, as a result they have to dial again.
One solution for this issue is to use the so called "one-click-to-dial-in" approach. The mobile app can dial in to the conference when user clicks on the event. This feature has been implemented in early mobile platforms such as Blackberry and iOS. The Android platform does not provide this feature in its build-in feature. User either to write the app or install the app developed by others, and there are bunches of apps claim to have this feature implemented.
However due to patent issues among the vendors of mobile platforms and among OEMs and mobile platform owners, it is not easy to do it on Android platform.
Basically, like mentioned above, there are 3 parts in the dialing numbers -
1. the conference call phone number, the bridge
2. the conference id or the meeting id
3. the password, or the attendee id
Some conference call service vendors also ask user to press the # keys.
In Android platform, developer can use the Intent to make a phone call.
For simple calls, the callString contains the phone numbers, for example, 9732581301, and there is not problem for the call to go through.
It becomes a little bit complicated when dealing with the conference call. The callString needs to contains all the numbers xxxxxxxxxx yyyyyyyyy zzzz, where xxxxxxxxxx is the conference call phone number (bridge), yyyyyyyyy is the conference/meeting id, and zzzz is the password or attendee id.
The problem is how to put these parts together. Generally it is suggested that pause(s) is needed between these 3 parts. The pause is represented by ",", it is about 2 seconds. The the dialing string would looks like 8889991111,,,732596101,,,8901. When we consider that the conference call service would ask user to press 3 key after the pin (meeting id number) is passed to the system, the calling string needs to be changed to 8889991111,,,732596101#,,,8901#.
In my test cases, when this format is used to call in conference by the app, the call could go through sometimes, and sometimes the bridge number or the pin or the meeting number could not be recognized by the conference system, and the dial in failed.
There is a thread in bug report/feature request board at google.com, it talks about issue related to the problem above. The thread was started in 2010, the last post was March 2014, the total posts is around 120. There seems to be no good solution.
One app in Google Play store says it is aiming to solve this issue. From the toast string values shown when the app makes conference call, it looks like the app is using the format of
xxxxxxxxxx,yyyyyyyyy#**,,zzzz#1
By using this format, most of the time, the call could go through. The problem is all the numbers mentioned above are passed to the conference call system in one shot. This cause the phone to generate tones like the call has been hung up, the dial tones of the bridge number (pin, meeting id) can not be heard clearly.
In a blog http://blogs.technet.com/b/lync/archive/2010/09/22/setting-up-your-speed-dial-to-quickly-amp-automatically-call-into-your-meetings.aspx, it is said the format would look like
18001231234,,,{confID+#},,,*,*,{yourExtensionOrFullPhoneNumber+#},,{yourPIN+#}
I have not tested it, and am not sure if it would work.
However, I believe that one generic dial string format can not be applied to all devices on the market. Developer needs to test and use the proper dialing format for the devices, which means the program needs to get the device information, such as manufacturer, model, brand, carrier and country or region, then apply the format that works on the device.
From my tests on different devices, I feel the issue may also related to the conference service providers, and the state of the service, such as workload of the service provider's servers, network traffic and network delays.
The possible ways to make the dialing strings work stable maybe rely on using the hidden telephony and network APIs in Android framework. I would look into this and update here later.
I got time to look into the dialing issue again. I manually played the dialing strings a some popular devices on the market, trying to simulate human dialing behavior, tricking the system think a real human is dialing, or let the code try its best to mimic the human dialing behavior.
For example, when dialing the numbers on the keypad, human usually dial 3 digits or 4 digits at one time, then dial 3 or 4 digits again to complete the whole dialing numbers.
Base on this pattern, the meeting id can be divided into several parts separated by a pause:
7325961010 => 732,596,101, or 7325,9610,1,
This solution works on most of the android devices I tested.
Hope the update above help.
Traditionally when people dial into the conference, they need to type in the phone numbers, pin, and password. It is not very easy for people to remember these numbers, and sometimes when people type the numbers on the virtual dial pad, they could make mistake, as a result they have to dial again.
One solution for this issue is to use the so called "one-click-to-dial-in" approach. The mobile app can dial in to the conference when user clicks on the event. This feature has been implemented in early mobile platforms such as Blackberry and iOS. The Android platform does not provide this feature in its build-in feature. User either to write the app or install the app developed by others, and there are bunches of apps claim to have this feature implemented.
However due to patent issues among the vendors of mobile platforms and among OEMs and mobile platform owners, it is not easy to do it on Android platform.
Basically, like mentioned above, there are 3 parts in the dialing numbers -
1. the conference call phone number, the bridge
2. the conference id or the meeting id
3. the password, or the attendee id
Some conference call service vendors also ask user to press the # keys.
In Android platform, developer can use the Intent to make a phone call.
Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + Uri.encode(callString));callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);context.startActivity(callIntent);The callString contains the dialing numbers.
For simple calls, the callString contains the phone numbers, for example, 9732581301, and there is not problem for the call to go through.
It becomes a little bit complicated when dealing with the conference call. The callString needs to contains all the numbers xxxxxxxxxx yyyyyyyyy zzzz, where xxxxxxxxxx is the conference call phone number (bridge), yyyyyyyyy is the conference/meeting id, and zzzz is the password or attendee id.
The problem is how to put these parts together. Generally it is suggested that pause(s) is needed between these 3 parts. The pause is represented by ",", it is about 2 seconds. The the dialing string would looks like 8889991111,,,732596101,,,8901. When we consider that the conference call service would ask user to press 3 key after the pin (meeting id number) is passed to the system, the calling string needs to be changed to 8889991111,,,732596101#,,,8901#.
In my test cases, when this format is used to call in conference by the app, the call could go through sometimes, and sometimes the bridge number or the pin or the meeting number could not be recognized by the conference system, and the dial in failed.
There is a thread in bug report/feature request board at google.com, it talks about issue related to the problem above. The thread was started in 2010, the last post was March 2014, the total posts is around 120. There seems to be no good solution.
One app in Google Play store says it is aiming to solve this issue. From the toast string values shown when the app makes conference call, it looks like the app is using the format of
xxxxxxxxxx,yyyyyyyyy#**,,zzzz#1
By using this format, most of the time, the call could go through. The problem is all the numbers mentioned above are passed to the conference call system in one shot. This cause the phone to generate tones like the call has been hung up, the dial tones of the bridge number (pin, meeting id) can not be heard clearly.
In a blog http://blogs.technet.com/b/lync/archive/2010/09/22/setting-up-your-speed-dial-to-quickly-amp-automatically-call-into-your-meetings.aspx, it is said the format would look like
18001231234,,,{confID+#},,,*,*,{yourExtensionOrFullPhoneNumber+#},,{yourPIN+#}
I have not tested it, and am not sure if it would work.
However, I believe that one generic dial string format can not be applied to all devices on the market. Developer needs to test and use the proper dialing format for the devices, which means the program needs to get the device information, such as manufacturer, model, brand, carrier and country or region, then apply the format that works on the device.
From my tests on different devices, I feel the issue may also related to the conference service providers, and the state of the service, such as workload of the service provider's servers, network traffic and network delays.
The possible ways to make the dialing strings work stable maybe rely on using the hidden telephony and network APIs in Android framework. I would look into this and update here later.
I got time to look into the dialing issue again. I manually played the dialing strings a some popular devices on the market, trying to simulate human dialing behavior, tricking the system think a real human is dialing, or let the code try its best to mimic the human dialing behavior.
For example, when dialing the numbers on the keypad, human usually dial 3 digits or 4 digits at one time, then dial 3 or 4 digits again to complete the whole dialing numbers.
Base on this pattern, the meeting id can be divided into several parts separated by a pause:
7325961010 => 732,596,101, or 7325,9610,1,
This solution works on most of the android devices I tested.
Hope the update above help.
Monday, April 28, 2014
Find the location of each event instances in the event instances table and the event table
Android provides the APIs allowing developers to query the calendar events and instances of these events if they are recurring.
In the page http://developer.android.com/guide/topics/providers/calendar-provider.html, the fields of the tables are listed.
If you quickly go through the Events table, Reminders table, Attendees table and Instances table, you would see that the 3 later tables all have the EVENT_ID field, but there is not such field in the Event table.
And in the Instances table, there is not the field of event location, this field is listed in the Events table.
So the question is how to assign the location values in the Events in a Calendar to the instances.
If you read through the whole page carefully, you will see the hint.
In the paragraph below Figure 1, it is mentioned
"
"
Indeed there is an ID field in the Events table which is the same as those EVENT_ID fields in the other tables.
This _ID is inherited from the base class "BaseColumns", and can be used in the query string of the Events table.
Now we can use the value of this field, _ID, to match the EVENT_ID in the other tables and assign the field values in the Events table to the Events instances.
In the page http://developer.android.com/guide/topics/providers/calendar-provider.html, the fields of the tables are listed.
If you quickly go through the Events table, Reminders table, Attendees table and Instances table, you would see that the 3 later tables all have the EVENT_ID field, but there is not such field in the Event table.
And in the Instances table, there is not the field of event location, this field is listed in the Events table.
So the question is how to assign the location values in the Events in a Calendar to the instances.
If you read through the whole page carefully, you will see the hint.
In the paragraph below Figure 1, it is mentioned
"
CalendarContract.Events | This table holds the event-specific information. Each row in this table has the information for a single event—for example, event title, location, start time, end time, and so on. The event can occur one-time or can recur multiple times. Attendees, reminders, and extended properties are stored in separate tables. They each have an EVENT_IDthat references the _ID in the Events table. |
Indeed there is an ID field in the Events table which is the same as those EVENT_ID fields in the other tables.
This _ID is inherited from the base class "BaseColumns", and can be used in the query string of the Events table.
Now we can use the value of this field, _ID, to match the EVENT_ID in the other tables and assign the field values in the Events table to the Events instances.
Tuesday, March 25, 2014
Updating to ADT 22.6.1
while trying to update ADT to 22.6.1 I ran into the problem twice, as I am keeping copies of Eclipse and Android Studio on several of my machines.
The first incident happened when I updated ADT of the Eclipse IDE on my Windows 8 laptop.
After updating, the build always complains the mismatch versions of Android SDK, the 2nd time it occurred while I updated it for the Android Studio on my MBP.
For the issue on Eclipse, I finally chose to update the ADT manually as it is suggested at the bottom of this page http://developer.android.com/sdk/installing/installing-adt.html, then everything became smooth.
For the problem with the Android Studio, I wasted a lot of time to understand why the SDK manager stopped working after Android SDK Tool was updated to 22.6.1.
After installing SDK Tool 22.6.1, I could not have the UI of Android SDK Manager when I started it from Tools -> Android -> SDK Manager, although it was OK to launch the UI when I ran it in the command prompt (SDK->Tools->Android), and I have to uninstalled the Android Studio to get it straight.
After failing 2 or 3 times, I decided to install the Android SDK Tool 22.6.1 first and only install this updates in the step. Then after installing it, everything became OK, and I started to update other packages, such as the Android Wear Preview and Google Support package in Extras.
The first incident happened when I updated ADT of the Eclipse IDE on my Windows 8 laptop.
After updating, the build always complains the mismatch versions of Android SDK, the 2nd time it occurred while I updated it for the Android Studio on my MBP.
For the issue on Eclipse, I finally chose to update the ADT manually as it is suggested at the bottom of this page http://developer.android.com/sdk/installing/installing-adt.html, then everything became smooth.
For the problem with the Android Studio, I wasted a lot of time to understand why the SDK manager stopped working after Android SDK Tool was updated to 22.6.1.
After installing SDK Tool 22.6.1, I could not have the UI of Android SDK Manager when I started it from Tools -> Android -> SDK Manager, although it was OK to launch the UI when I ran it in the command prompt (SDK->Tools->Android), and I have to uninstalled the Android Studio to get it straight.
After failing 2 or 3 times, I decided to install the Android SDK Tool 22.6.1 first and only install this updates in the step. Then after installing it, everything became OK, and I started to update other packages, such as the Android Wear Preview and Google Support package in Extras.
Friday, July 12, 2013
Flashing a ROM onto your Android phone
When I flashed a ROM on to my Android phones, I followed the steps below:
1. Yeah, the first step is to find the ROM that matches the phone
2. Connect the phone to computer via USB able.
3. Make sure in Developer options, USB debug is checked. And yeah, if you are running pure newer Android ROM, for example JB4.2, the developer option you saw in older version of Android ROM is not there. It is hidden somewhere. There is magic "word" to call it out. From Settings-> About phone -> Build number, knock on the "Build number" 7 times, then the "Developer options" will come out in the "Settings".
إفتح يا سمسم iftaḥ ya simsim .
4. If the phone can not be recognized by the computer, use the Device Manager on the computer to update the driver. I usually choose the USB Composite Device in the compatible list.
5. Run adb reboot bootloader
6. Run fastboot oem rebootRUU if using the zip file to flash
7. Run fastboot flash zip zip-file-for-ROM
8. Run fastboot reboot
9. If using RUU to flash, start from Step 5, run the RUU exe directly and follow the instructions.
10. Sometimes, I need to flash the device with older ROM first, then flash the device again with newer ROM.
I forgot to mention that the phone may need to be S-OFF, and the CID may needs to match the ROM's build in CID, or may need to set the cid to super cid, a special ID for every ROM. To change the CID, in the bootloader mode, run fastboot oem writecid cid_char_string.
If you can find a RUU, it would be easy to run it to flash the phone.
1. Yeah, the first step is to find the ROM that matches the phone
2. Connect the phone to computer via USB able.
3. Make sure in Developer options, USB debug is checked. And yeah, if you are running pure newer Android ROM, for example JB4.2, the developer option you saw in older version of Android ROM is not there. It is hidden somewhere. There is magic "word" to call it out. From Settings-> About phone -> Build number, knock on the "Build number" 7 times, then the "Developer options" will come out in the "Settings".
إفتح يا سمسم iftaḥ ya simsim .
4. If the phone can not be recognized by the computer, use the Device Manager on the computer to update the driver. I usually choose the USB Composite Device in the compatible list.
5. Run adb reboot bootloader
6. Run fastboot oem rebootRUU if using the zip file to flash
7. Run fastboot flash zip zip-file-for-ROM
8. Run fastboot reboot
9. If using RUU to flash, start from Step 5, run the RUU exe directly and follow the instructions.
10. Sometimes, I need to flash the device with older ROM first, then flash the device again with newer ROM.
I forgot to mention that the phone may need to be S-OFF, and the CID may needs to match the ROM's build in CID, or may need to set the cid to super cid, a special ID for every ROM. To change the CID, in the bootloader mode, run fastboot oem writecid cid_char_string.
If you can find a RUU, it would be easy to run it to flash the phone.
Thursday, July 11, 2013
Google Android Studio 0.2.x
Google released Android Studio 0.2.0 with build number of 130.737825.
It is a new bundle and users need to download the installer from Google Android website.
http://developer.android.com/sdk/installing/studio.html#Updating
In the installation guides, it suggests users to back up some folders in the 0.1.x installation if users want to install the new version in the folder of the older version previously installed on the computer.
One of the most important feature in this release is the parallel build of independent modules, but it is not turned on in default settings, users need to "go to Preferences > Compilerand check the box Compile independent modules in parallel."
And this release is not backward compatible with previous releases.
After downloading the recent update of 0.2.1, the start up time is terrible long. After clicking on the shortcut icon on the desktop, I waited for about 1 mins for the window with progress bar show up, and the progress bar move slowly too, it took another 20 seconds for the Quick Start windows show up. This made me feel I am using very old version of Netbeans which usually took 2 mins to start up, but now the latest Netbeans starts up very quick. The time taking to start up this version of Android Studio is in the range of Netbeans 7.3.1, but in Netbeans it also starts up a bunches of services, servers, and load up my projects.
If I set the Android Studio to load up my projects at start up, it would take more longer. Even the project has been built, the building system is still trying to rebuilt the project again, and do other stuffs like checking something.
It also takes longer to create a new project. The building system is very busy. And while the system is doing the indexing, the tip window is not responsive.
Update 130.762670, 0.2.3, this is a minor update with more user friendly improvement on error warning message.
Updated to 0.2.7, and learnt a way to delete project in QuickStart - just move the mouse to the project and hit the "Delete" button in your keyboard/keypad.
It is a new bundle and users need to download the installer from Google Android website.
http://developer.android.com/sdk/installing/studio.html#Updating
In the installation guides, it suggests users to back up some folders in the 0.1.x installation if users want to install the new version in the folder of the older version previously installed on the computer.
One of the most important feature in this release is the parallel build of independent modules, but it is not turned on in default settings, users need to "go to Preferences > Compilerand check the box Compile independent modules in parallel."
And this release is not backward compatible with previous releases.
After downloading the recent update of 0.2.1, the start up time is terrible long. After clicking on the shortcut icon on the desktop, I waited for about 1 mins for the window with progress bar show up, and the progress bar move slowly too, it took another 20 seconds for the Quick Start windows show up. This made me feel I am using very old version of Netbeans which usually took 2 mins to start up, but now the latest Netbeans starts up very quick. The time taking to start up this version of Android Studio is in the range of Netbeans 7.3.1, but in Netbeans it also starts up a bunches of services, servers, and load up my projects.
If I set the Android Studio to load up my projects at start up, it would take more longer. Even the project has been built, the building system is still trying to rebuilt the project again, and do other stuffs like checking something.
It also takes longer to create a new project. The building system is very busy. And while the system is doing the indexing, the tip window is not responsive.
Update 130.762670, 0.2.3, this is a minor update with more user friendly improvement on error warning message.
Updated to 0.2.7, and learnt a way to delete project in QuickStart - just move the mouse to the project and hit the "Delete" button in your keyboard/keypad.
Sunday, May 19, 2013
Google Android Studio - Preview version v0.1 for Windows
Google announced the new Android app development tool called Android Studio.
According to the materials available online, it is based on IntelliJ IDEA. There is also a FAQ about IntelliJ IDEA and Android Studio.
The download link of the preview version of Android Studio is http://developer.android.com/sdk/installing/studio.html.
I have downloaded and tried it.
In the installation process,
the installer will try to find out the JDK that has been already installed on your computer.
If you do not have JDK, you will need to download it from Oracle's Java download site to download it then install it on your computer.
After the Android Studio installer finished the installing process, it would ask you to run it now or not.
The problem is that you would get chance to note that nothing happens after you click OK to run the Android Studio now, or after you choose to close the installer and run the Android Studio later.
The possible cause is that the installer has not remembered the path for the JDK on your computer.
There is a file in the bin folder where your Android Studio has been installed, the file name is studio.bat in Windows machine.
In the studio.bat file, the code first looks up the path of the following parameters:
ANDROID_STUDIO_JDK, ..\jre, JDK_HOME, JAVA_HOME
If these parameters have not been set in the system environment variable,
the batch file will always print out the error message at the end of the batch file:
ECHO ERROR: cannot start Android Studio.
ECHO No JDK found. Please validate either ANDROID_STUDIO_JDK, JDK_HOME or JAVA_HOME points to valid JDK installation.
Even though the Android Studio installer has found there is JAVA installed on your computer,
the information of JAVA Path has not been added into the studio.bat file.
You need to either set it in this batch file, or set it correctly in your system environment.
When you start it up for the every first time,
you will see a smaller UI. Only after you create a new project or import an old project from Eclipse,
the UI of the IDE will be in larger size or full window.
The other issue I see is Android Studio can not pull in the Android SDKs that have already been downloaded and installed on my computer. The installer does not even check the Android SDKs that have been installed on the computer.
I am an Android developer and have been using Eclipse and even tried the NetBeans plugin.
Versions of Android SDK, Tools have been installed on my computer.
Up to now I have not found a way to let Android Studio use them. I need to use the Android SDK Manager in Android Studio to install all of the SDK again.
It is interesting to see that there is "sdk" folder where Android Studio is installed.
In the structure of this folder is similar to the Android SDK folder where I installed Android SDKs in the past, however only Android SDK API level 17 is installed by the Android Studio installer.
I tried to create a link of this "sdk" folder to my old Android SDK folder, but it does not work.
The Android Studio can not recognize it.
OK, now I finally found a way to point the IDE to the Android SDK folder I used for Eclipse IDE.
In the Quick Start, there are several clickable items in the right panel. One of them is "Configure".
Following the path Project Defaults -> Project Structure -> SDKs -> + -> Android SDKs -> Select Home Directory for Android SDK, then I can choose the folder Android SDK folder I used for Eclipse.
If you have happened created a new project with Android Studio or have imported a project from Eclipse, you may find that every time you start up Android Studio, it would load the project(s), and you may wonder how to get to the Quick Start Window.
From the full IDE UI, File->Settings->IDE Settings->General->Startup/Shutdown, please uncheck the "Reopen last project on startup", then every time you run the Android Studio, you will see the Quick Start Window, where in the left panel a set of projects would be listed. The full IDE will be started up when you click on one project.
And after about half an hour poking around, I have not found a way to change Project properties similar to the click through in Eclipse, so I can not use any Android SDK add-ons in the way I used to in Eclipse.
Anyway, like the official page of Android Studio mentions, this tool is just for preview, and my past experiences with Eclipse could not be ported to this IDE.
After reading the Get started up guide on the web, I gave it a try again by exporting my Eclipse project to get the gradle build file, then from Android Studio, import the project into the IDE. After the project was imported, it would be displayed in the left panel of the Quick Start window. It would be loaded into the IDE after it is clicked. But at this stage, when I ran the build, there would be complaining about missing libraries of my addon SDK used in my Eclipse project.
Like I mentioned above, when I right clicked on the project to find the "Properties" of it, there is not such item in the menu. Instead related option is under "File" -> Project Structure.
In the dialogue window of "Project Structure", there are 2 major items: Project Settings, Platform Settings.
In the "Platform Settings", I can point the Android SDK to the folder where my Android SDK used by Eclipse exists: C:\android-sdk. It shows up as "Android 4.2.2 Platform", and in the right panel I can now choose the build target from the drop down list of all of Android SDKs, add-ons. Now the imported project can be built against the add-on without any error.
It is very interesting to note that there are 2 links at http://developer.android.com/sdk/installing/studio.html#download for users to download the tool.
One is for Windows platform, the other link is "DOWNLOAD FOR OTHER PLATFORMS".
When you click on the 2nd link, a table would show up which lists the downloads for Windows, Mac OS and Linux. I am wondering what is the difference between the download for Windows platform in this table and that in the link above. Interesting...
And yeah, in my first installation, when I clicked on the link "Check for update now", it said there was not network connection, it asked me to check network settings; after uninstalling and removed related data
(project data, settings, ...), and installing it again, if I clicked the link to check update, it would say "
The other issue I noticed at the very first run is the slow starting up the IDE. Sometime it took about 10 seconds for the starup IU show up
This behavior is so different from other IDEs. For example, Eclipse and NetBeans shows the start up UI in 2 to 3 seconds when I clicked to run them. Latency of 10 seconds is some kind of long.
Today, on 05/28/2013, there is an update from build 130.677228 to 130.687321, quite the same time Google Android Team released the update to R22.0.1 of ADT plugin and Android SDK Tools, it is within two weeks of the first preview release of the Android Studio. It took several minutes to download the patches and applied them.
The popup window for Check Update Information will keep popping out when user repeats run Help -> Check for Update.
To me, the Android Studio should first check if there is an popup window, if there is not, then show the popup; if there is one already visible, then close it, and show it again when the update info is available.
On June 6, release 130.700.763 is available, the patch has the size of 6 MB, the release note is at http://tools.android.com/recent/androidstudio013released. However, when I ran the checking update,
the popup windows told me there was update, if I clicked on "release note" or "what is new", it would direct to http://tools.android.com/recent/androidstudio013released. The link http://tools.android.com/recent/androidstudio013released was found by Help->What is New in Android Studio after the IDE applied the patch and restarted.
When you want to run the app on real device, please use the main menu "Run" -> "Edit Config"-> in the right panel, under "Target" device, please choose "USB device". Then next time you run the app, the app would be launched to the real device connected to your computer via USB cable. Or if you prefer, choose "Show Dialog", and it would show a popup window asking you to choose either device or emulator.
While if I deleted one project once has been run and built by Android Studio, if I deleted it from folder on my hard drive, it would still appear in the project list in the Quick Start Window. If I want to remove it from this list, I need to click on it, then a popup window would appear saying it does not exist anymore, do I need to remove it. If I click on to remove it, it would still be in the list, e.i., the list would be updated, I need to restart the Android Studio, then the project would not be in the list any longer.
On June 14, new patch is released to users, the build number is bumped to 130.709792, revision 0.1.5. The size of the patch is about 1 MB. The release note is at http://tools.android.com/recent/studio015released.
On June 21, updated to 0.1.6 with build number 130.716844, the patch is 2 MB. The release note is at http://tools.android.com/recent.
New version 0.1.8 was found when the IDE was started up today (Jun 28), build number is 130.725679, the patch is 1MB. The release note is at http://tools.android.com/recent/androidstudio018released. It said there are several patches to 0.1.7 (Jun 25, 2013) which I did not get it but jumped from 0.1.6 to 0.1.8 directly. Two releases in 4 days !
According to the materials available online, it is based on IntelliJ IDEA. There is also a FAQ about IntelliJ IDEA and Android Studio.
The download link of the preview version of Android Studio is http://developer.android.com/sdk/installing/studio.html.
I have downloaded and tried it.
In the installation process,
the installer will try to find out the JDK that has been already installed on your computer.
If you do not have JDK, you will need to download it from Oracle's Java download site to download it then install it on your computer.
After the Android Studio installer finished the installing process, it would ask you to run it now or not.
The problem is that you would get chance to note that nothing happens after you click OK to run the Android Studio now, or after you choose to close the installer and run the Android Studio later.
The possible cause is that the installer has not remembered the path for the JDK on your computer.
There is a file in the bin folder where your Android Studio has been installed, the file name is studio.bat in Windows machine.
In the studio.bat file, the code first looks up the path of the following parameters:
ANDROID_STUDIO_JDK, ..\jre, JDK_HOME, JAVA_HOME
If these parameters have not been set in the system environment variable,
the batch file will always print out the error message at the end of the batch file:
ECHO ERROR: cannot start Android Studio.
ECHO No JDK found. Please validate either ANDROID_STUDIO_JDK, JDK_HOME or JAVA_HOME points to valid JDK installation.
Even though the Android Studio installer has found there is JAVA installed on your computer,
the information of JAVA Path has not been added into the studio.bat file.
You need to either set it in this batch file, or set it correctly in your system environment.
When you start it up for the every first time,
you will see a smaller UI. Only after you create a new project or import an old project from Eclipse,
the UI of the IDE will be in larger size or full window.
The other issue I see is Android Studio can not pull in the Android SDKs that have already been downloaded and installed on my computer. The installer does not even check the Android SDKs that have been installed on the computer.
I am an Android developer and have been using Eclipse and even tried the NetBeans plugin.
Versions of Android SDK, Tools have been installed on my computer.
Up to now I have not found a way to let Android Studio use them. I need to use the Android SDK Manager in Android Studio to install all of the SDK again.
It is interesting to see that there is "sdk" folder where Android Studio is installed.
In the structure of this folder is similar to the Android SDK folder where I installed Android SDKs in the past, however only Android SDK API level 17 is installed by the Android Studio installer.
I tried to create a link of this "sdk" folder to my old Android SDK folder, but it does not work.
The Android Studio can not recognize it.
OK, now I finally found a way to point the IDE to the Android SDK folder I used for Eclipse IDE.
In the Quick Start, there are several clickable items in the right panel. One of them is "Configure".
Following the path Project Defaults -> Project Structure -> SDKs -> + -> Android SDKs -> Select Home Directory for Android SDK, then I can choose the folder Android SDK folder I used for Eclipse.
If you have happened created a new project with Android Studio or have imported a project from Eclipse, you may find that every time you start up Android Studio, it would load the project(s), and you may wonder how to get to the Quick Start Window.
From the full IDE UI, File->Settings->IDE Settings->General->Startup/Shutdown, please uncheck the "Reopen last project on startup", then every time you run the Android Studio, you will see the Quick Start Window, where in the left panel a set of projects would be listed. The full IDE will be started up when you click on one project.
And after about half an hour poking around, I have not found a way to change Project properties similar to the click through in Eclipse, so I can not use any Android SDK add-ons in the way I used to in Eclipse.
Anyway, like the official page of Android Studio mentions, this tool is just for preview, and my past experiences with Eclipse could not be ported to this IDE.
After reading the Get started up guide on the web, I gave it a try again by exporting my Eclipse project to get the gradle build file, then from Android Studio, import the project into the IDE. After the project was imported, it would be displayed in the left panel of the Quick Start window. It would be loaded into the IDE after it is clicked. But at this stage, when I ran the build, there would be complaining about missing libraries of my addon SDK used in my Eclipse project.
Like I mentioned above, when I right clicked on the project to find the "Properties" of it, there is not such item in the menu. Instead related option is under "File" -> Project Structure.
In the dialogue window of "Project Structure", there are 2 major items: Project Settings, Platform Settings.
In the "Platform Settings", I can point the Android SDK to the folder where my Android SDK used by Eclipse exists: C:\android-sdk. It shows up as "Android 4.2.2 Platform", and in the right panel I can now choose the build target from the drop down list of all of Android SDKs, add-ons. Now the imported project can be built against the add-on without any error.
It is very interesting to note that there are 2 links at http://developer.android.com/sdk/installing/studio.html#download for users to download the tool.
One is for Windows platform, the other link is "DOWNLOAD FOR OTHER PLATFORMS".
When you click on the 2nd link, a table would show up which lists the downloads for Windows, Mac OS and Linux. I am wondering what is the difference between the download for Windows platform in this table and that in the link above. Interesting...
And yeah, in my first installation, when I clicked on the link "Check for update now", it said there was not network connection, it asked me to check network settings; after uninstalling and removed related data
(project data, settings, ...), and installing it again, if I clicked the link to check update, it would say "
The other issue I noticed at the very first run is the slow starting up the IDE. Sometime it took about 10 seconds for the starup IU show up
This behavior is so different from other IDEs. For example, Eclipse and NetBeans shows the start up UI in 2 to 3 seconds when I clicked to run them. Latency of 10 seconds is some kind of long.
Today, on 05/28/2013, there is an update from build 130.677228 to 130.687321, quite the same time Google Android Team released the update to R22.0.1 of ADT plugin and Android SDK Tools, it is within two weeks of the first preview release of the Android Studio. It took several minutes to download the patches and applied them.
The popup window for Check Update Information will keep popping out when user repeats run Help -> Check for Update.
To me, the Android Studio should first check if there is an popup window, if there is not, then show the popup; if there is one already visible, then close it, and show it again when the update info is available.
On June 6, release 130.700.763 is available, the patch has the size of 6 MB, the release note is at http://tools.android.com/recent/androidstudio013released. However, when I ran the checking update,
the popup windows told me there was update, if I clicked on "release note" or "what is new", it would direct to http://tools.android.com/recent/androidstudio013released. The link http://tools.android.com/recent/androidstudio013released was found by Help->What is New in Android Studio after the IDE applied the patch and restarted.
When you want to run the app on real device, please use the main menu "Run" -> "Edit Config"-> in the right panel, under "Target" device, please choose "USB device". Then next time you run the app, the app would be launched to the real device connected to your computer via USB cable. Or if you prefer, choose "Show Dialog", and it would show a popup window asking you to choose either device or emulator.
While if I deleted one project once has been run and built by Android Studio, if I deleted it from folder on my hard drive, it would still appear in the project list in the Quick Start Window. If I want to remove it from this list, I need to click on it, then a popup window would appear saying it does not exist anymore, do I need to remove it. If I click on to remove it, it would still be in the list, e.i., the list would be updated, I need to restart the Android Studio, then the project would not be in the list any longer.
On June 14, new patch is released to users, the build number is bumped to 130.709792, revision 0.1.5. The size of the patch is about 1 MB. The release note is at http://tools.android.com/recent/studio015released.
On June 21, updated to 0.1.6 with build number 130.716844, the patch is 2 MB. The release note is at http://tools.android.com/recent.
New version 0.1.8 was found when the IDE was started up today (Jun 28), build number is 130.725679, the patch is 1MB. The release note is at http://tools.android.com/recent/androidstudio018released. It said there are several patches to 0.1.7 (Jun 25, 2013) which I did not get it but jumped from 0.1.6 to 0.1.8 directly. Two releases in 4 days !
Thursday, February 21, 2013
Get your app ready for the (HTC) One with XXHDPI
On Feb 19, 2013, HTC announced their new flagship phone, HTC ONE, http://www.htc.com/us/smartphones/htc-one/#overview.

This device has a 4.7 inch display with full HD 1080p, 468 PPI (pixel per inch). The resolution of the screen/display falls in the range of XXHDPI defined by Google Android standard.
The phone would be carried by most of carriers around the world. From the announcement, and the official specs posted http://www.htc.com/us/smartphones/htc-one/#specs, and comments from the analysts, reporters and mobile gadget enthusiasts, the phone would be leading the mobile device market for this year. Other OEMs need some time to find out how to match the specs of this device, specifically the features of Camera (UltraPixel), Zoe (Gallery), BOOM (sound), BlinkFeed (social media), Sense TV (IR control), the gorges design and manufacturing processes to produce the product.
Currently HTC is offering the special promotions, customers can get at least $100 cash back or trade in value of customer's current phone. Please check details at http://www.htc.com/us/smartphones/htc-one/#offers.
Please get your apps ready for the ONE. See my previous post about handling XXHDPI for your app, http://programmingtolive.blogspot.com/2012/12/handle-xxhdpi-in-your-apps.html
Enjoy the ONE, and see what you can bring to life with this smart phone.
This device has a 4.7 inch display with full HD 1080p, 468 PPI (pixel per inch). The resolution of the screen/display falls in the range of XXHDPI defined by Google Android standard.
The phone would be carried by most of carriers around the world. From the announcement, and the official specs posted http://www.htc.com/us/smartphones/htc-one/#specs, and comments from the analysts, reporters and mobile gadget enthusiasts, the phone would be leading the mobile device market for this year. Other OEMs need some time to find out how to match the specs of this device, specifically the features of Camera (UltraPixel), Zoe (Gallery), BOOM (sound), BlinkFeed (social media), Sense TV (IR control), the gorges design and manufacturing processes to produce the product.
BOOM Sound
BlinkFeed Social Media
Zoe - Living Photo Gallery
TV Guide and IR Remote Control
Gorges Design
Sense Voice - Clearer Voice Than Ever
Please get your apps ready for the ONE. See my previous post about handling XXHDPI for your app, http://programmingtolive.blogspot.com/2012/12/handle-xxhdpi-in-your-apps.html
Enjoy the ONE, and see what you can bring to life with this smart phone.
Wednesday, February 20, 2013
My old Nexus 7 got 4.2.2 update
While reading the tech news, I crossed over several posts about the latest update of Android 4.2.2 from Google, then I checked my old Nexus 7. And yeah, there is a notification about the update, asking me to install it or not, and I clicked it yes. Now the tablet is installing the update. From my experiences in the past, it will take several minutes to complete it. This time it is around 1 to 2 minutes. Now the device is rebooting, I like the boot up animation.
In the software info, the kernel is still in 3.1.0-g05b777c, built on Nov., 29, 2012. For more details of the update, please check PCMag blog at http://www.pcmag.com/article2/0,2817,2415481,00.asp
Meanwhile, the SDK Tool 21.1 is also available for developer to download and install, for the release note please check http://developer.android.com/tools/sdk/tools-notes.html, some bugs reported have been fixed, there are also some performance improvements.
Now it is almost 3 months away from annual Google I/O Conference, where the next major release of Android would be announced and available. Not sure which version number would be used. Last year before Google formally released the Jelly Bean, people were talking about the version number would be bumped to 5.0, and actually it was released as version 4.1, followed by minor releases of 4.1.1, 4.1.2, then 4.2, 4.2.1, and now 4.2.2. But definitely the code name would start with letter "K".
In the software info, the kernel is still in 3.1.0-g05b777c, built on Nov., 29, 2012. For more details of the update, please check PCMag blog at http://www.pcmag.com/article2/0,2817,2415481,00.asp
Meanwhile, the SDK Tool 21.1 is also available for developer to download and install, for the release note please check http://developer.android.com/tools/sdk/tools-notes.html, some bugs reported have been fixed, there are also some performance improvements.
Now it is almost 3 months away from annual Google I/O Conference, where the next major release of Android would be announced and available. Not sure which version number would be used. Last year before Google formally released the Jelly Bean, people were talking about the version number would be bumped to 5.0, and actually it was released as version 4.1, followed by minor releases of 4.1.1, 4.1.2, then 4.2, 4.2.1, and now 4.2.2. But definitely the code name would start with letter "K".
Saturday, January 12, 2013
Nexus 7: Navigation
There are two preloaded apps on Nexus 7 that could be used for navigation. One is the Google Maps app, the other Navigation.
In my recent trip to the west coast, I wanted to check what cities the carrier was flying by. When I started up the Navigation app, I found the app took much longer to pin down current location, the app used about 3 mins, because the A320 was flying very fast. After the GPS signal got received and processed by the app, my location would show up on the map, and I could know which city the A320 was passing by.
However sometimes the map could not show at high resolution, and at other times the Navigation app just exited by itself when I rotated Nexus 7 from portrait mode to landscape mode. The reason may be due to the tablet was not connected to any network. However I could not replicate this case on the ground when the WiFi connection was turned off.
Without network connection, the Maps app could not work at all. I could not zoom into high resolution map, the other layers could not be loaded either.
Tuesday, December 25, 2012
Android SDK tool update 21.0.1, platform tool 16.0.1, and SDK platform API 16 R4
Google provided updates to the Android development tools as Christmas gifts!
When I opened my Android SDK manager, I noticed there are 3 updates listed there.
One is Android SDK Tools 21.0.1, the other is Android SDK Platform Tools 16.0.1, and another is Android SDK platform API level 16 Revision 4.
If you are Eclipse and choose Windows -> Android SDK Manager, then select these 3 updates to install them, you may experience a little trouble, the error or warning would say some directory is currently being hold by some process. You would just need to exit the Eclipse IDE, then from the Android SDK Manager run the installation again.
After installing these updates, everything in the $android_sdk_folder/tools/ has been touched.
Right now I do not know what have been updated, and need to look at carefully to dig them out.
I wish I could find release note somewhere.
(
http://developer.android.com/tools/sdk/tools-notes.html
http://developer.android.com/tools/sdk/eclipse-adt.html
The release note for SDK Platform API Level 16 Revision 4 is not available yet at the link
http://developer.android.com/tools/revisions/platforms.html
)
When I opened my Android SDK manager, I noticed there are 3 updates listed there.
One is Android SDK Tools 21.0.1, the other is Android SDK Platform Tools 16.0.1, and another is Android SDK platform API level 16 Revision 4.
If you are Eclipse and choose Windows -> Android SDK Manager, then select these 3 updates to install them, you may experience a little trouble, the error or warning would say some directory is currently being hold by some process. You would just need to exit the Eclipse IDE, then from the Android SDK Manager run the installation again.
After installing these updates, everything in the $android_sdk_folder/tools/ has been touched.
Right now I do not know what have been updated, and need to look at carefully to dig them out.
I wish I could find release note somewhere.
(
http://developer.android.com/tools/sdk/tools-notes.html
http://developer.android.com/tools/sdk/eclipse-adt.html
The release note for SDK Platform API Level 16 Revision 4 is not available yet at the link
http://developer.android.com/tools/revisions/platforms.html
)
Tuesday, December 18, 2012
Handle XXHDPI in your Android apps
After Google mentioned the xxhdpi in their online document and first batch of mobile devices supporting this resolution rolled out to the market, developers may need to know how to handle this resolution in the apps.
HTC Butterfly (Japan)
HTC Butterfly (China)
HTC DNA (Verizon Wireless)
Since this screen resolution parameter is new, if your apps have not handled it, your apps may not be visible on devices when users use Google Play store to search apps.
To solve the issue of app not visible on devices with xxhdpi resolution, developers need to read the documentation provided by Google. Please check the best practice Google provides at http://developer.android.com/guide/practices/screens_support.html ,
It is said that the best practice is to use the <supports-screens > element in the manifest file of the application, and developers can set anyDensity is true. This will solve most of the cases. There are some cases that this solution would not work.
As you may notice that there is another element, <compatible-screens>, mentioned in Google's online document. Some apps on the market are using this element/tag in the manifest files to resolve the screen resolution issue, and even use these 2 tags/elements in the same time. If you create a simple apk with various combinations of these two tags in the manifest file, it could be easily found that some of the definitions inside of the <compatible-screens> would override the definitions inside of the <supports-screens> tag.
It is mentioned that if you have to use <compatible-screens> in the manifest file to filter out your apps for devices with certain screen resolutions or sizes, you will need to add one more value inside of this tag:
<screen
android:screenSize="normal" android:screenDensity="480"
/>
for the xxhdpi. The other definition you may also add is tvdpi, its value is 213, which is for devices like Nexus 7.
After modifying the manifest file, you may also consider adding resources, such as drawables, layout styles, for the xxhdpi.
Friday, December 07, 2012
Build Android Kernel Source Code
In my previous post, I talked about downloading Android kernel source codes and listed links of download sites from major players in the markets of Android devices.
So what are you going to do with the kernel codes after you download it?
Some guys would like to take a look at the Linux codes to see the changes,
others is going to twist it, build it, and flash the devices with the images from the build.
OEM usually provides the Android kernel to end users in zip format,
it may be only one zip file, or several zip files. To open the zip file, the zip tool would be needed. There are several free zip tools user can download from the internet.
After unzipping the downloaded zip file, you can start to check the source codes. If you could like to build it the kernel, other tools and environment would be needed. It is recommended Linux machine would be used to run the build, you can either get an individual Linux PC, install a dual boot of popular Linux OS, or install a virtual machine of Linux on your PC. Some of the Linux Os' are free for personal use.
For myself, I am using a Windows laptop, have a Oracle Virtual Box installed on it. I use Ubuntu Linux as a virtual machine on Virtual Box. You may download Oracle Virtual Box from this web page https://www.virtualbox.org, and the Ubuntu Linux from http://www.ubuntu.com/download .
When you set up and configure the Ubuntu virtual machine in Oracle VirtualBox, please pay attention to the RAM, Storage size and number of processor of the host machine ( for me it is my Windows laptop), please choose proper amount of storage, RAM and number of processors to use by the virtual machine. If you assign too much ram and all the processor of the host machine for the virtual machine, when you run the virtual machine and do heavy jobs, the host machine may not be responsive.
After setting up the Linux machine, please follow the steps at http://source.android.com/source/index.html to set up the environment. You will need the tool chain from AOSP to build the Android kernel code. The tool chain is in the code base of AOSP source codes, or you can get it from somewhere else you could find, please put the tool chain in your path.
Please unzip and put the Android kernel source code in your project directory, for example,
/home/dave/Project/kernels/. Before start building the kernel, you may want to take a look at the build instructions that comes together with the Android kernel source codes, such as a readme.txt file in the directory, or any instructions the OEM lists on their website.
I happened to look at the Android kernels recently published at http://htcdev.com/devcenter/downloads ,
In the download file, there is a readme.txt, which contains the commands recommended to be used to build the kernel, including the instructions to set the path of the tool chain.
After finishing building the kernel, you may try to push some modules you just built on to you device. Please note that you may need to run at root privilege to do this.
Please make sure to back up your personal data, device settings, ect.., anytime you flash your devices with customized build module or rom, and make copy of the modules on your devices you are going to replace with the new modules, and this process is only for person with strong mobile technique experiences.
For example, if I want to put bluetooth driver module onto my device (but most of the time, all driver modules would be needed to push over to device to make the device work properly),
I will run the following commands:
adb remount
adb shell push ./drivers/bluetooth/bluetooth-power.ko system/lib/modules/
adb shell chmod 644 system/lib/modules/*
adb reboot
In case your devices got stuck to start up, you may need to run recovery and reset the device to factory settings (!!!! you would lose data on your device !!!!), you may need to put back the original modules you have backed up, or in the worst case, you may run to boot loader mode and select the recovery or reset options from the menu, or run the recovery and reset command from the adb shell.
So what are you going to do with the kernel codes after you download it?
Some guys would like to take a look at the Linux codes to see the changes,
others is going to twist it, build it, and flash the devices with the images from the build.
OEM usually provides the Android kernel to end users in zip format,
it may be only one zip file, or several zip files. To open the zip file, the zip tool would be needed. There are several free zip tools user can download from the internet.
After unzipping the downloaded zip file, you can start to check the source codes. If you could like to build it the kernel, other tools and environment would be needed. It is recommended Linux machine would be used to run the build, you can either get an individual Linux PC, install a dual boot of popular Linux OS, or install a virtual machine of Linux on your PC. Some of the Linux Os' are free for personal use.
For myself, I am using a Windows laptop, have a Oracle Virtual Box installed on it. I use Ubuntu Linux as a virtual machine on Virtual Box. You may download Oracle Virtual Box from this web page https://www.virtualbox.org, and the Ubuntu Linux from http://www.ubuntu.com/download .
When you set up and configure the Ubuntu virtual machine in Oracle VirtualBox, please pay attention to the RAM, Storage size and number of processor of the host machine ( for me it is my Windows laptop), please choose proper amount of storage, RAM and number of processors to use by the virtual machine. If you assign too much ram and all the processor of the host machine for the virtual machine, when you run the virtual machine and do heavy jobs, the host machine may not be responsive.
After setting up the Linux machine, please follow the steps at http://source.android.com/source/index.html to set up the environment. You will need the tool chain from AOSP to build the Android kernel code. The tool chain is in the code base of AOSP source codes, or you can get it from somewhere else you could find, please put the tool chain in your path.
Please unzip and put the Android kernel source code in your project directory, for example,
/home/dave/Project/kernels/. Before start building the kernel, you may want to take a look at the build instructions that comes together with the Android kernel source codes, such as a readme.txt file in the directory, or any instructions the OEM lists on their website.
I happened to look at the Android kernels recently published at http://htcdev.com/devcenter/downloads ,
In the download file, there is a readme.txt, which contains the commands recommended to be used to build the kernel, including the instructions to set the path of the tool chain.
After finishing building the kernel, you may try to push some modules you just built on to you device. Please note that you may need to run at root privilege to do this.
Please make sure to back up your personal data, device settings, ect.., anytime you flash your devices with customized build module or rom, and make copy of the modules on your devices you are going to replace with the new modules, and this process is only for person with strong mobile technique experiences.
For example, if I want to put bluetooth driver module onto my device (but most of the time, all driver modules would be needed to push over to device to make the device work properly),
I will run the following commands:
adb remount
adb shell push ./drivers/bluetooth/bluetooth-power.ko system/lib/modules/
adb shell chmod 644 system/lib/modules/*
adb reboot
In case your devices got stuck to start up, you may need to run recovery and reset the device to factory settings (!!!! you would lose data on your device !!!!), you may need to put back the original modules you have backed up, or in the worst case, you may run to boot loader mode and select the recovery or reset options from the menu, or run the recovery and reset command from the adb shell.
Wednesday, December 05, 2012
Download Android kernels published by OEMs
Android is an open source project under GPL licences. OEMs under these licenses are obliged to publish the kernels they modified and used in their products.
The major players in the field of Android devices including the following OEMs including Google:
Google Inc (Android creator), Huawei (Android mobile devices), HTC (Android mobile devices), LG (Android mobile devices), Motorola (Android mobile devices), Samsung (Android mobile devices), Sony (Android mobile devices), ZTE in the alphabetic order.
Google's contributions to the kernel source codes are released in the Android Open Source Project at http://source.android.com/
The download sites of the kernel source codes from other OEMs
Huawei - http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index&type=software
HTC - http://htcdev.com/devcenter/downloads
LG- http://www.lg.com/global/support/opensource/opensource.jsp
Motorola - http://sourceforge.net/motorola/
Samsung - http://opensource.samsung.com/index.jsp
Sony - http://developer.sonymobile.com/downloads/opensource/
ZTE - http://supporthk.zte.com.cn/support/news/NewsDetail.aspx?newsId=1002402 for example
The major players in the field of Android devices including the following OEMs including Google:
Google Inc (Android creator), Huawei (Android mobile devices), HTC (Android mobile devices), LG (Android mobile devices), Motorola (Android mobile devices), Samsung (Android mobile devices), Sony (Android mobile devices), ZTE in the alphabetic order.
Google's contributions to the kernel source codes are released in the Android Open Source Project at http://source.android.com/
The download sites of the kernel source codes from other OEMs
Huawei - http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index&type=software
HTC - http://htcdev.com/devcenter/downloads
LG- http://www.lg.com/global/support/opensource/opensource.jsp
Motorola - http://sourceforge.net/motorola/
Samsung - http://opensource.samsung.com/index.jsp
Sony - http://developer.sonymobile.com/downloads/opensource/
ZTE - http://supporthk.zte.com.cn/support/news/NewsDetail.aspx?newsId=1002402 for example
Monday, December 03, 2012
Old Nexus 7 received 4.2.1 update
It was days ago my old Nexus 7 got update of 4.2.1, the latest version of Android Jelly Bean.
So now I am checking what is new in Jelly Bean 4.2.1.
First look at the home screen. From the top of the layout, the notifications are on the left the notification bar, and on the right side there is the status bar, user can pull the bar down and check the details.
As always, the voice enabled Google search is on top of the home screen, user can tap on the voice search icon to start voice search. Looks like it would take the speech engine to learn your accents, and after that, the returned results are more accurate.
The application tray at the bottom of the home screen do not change at all, but in the Android site, it says the application tray is a new feature. Am I getting it wrong?
OK, now I see the several more Wallpapers than I used to have with Jelly Bean 4.1, and I can also use the "Day Dream" to display content.
What I really like in this update are new features in developer options, specifically it enable OpenGL traces and simulation of 2nd display.
So now I am checking what is new in Jelly Bean 4.2.1.
First look at the home screen. From the top of the layout, the notifications are on the left the notification bar, and on the right side there is the status bar, user can pull the bar down and check the details.
As always, the voice enabled Google search is on top of the home screen, user can tap on the voice search icon to start voice search. Looks like it would take the speech engine to learn your accents, and after that, the returned results are more accurate.
The application tray at the bottom of the home screen do not change at all, but in the Android site, it says the application tray is a new feature. Am I getting it wrong?
OK, now I see the several more Wallpapers than I used to have with Jelly Bean 4.1, and I can also use the "Day Dream" to display content.
What I really like in this update are new features in developer options, specifically it enable OpenGL traces and simulation of 2nd display.
Thursday, October 18, 2012
Nexus 7 updated to Android 4.1.2
My Nexus 7 tablet received the update to Android 4.1.2, build number JZ054K, kernel build g009b6d1.
I did not notice any change in the application or the UI. Have you guys found anything new from this update?
OK, I saw the widget of "Recommended on Play" and "Recommended Apps" when I scrolled the home screen. Have they already been there in the previous version?
Hopefully it would be bumped to 4.2 soon after Google's 10/28/9 event.
I did not notice any change in the application or the UI. Have you guys found anything new from this update?
OK, I saw the widget of "Recommended on Play" and "Recommended Apps" when I scrolled the home screen. Have they already been there in the previous version?
Hopefully it would be bumped to 4.2 soon after Google's 10/28/9 event.
IGZO based display and battery life
IGZO is named after indium gallium zinc oxide. It is a material with special properties and can be used in liquid crystal display (LCD) to replace the traditional layer of silicon. It is reported that energy consumption would be lowered to 1/5 to 1/10 of the traditional TFT,
it used only a quarter of the power of its competitor when idle, and about 25 percent less during active use. This technology also allows more pixels in per unit area of the display, which would make the images displayed on the screen more clearer and sharper, and more accurate touch response or quicker response speed.
At CEATEC 2012, Sharp introduced its new 5-inch 1080p LCD smartphone display at 443 ppi, they also showed a 6.1 inch IGZO based display with 498 ppi. Later Sharp introduced the first IGZO panel smartphone, Sharp's SH-02E, and it also launched a 7-inch Tablet with IGZO LCD Screen of 1280x800 resolution, 217 ppi. This week, HTC announced HTC J Butterfly, it has a 5 inch LCD3 1080 HD, 441 ppi display.
In the comments on the reports, people are worrying about the battery life of these new devices, because as more pixels packed into the display, more energy would be needed to light up the display. However if the report of the energy efficiency feature of this new technology is true, the battery would have a decent life span on these devices.
it used only a quarter of the power of its competitor when idle, and about 25 percent less during active use. This technology also allows more pixels in per unit area of the display, which would make the images displayed on the screen more clearer and sharper, and more accurate touch response or quicker response speed.
At CEATEC 2012, Sharp introduced its new 5-inch 1080p LCD smartphone display at 443 ppi, they also showed a 6.1 inch IGZO based display with 498 ppi. Later Sharp introduced the first IGZO panel smartphone, Sharp's SH-02E, and it also launched a 7-inch Tablet with IGZO LCD Screen of 1280x800 resolution, 217 ppi. This week, HTC announced HTC J Butterfly, it has a 5 inch LCD3 1080 HD, 441 ppi display.
In the comments on the reports, people are worrying about the battery life of these new devices, because as more pixels packed into the display, more energy would be needed to light up the display. However if the report of the energy efficiency feature of this new technology is true, the battery would have a decent life span on these devices.
Thursday, September 27, 2012
Google added XXHDPI for android devices ?
Google, the creator of Android mobile platform, recently added one item at http://developer.android.com/reference/android/util/DisplayMetrics.html#DENSITY_XXHIGH,
which will support devices with terrible high resolutions ( I had to keep asking myself when I thought about it, do I really need this high resolution? may be I do, just for viewing high quality contents).
According to the Google document
"
public static final int DENSITY_XXHIGH Since: API Level 16
Please check my other post http://programmingtolive.blogspot.com/2012/12/handle-xxhdpi-in-your-apps.html for handling xxhdpi in your Android apps.
Oh, they added XXXHDPI?
which will support devices with terrible high resolutions ( I had to keep asking myself when I thought about it, do I really need this high resolution? may be I do, just for viewing high quality contents).
According to the Google document
"
public static final int DENSITY_XXHIGH Since: API Level 16
Standard quantized DPI for extra-extra-high-density screens. Applications
should not generally worry about this density; relying on XHIGH graphics
being scaled up to it should be sufficient for almost all cases.
Constant Value:
480
(0x000001e0)
"
It is read like "extra-extra-high-density". Looks like the engineers ran out of the word to describe it. I am wondering what the newer resolutions would be called in the future when hardware engineers would pack more pixels into per square inch on the display. Would it be called "extra-extra-extra-extra-...-extra-high-density", or call it " n-extra-high-density" ?
The name would be potentially very LONG, and when programmers try to communicate this info with project managers, the project managers would need to count how many "extra" the programmer has used, or may think the programmer is so nervous and get stumbled, or the brain get short-circuit to find the next word.
The name would be potentially very LONG, and when programmers try to communicate this info with project managers, the project managers would need to count how many "extra" the programmer has used, or may think the programmer is so nervous and get stumbled, or the brain get short-circuit to find the next word.
It is also weird that Google provided this info in the page of DisplayMatrices http://developer.android.com/reference/android/util/DisplayMetrics.html
but they have not added any related info at page http://developer.android.com/guide/topics/manifest/compatible-screens-element.html
and
I can only see the values of ldpi, mdpi, hdpi, xhdpi, tvdpi, and "nodpi".
Is it a great idea to use word of "nodpi" for supporting all densities?
Come on, please find a proper word to replace the "extra-...-extra" naming style.
Please check my other post http://programmingtolive.blogspot.com/2012/12/handle-xxhdpi-in-your-apps.html for handling xxhdpi in your Android apps.
Oh, they added XXXHDPI?
Tuesday, September 25, 2012
Your android device is not recognized by adb ?
In a previous post I discussed about the problem for Google Nexus 7. In general, every device may have this problem. When you first purchase the device and plug it onto your computer and the run the command "adb devices", your devices may not be listed there.
Usually, when you plug in your device to your computer, your computer would detect that a new device is plugged in, and it would automatically install the drivers for the device, and it would be recognized. But for android device, it could be listed as MPT device or USB Composite Device.
If the default type of your device is MPT, then it would not appear in the adb device list.
To solve the issue, there are a lot of posting and discussion on the internet by installing the drivers, and there are also even suggestions to root the device in order to solve the problem.
I myself ran into this issue again after updating my devices. When I checked the Device Manager of my laptop, it is listed as MPT device under "Portable Devices". I fooled around on the device settings, trying to find where I can change the device type to either CPT device or USB Composite Device. However in the Storage Menu of my phone, there is not such option. I even tried to use the Device Manager to update the drivers, and that did not help.
Here is the tip from my teammate.
On your computer, please open the Device Manager, open the node of Portable Devices,
right click on on the item for your device, then choose "Update Driver Software".
In the dialog of "Update Driver Software", Please click on "Browse my computer for driver software".
In the new dialog, set driver software location to the "Extra" folder where your Android SDK is installed, and check "Include subfolders".
Then click on "Let me pick from a list of device drivers on my computer. In the new dialog window, choose "USB Composite Device", and click "Next" to start installing the drivers.
After the installation is done, please make sure you device has the Developer Options turned on,
and USB connection for debugging is checked.
Please check again in the DOS window "adb devices" to verify if the device is recognized.
If you have multiple devices, you would need to do this for each of them.
I am hoping that OEM would add the device type options in Settings,
so that when user has this kind of problem, he/she can set the device to "USB Composite Device", or "CPT" device, and when the device is plugged into computer, related drivers would be installed automatically by the computer, and he/she does not need to go through the steps above manually.
Usually, when you plug in your device to your computer, your computer would detect that a new device is plugged in, and it would automatically install the drivers for the device, and it would be recognized. But for android device, it could be listed as MPT device or USB Composite Device.
If the default type of your device is MPT, then it would not appear in the adb device list.
To solve the issue, there are a lot of posting and discussion on the internet by installing the drivers, and there are also even suggestions to root the device in order to solve the problem.
I myself ran into this issue again after updating my devices. When I checked the Device Manager of my laptop, it is listed as MPT device under "Portable Devices". I fooled around on the device settings, trying to find where I can change the device type to either CPT device or USB Composite Device. However in the Storage Menu of my phone, there is not such option. I even tried to use the Device Manager to update the drivers, and that did not help.
Here is the tip from my teammate.
On your computer, please open the Device Manager, open the node of Portable Devices,
right click on on the item for your device, then choose "Update Driver Software".
In the dialog of "Update Driver Software", Please click on "Browse my computer for driver software".
In the new dialog, set driver software location to the "Extra" folder where your Android SDK is installed, and check "Include subfolders".
Then click on "Let me pick from a list of device drivers on my computer. In the new dialog window, choose "USB Composite Device", and click "Next" to start installing the drivers.
After the installation is done, please make sure you device has the Developer Options turned on,
and USB connection for debugging is checked.
Please check again in the DOS window "adb devices" to verify if the device is recognized.
If you have multiple devices, you would need to do this for each of them.
I am hoping that OEM would add the device type options in Settings,
so that when user has this kind of problem, he/she can set the device to "USB Composite Device", or "CPT" device, and when the device is plugged into computer, related drivers would be installed automatically by the computer, and he/she does not need to go through the steps above manually.
Subscribe to:
Posts (Atom)







