Results tagged “Android”

Yes, it's been a month now since my last entry. I've prepared some more but never came around finishing them because there has been some stuff going on which kept me off the blog until now. Maybe (or not) on that later, this posting is about my experiences with installing and using CyanogenMod 6 RC2 on my HTC Magic.

I tried to keep off custom hacking on my phone for as long as possible but since HTC and my provider won't be offering an update to the current version 1.6 of Android for this phone anymore, I've been looking forward to try out the custom ROM "CyanogenMod" for quite some time now. I've just been waiting for it to include the FroYo-Changes into its content because especially the Just-in-Time compiler was something which I hoped to give my phone a new boost. And now as the second release-candidate of CM6 was out I began to read the instructions how to get the whole stuff done.

It turned out that it's not really that hard to flash a custom ROM onto the HTC Magic. But it's essential to make a backup of the currently installed operating system to be able to restore it if something goes wrong or the new ROM doesn't meet the expectations.

For the flashing itself, I just followed the update instructions on the CyanogenMod Wiki to prepare the phone with the recovery image and to perform the initial backup. After that I just followed the instructions to install CM on the phone, using the latest Cyanogen and Google-Apps images. This was all done in a matter of minutes and after that I was running FroYo.

The very initial impressions were very exciting, a lean and very fast system with a load of options and settings to tweak. Then I began installing all my previously used applications one after another. This took a while because I had forgotten to check all applications for possibilities to back up their data and settings and so I had to flash back the original image and back to CM6 several times. But I didn't bother because it shouldn't be necessary anymore after I'm finished with that.

As time went by and more and more applications were installed I began more often to experience forced-closes where windows and applications just shut down immediately after I've started them. A quick connection with the adb logcat command revealed, that my phone was running extremely low on memory and that was the cause for the shutdown of many applications. Quite a turn-down. Even more so since there were many applications and services in the background, which I didn't want or never used anyway.

The solution to this memory issue was to insert a larger Class6 Micro-SD-card (set me back by 20EUR), reformat it using the corresponding option from the recovery-bootloader and re-writing it with the previously backed up data. After that I used Stevo's scripts according to the instructions for setting up swap on CM5 and enabled system swapping to the SD card.

This gave me another enormous speed boost and no closed applications anymore. Nice! :) I could continue setting up my phone and restoring the settings.

Later on I also applied the CM6 settings suggested by Vermithrax in a custom userinit.sh script (leaning on these instructions) which added a little more performance.

In conclusion, I think I'll keep this setup with CyanogenMod 6, although I'll have to re-flash it at least once more if CM6 final is released. Most of the time it's still snappy and faster to use than the original 1.6-image even if there are a ton of new features and larger applications and multithreading etc. But sometimes it still slows down to a crawl, I wasn't able to track it down to a specific cause so far. I guess it's somewhere rooted in the memory-settings. Have to play around with that a bit or even try to remove some of the pre-installed (and un-installable) applications like this strange "Amazon MP3" tool, which always crawls around in memory.

Yay!

Update 2010-08-18 The last weekend I updated to RC3. Went without a hitch, I just had to re-setup the modifications for 'bootswap20' with Stevo's scripts again and remove the Amazon MP3 tool once more. Just have to get used to the new icons and bootup logo...

|

As already announced a bit more than a week ago, I've published one smaller project from the University on Google Code. Now I'm proudly presenting you...

SIMsalabim

SIMsalabim is an Android application which allows you to manage the contacts which are stored on the SIM card inside your phone. Google Android itself has so far only minor possibilities to work with SIM contacts, it's just possible to copy the contacts from the SIM card over to the phone contacts and that's it. SIMsalabim adds the missing management functionality to copy the contacts between these two lists and also remove contacts from the SIM card.

Currently the project is in a usable state (and a preview APK package is also available here) but only tested so far on my HTC Magic phone using Android 1.6. Furthermore error handling in extreme situations (like a full SIM card storage) is not yet perfect. But I think it's in a state where it should cause no unexpected effects on your phone.

Nevertheless: use it on your own risk. It still may cause all sorts of bad effects and even harm your contact information. Just to be on the safe side ;)

Some documentation and usage instructions are available in the wiki.

|

In my ongoing decision struggle where to host my project work I've now taken a little step forward and opened another project on Google code to try it out a bit more. Setup there has been relatively easy and fast and the SVN source code repository is also reacting well so far.

This smaller project is from another lecture on mobile computing and it will be an application for Android mobile phones. There is still some polishing for this going on as it is still not finished and yet to be rated for a grade by the end of this month. Nevertheless I think it's already in a usable state for experienced developers by now.

When this polishing is done and the application has also some more documentation and more error-handling, I'll post an introduction here. I guess it will be a nice addition to the Android software portfolio as there is not much comparable out there by now. But by it's nature it will only be useful for a smaller audience of Android users. More details on this soon...

|

It is possible to use the more advanced and comfortable implementation of the screen-keyboard from the HTC Hero on the HTC Magic without having to get root access on the device.

There is an excellent german description available how to Use the original HTC HERO Keyboard on the Magic, G1, Galaxy and Pulse without rooting (german readers should head there instead). I also tried to find an english description for this but since I did not find explainations without rooting the devices here is the translation for the curious.

  1. download the file HTCIME.apk(for Android 1.5) or HTCIME.apk(for Android 1.6 - Donut)
  2. make sure you have an application installed which can install APK files (for example eoeAppInstaller or the ASTRO File Manager)
  3. copy the HTC_IME.apk to the SD-card
  4. accept applications from unknown sources in Settings > Applications
  5. start the eoeAppInstaller (or ASTRO File Manager) and locate the file HTC_IME.apk
  6. long press the entry and choose to install the application
  7. after successful installation reboot your phone
  8. go to Settings > Locale and Text and activate the entry Touch Input
  9. now bring up some text-entry box for example in the SMS messages
  10. long press on the entry-field and choose "Touch Input", voi'la

Now you should have the new keyboard active. There are more variations of this keyboard layout available in the settings to try out. Furthermore if you're using tools to kill your running apps make sure, to set the keyboard application on the exclusion-list otherwise it takes longer to launch it every time.

|

Now that I've been playing with my Android phone for some time, I'd like to share my experiences how to minimizing battery drain to maximize the phones runtime. These are roughly sorted by their impact on the energy consumption with the most energy-hungry features first.

  • Reduce the backlight intensity and active-time. When lit, this is the number one energy consumer so reduce the brightness and lower the timespan until automatic turnoff. Save even more, if you manually turn off the screen earlier when you don't need it anymore by pressing the red hang-up key.
  • Turn off GPS. If you don't really need it, your phone doesn't constantly need to know its exact location. Use GPS OnOff to quickly toggle the GPS status.
  • Turn off WLAN. WLAN detection and connectivity is another power-hungry feature. Turn on WLAN only if you need it. Use the WiFi OnOff widget for a fast toggle in case.
  • Use 2G instead of 3G network. 3G is faster, sure, but it also comes with an energy-penalty. If you don't need a fast internet connection all the time, use 2G instead. The 2G-3G OnOff widget allows a fast toggle.
  • Turn off Bluetooth. Mostly only used for Bluetooth headset anyway, just activate it when you're in your car. Fast switching is available through the Bluetooth OnOff widget.
  • Turn off Internet access via mobile networks completely, if you don't need it. Apndroid allows you to toggle it with just one or two clicks (depends on the version).
  • Prefer audible notifications. Vibration notification drains more power than a notification sound. And a loud notification drains more than a quietly notification or no audible notification at all. Use only as much as you really need to be notified.
  • Disable Auto-Sync if you don't real-time notification of emails and so on. Again, there's a one-click-widget for this, AutoSync OnOff.
  • Don't leave applications running in the background when you're not using them. In general only leave those background services active which you really need.

Of course, locking down your phone with all these measures won't be the ideal solution for all of you. I don't use all of them either. Just keep it to the minimum you really need to be comfortable with your own personal usage pattern of the phone.

A great application to automate many of those tasks is Locale. It allows a lot of custom settings for many of your phones settings depending on various conditions like current location, time, battery status, etc. When setting rules for locations it always requests ultra-accurate location detection via WLAN and GPS, but I found it accurate enough for me when I left it with only GSM cell detection. To give you some ideas how it can be used for minimizing energy-drain and location customisation, here are some of my rules. Many use the apndroid-plugin for locale to shut down the network access. This is not yet on the Android market but only available in the apndroid download section.

  • at-work: a time and location based rule which turns off all network access, auto-sync and makes all notifications more quiet. I've got internet access all day anyway, no need for it on the phone to use it there.
  • at-university: even more strictly this one turns the phone into silent mode and locks network access and auto-sync if I'm currently studying.
  • at-night: when I'm asleep it doesn't make sense to sync mails or anything. So turn off network and autosync again between 10pm and 7am to preserve some battery. In case I'm still using the phone during that time, the screen brightness is furthermore reduced during the no-sun time.

Be creative and try find conditions during your average day where you do not need certain functionality of your phone, there is almost always something where it does not make sense to have your phone synched with your online account or to get notified about anything.

Update 2009-10-16
Also have a look at the excellent Lifehacker article An Exhaustive Guide to Saving Your Smartphones Battery which covers also the other mobile platforms like Windows Mobile, Blackberry, Symbian, Palm Pre and iPhone and gives some more general tips.

Update 2009-10-31
With Android 1.6 you now also have the possibility to check the components and applications running on your phone for their energy requirements. Go to Settings->About phone->Battery Use to check the energy hogs of your phone.

|

Yesterday I spent a few hours trying to develop a minimalistic application for my new android phone. With the help of a quick Hello World tutorial I got up and running quite quickly. Within a few minutes I had Hello World showing up in the Android phone emulator.

When I tried to start it on my real device, I had the problem, that my phone was not showing up as connected device when I plugged it in via USB but only its internal memory was available as drive. After some investigation and research I found out, that I plugged in my phone before I activated the USB debugging mode on the phone which causes some driver irritation on Windows. This thread explains the details and how to solve the issue.

The next thing I did was to find out how to load the contacts stored on my SIM card. This is not a very well documented task so here is the required code to use Content Providers for loading contacts from the SIM module. This method returns the contacts as ArrayList of Strings which consist of the three fields name, number and _id.

private ArrayList<String> retrieveSIMContacts() {
    Uri uri15 = Uri.parse("content://sim/adn/");

    ContentResolver resolver = getContentResolver();
    Cursor results = resolver.query(uri15, null, null, null, null);

    // Android 1.6 has a different URI
    if(null == results) {
        Uri uri16 = Uri.parse("content://icc/adn/");
        results = resolver.query(uri16, null, null, null, null);
    }

    final ArrayList<String> simContacts = new ArrayList<String>();
    final int nameIndex = results.getColumnIndex("name");
    final int numberIndex = results.getColumnIndex("number");
    final int idIndex = results.getColumnIndex("_id");

    while (results.moveToNext()) {
        final StringBuilder builder = new StringBuilder();
        builder.append(results.getString(nameIndex)).append(" : ");
        builder.append(results.getString(numberIndex)).append(" : ");
        builder.append(results.getInt(idIndex));

        simContacts.add(builder.toString());
    }
    return simContacts;
}

All in all I got a small app running on my real phone showing the contacts from both the phone itself and the SIM card in two listviews selectable via tabs within two or three hours.

Quite fast, I'm impressed. I expected that Android development would be a bit more complicated...

Update 2010-01-04: Update for Android 1.6

|

Yesterday evening I went to my mobile provider and changed some parts of my current contract with them. Reason for this was that I wanted to pick up a new mobile phone, the HTC Magic featuring the operating system Google Android.

I took this step because I've tweaked and enhanced my previous phone up to the point where it cannot improve anymore. And I was really pushing it to the limits with a load of custom applications for my personal usage patterns (custom alarm/scheduler/note-taking/profile applications, completely customized main interface, etc.). But with my increased usage it also became more unstable, probably because of the large amount of data not because the custom applications. In the last few weeks I almost had to reboot it daily as it began to lock up when sending SMS.

Since I wanted to keep the possibilities of customisation and easy application development, Android mobile phones have already been on my radar for quite some time. Also the tight integration of enhanced management capabilities with the Google applications has been something which raised my interest. Yes there is the point of mistrust to Google because of its information-harvesting behaviour, but for now I'm willing to take it. But I'll stay careful.

Since yesterday evening I've been busy investigating applications and addons which get me back to at least the point of productivity where I've been with my old phone and I'm quite near now I think. The most difficult part has been (and is still, as I'm having a SIM card from the first generation with many limitations, eg. 8-char contact names) to transfer my contacts and other phone data to the new device.

Until now I'm quite happy but I'll still have to check back to the store for some advanced questions (regarding insurance and details of my contract) and maybe an exchange of my SIM card.

|

1

Archives