My grandpa is a blogger and doesn't even know it
Why am I writing about this? I think this is a good example of how sometimes there is no need for getting too involved with the specifics of a technology we want to adopt (or convince others to adopt). My grandpa doesn't need to know what social media or blogging is and he doesn't even need to understand how hyperlinks work because he mainly writes about real life events nobody else is blogging about. He had a need and I helped him to find the right tool for the job and provided what he needed to start. And that's where we should all start when thinking about new technologies: with the need they can help us fulfill. The tools are usually not the problem anymore. So don't be tempted to make web 2.0 (or any other shiny new technology) about buzzwords or about technical specifications. Web 2.0 is a web that enables people to share experiences easily and more effectively, and Web 2.0 is for me a web where my grandpa is a blogger.
What is happening with Digital Forensics UK
Four New Motorola Phones Spotted
New Firmware Update for HTC Touch Pro
AT&T going to release Pantech Matrix PRO
Samsung SPH-W7100 for children
Running Android At VGA Resolution
Video of LG KM900 Arena
Android Layout Tricks #2: Reusing layouts
Android comes with a wide variety of widgets, small visual construction blocks you can glue together to present the users with complex and useful interfaces. However applications often need higher level visual components. A component can be seen as a complex widget made of several simple stock widgets. You could for instance reuse a panel containing a progress bar and a cancel button, a panel containing two buttons (positive and negative actions), a panel with an icon, a title and a description, etc. Creating new components can be done easily by writing a custom View
but it can be done even more easily using only XML.
In Android XML layout files, each tag is mapped to an actual class instance (the class is always a subclass of View.) The UI toolkit lets you also use three special tags that are not mapped to a View
instance: <requestFocus />
, <merge />
and <include />
. The latter, <include />
, can be used to create pure XML visual components. (Note: I will present the <merge />
tag in the next installment of Android Layout Tricks.)
The <include />
does exactly what its name suggests; it includes another XML layout. Using this tag is straightforward as shown in the following example, taken straight from the source code of the Home application that currently ships with Android:
<com.android.launcher.Workspace
android:id="@+id/workspace"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
launcher:defaultScreen="1">
<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
<include android:id="@+id/cell2" layout="@layout/workspace_screen" />
<include android:id="@+id/cell3" layout="@layout/workspace_screen" />
</com.android.launcher.Workspace>
In the <include />
only the layout
attribute is required. This attribute, without the android
namespace prefix, is a reference to the layout file you wish to include. In this example, the same layout is included three times in a row. This tag also lets you override a few attributes of the included layout. The above example shows that you can use android:id
to specify the id of the root view of the included layout; it will also override the id of the included layout if one is defined. Similarly, you can override all the layout parameters. This means that any android:layout_*
attribute can be used with the <include />
tag. Here is an example:
<include android:layout_width="fill_parent" layout="@layout/image_holder" />
<include android:layout_width="256dip" layout="@layout/image_holder" />
This tag is particularly useful when you need to customize only part of your UI depending on the device's configuration. For instance, the main layout of your activity can be placed in the layout/
directory and can include another layout which exists in two flavors, in layout-land/
and layout-port/
. This allows you to share most of the UI in portrait and landscape.
Like I mentioned earlier, my next post will explain the <merge />
, which can be particularly powerful when combined with <include />
.
Street Fighter II on Mobile?
Smartphone Mobile Experience Progresses Nicely
Throughout the past year, some interesting things happened. MacBook Air, Netbooks like the Eee PC and extreme ultra portables have arrived the scene. While small, their cost and low CPU performance never made me think twice about them. Yesterday, I saw an amazing offer from Dell XPS M1330 with reasonable features for as low as $800, I still did not find myself intrigued at any of the options mentioned above. Why is that?
For one, the smartphones have really stepped up over the past year. iPhone in its current firmware version has drastically improved since its first days (albeit still lacking copy & paste function). Google G1 has arrived offering a new flavor in open source mobile experience. BlackBerry(s) have been refined including its all new touchscreen interface. Even the boring old Windows 6.1 is now sexier thanks to HTC's overlay.
But what does this mean? It means that smartphones have finally leveraged light and robust applications to carry a very focused functions which gets our job done whenever we want to: ie. check your emails or chat online via IM, look up weather conditions for local or traveling destination, get a stock quote, grab a movie review to help you decide what to rent/buy, look up side effects of a medication, check flight status, and so much more can be retrieved on your little smartphone from anyone at anytime.
I didn't bring my personal laptop on my last trip visiting friends and family to the West Coast. My iPhone managed to get me through the entire trip for all the basic computing needs. I was even playing a FaceBook game called Mob Wars over Safari in the non-mobile friendly site. To be fair, I did bring my work laptop along simply because I was in the middle of a project integration and VPN is required to access some information. Perhaps that will be the next step for smartphones. As for me, the chances of me picking up an ultraportable laptop in the near future is slim so long as my MacBook Pro is still going strong.
Hello World C program using Android Toolchain
It's well known that Android uses a stripped down version of libc, called bionic. When you compile your program with static linking, you don't use bionic because well, you linked statically. This is non-ideal. You want to use the bionic library on the phone, and besides you want to compile using Android's prebuilt cross-compiler arm-eabi-gcc
If you are anxious to get things working, use agcc, a perl wrapper over arm-eabi-gcc that sets up everything for you so that you can just:
$ agcc hello.c -o hello
and the resulting binary (hello) just works. Of course you should have the directory containing arm-eabi-gcc in your PATH for agcc to work.
Let's explore a bit deeper. But let me first simplify my hello program to contain just a main
$ cat hello.c int main(int argc, char* argv[]) {
return 0;
}
The minimal set of flags to pass to arm-eabi-gcc to get this working is:
$ arm-eabi-gcc -o hello hello.c -Wl,-rpath-link=/Users/nirnimesh/NIR/android/mydroid/cupcake/out/target/product/generic/obj/lib -L/Users/nirnimesh/NIR/android/mydroid/cupcake/out/target/product/generic/obj/lib -nostdlib /Users/nirnimesh/NIR/android/mydroid/cupcake/out/target/product/generic/obj/lib/crtbegin_dynamic.o -lc
Here /Users/nirnimesh/NIR/android/mydroid/cupcake is the root of my Android source.
$ file hello
hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
Note that the executable binary is dynamically linked.
If you leave out -Wl,-rpath-link=/Users/nirnimesh/NIR/android/mydroid/cupcake/out/target/product/generic/obj/lib you get
/Users/nirnimesh/NIR/android/mydroid/cupcake/prebuilt/darwin-x86/toolchain/arm-eabi-4.2.1/bin/../lib/gcc/arm-eabi/4.2.1/../../../../arm-eabi/bin/ld: warning: libdl.so, needed by /Users/nirnimesh/NIR/android/mydroid/cupcake/out/target/product/generic/obj/lib/libc.so, not found (try using -rpath or -rpath-link) /Users/nirnimesh/NIR/android/mydroid/cupcake/out/target/product/generic/obj/lib/libc.so: undefined reference to `dl_unwind_find_exidx' collect2: ld returned 1 exit status
If you leave out -L/Users/nirnimesh/NIR/android/mydroid/cupcake/out/target/product/generic/obj/lib you get
/Users/nirnimesh/NIR/android/mydroid/cupcake/prebuilt/darwin-x86/toolchain/arm-eabi-4.2.1/bin/../lib/gcc/arm-eabi/4.2.1/../../../../arm-eabi/bin/ld: cannot find -lc collect2: ld returned 1 exit status
If you leave out -nostdlib you get
/Users/nirnimesh/NIR/android/mydroid/cupcake/prebuilt/darwin-x86/toolchain/arm-eabi-4.2.1/bin/../lib/gcc/arm-eabi/4.2.1/../../../../arm-eabi/bin/ld: crt0.o: No such file: No such file or directory collect2: ld returned 1 exit status
If you leave out /Users/nirnimesh/NIR/android/mydroid/cupcake/out/target/product/generic/obj/lib/crtbegin_dynamic.o you get
/Users/nirnimesh/NIR/android/mydroid/cupcake/prebuilt/darwin-x86/toolchain/arm-eabi-4.2.1/bin/../lib/gcc/arm-eabi/4.2.1/../../../../arm-eabi/bin/ld: crt0.o: No such file: No such file or directory collect2: ld returned 1 exit status
And finally, f you leave out -lc your compilation fails with:
/Users/nirnimesh/NIR/android/mydroid/cupcake/out/target/product/generic/obj/lib/crtbegin_dynamic.o: In function `_start': bionic/libc/arch-arm/bionic/crtbegin_dynamic.S:(.text+0x10): undefined reference to `__libc_init' collect2: ld returned 1 exit status
So far we've been able to compile C programs using Androids toolchain and run on the phone.
To summarize, it's the most convenient to use agcc as the compiler so you don't have to bother.
Rumor: Motorola 5Mp coming soon ?
Fennia Prize 2009 mentions Nokia BH-804 with honor
Running Android At VGA Resolution
Sprint Palm Treo Pro Coming Soon?
Android Layout Tricks #1
The Android UI toolkit offers several layout managers that are rather easy to use and, most of the time, you only need the basic features of these layout managers to implement a user interface. Sticking to the basic features is unfortunately not the most efficient way to create user interfaces. A common example is the abuse of LinearLayout, which leads to a proliferation of views in the view hierarchy. Every view, or worse every layout manager, you add to your application comes at a cost: initialization, layout and drawing become slower. The layout pass can be especially expensive when you nest several LinearLayout that use the weight parameter, which requires the child to be measured twice.
Let's consider a very simple and common example of a layout: a list item with an icon on the left, a title at the top and an optional description underneath the title. Here is what such an item looks like:
To clearly understand how the views, one ImageView and two TexView, are positioned with respect to each other, here is the wireframe of the layout as captured by HierarchyViewer:
Implementing this layout is straightforward with LinearLayout. The item itself is a horizontal LinearLayout with an ImageView and a vertical LinearLayout, which contains the two TextViews. The source code of this layout is the following:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:padding="6dip">
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginRight="6dip"
android:src="@drawable/icon" />
<LinearLayout
android:orientation="vertical"
android:layout_width="0dip"
android:layout_weight="1"
android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="My Application" />
<TextView
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:singleLine="true"
android:ellipsize="marquee"
android:text="Simple application that shows how to use RelativeLayout" />
</LinearLayout>
</LinearLayout>
This layout works but can be wasteful if you instantiate it for every list item of a ListView. The same layout can be rewritten using a single RelativeLayout, thus saving one view, and even better one level in view hierarchy, per list item. The implementation of the layout with a RelativeLayout remains simple:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:padding="6dip">
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="6dip"
android:src="@drawable/icon" />
<TextView
android:id="@+id/secondLine"
android:layout_width="fill_parent"
android:layout_height="26dip"
android:layout_toRightOf="@id/icon"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:singleLine="true"
android:ellipsize="marquee"
android:text="Simple application that shows how to use RelativeLayout" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/icon"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_above="@id/secondLine"
android:layout_alignWithParentIfMissing="true"
android:gravity="center_vertical"
android:text="My Application" />
</RelativeLayout>
This new implementation behaves exactly the same way as the previous implementation, except in one case. The list item we want to display has two lines of text: the title and an optional description. When a description is not available for a given list item, the application would simply set the visibility of the second TextView to GONE. This works perfectly with the LinearLayout implementation but not with the RelativeLayout version:
In a RelativeLayout, views are aligned either with their parent, the RelativeLayout itself, or other views. For instance, we declared that the description is aligned with the bottom of the RelativeLayout and that the title is positioned above the description and anchored to the parent's top. With the description GONE, RelativeLayout doesn't know where to position the title's bottom edge. To solve this problem, you can use a very special layout parameter called alignWithParentIfMissing.
This boolean parameter simply tells RelativeLayout to use its own edges as anchors when a constraint target is missing. For instance, if you position a view to the right of a GONE view and set alignWithParentIfMissing to true, RelativeLayout will instead anchor the view to its left edge. In our case, using alignWithParentIfMissing will cause RelativeLayout to align the title's bottom with its own bottom. The result is the following:
The behavior of our layout is now perfect, even when the description is GONE. Even better, the hierarchy is simpler and because we are not using LinearLayout's weights it's also more efficient. The difference between the two implementations becomes obvious when comparing the view hierarchies in HierarchyViewer:
Again, the difference will be much more important when you use such a layout for every item in a ListView for instance. Hopefully this simple example showed you that getting to know your layouts is the best way to learn how to optimize your UI.
Another Mobile Experience Story on Fitness - Boxing Timer
A week later, we got to talking again and this time around, he knows more about different applications than I do. When asked, he proudly showed me one of his favorite applications BOXING TIMER made by Chris Gummer. Its basiclly a round clock that can be used as a background application and uses sound to alert you a desired time interval for exercise duration. The application costs merely $0.99 which according to Gustavo, rivals lots of cheaply made portable timers he's owned which can cost from $10 to $15. To get a more reliable timer otherwise, it can become more expensive as well as bulky in size.
This story signifies the further evolution of the mobile experience. My friend, who is not an avid gadgeteer, has within a very short time mastered an easy to use smartphone. Not only is the phone keeping him well connected (email, SMS, voice) it also helps him improve his workout routine.
In case you've been wondering...
I started this blog as a personal exploration of this new medium and perhaps it's best to keep it this way. It's just one of the many channels I use to communicate with the world and right now I have no desire to have this blog as my main channel. That's why I'm not writing this post to promise to blog more regularly or to keep this blog in a certain direction. And neither am I giving up on this blog completely. I might post again tomorrow, next month or even next year; the thing is that I just don't want to worry about that anymore. I never considered myself a blogger anyway; right now I'm just somebody who enjoys writing blog posts once in a while, and I think I do a better job at sharing interesting content through my Google Reader shared items or on my recently revived tumblelog.
So, I guess I just wanted to make an announcement that this blog isn't quite dead yet, but at the same time admit that I really have no idea of what you can expect here. All I can do is to invite you to keep watching this space and watch its journey with me. Who knows, we might find something interesting along the way :)
Real Time Stock Quotes from Mobile CNBC
More Nokia 6720 Live Photo
Iris Browser v1.1.0 Released
Cheap Refurbished iPhone 3G from AT&T
Vertu Constellation
Sony Ericsson Idou 12.1 Mp camera phone
Sony ericsson is becoming camera phone kings!! after nokia launched 5Mp camera phone, SE launched 8.1Mp C905 phone. now there newest production is 12.1Mp one. so it's becoming world's highest megapixel camera phone!.
Sony ericsson announced about this phone in last week. it will be available on middle of 2009. mostly it will be launched before launching Nokia N97.
now let's look at about features of this phone. Sony Ericsson Idou is a 3G mobile phone. it has 3.5 inch large touchscreen which supports 360 x 640 pixels resolution.
the camera has many features, it has new feature named touch focusing which allows easily to focus the camera. the camera supports high quality 30fps video recording and it has xenon flash. the maximum picture resolution is 4256 x 2832 pixels. also Sony Ericsson Idou runs with Symbian OS and it has embedded google maps application.
Idou has full featured GPS receiver and it supports A-GPS feature. also unlike other phones, Idou's screen easily fit with 16:9 size.
All features
Widescreen 3.5-inch 16:9 touch screen taps directly into videos and music through the media menu
Integrated 12.1-megapixel camera with intuitive touch focus and Xenon flash takes huge prints that can be cropped, rotated and edited
PlayNow service brings unlimited entertainment and applications
Transfer data at high-speeds with Turbo 3G or Wi-Fi connectivity
cp on Android
cat source_file > dest_file
This works because the phone has a full-featured shell which supports stream redirection.
Griffin Launches SmartShare Slim USB Hub
Screenshots on Android
To take a screenshot you need to download the Android SDK for your machine. It includes a tool called ddms which is the dalvic debug monitor. Dalvic is the Java runtime powering all the apps on your android phone.
Connect the phone to your machine, run ddms from the terminal and go to Device > Screen Capture (or Ctrl-S) for taking a screenshot.
Android Market update: priced applications for US users
Last Friday, we enabled developers to upload priced apps and saw a flurry of activity in the days that followed. Today, it is my pleasure to let you know that we have begun the phased rollout of priced applications to T-Mobile G1 users in the US. Once the service is enabled on their devices, T-Mobile G1 users will be able to see the priced apps immediately without the need to reboot. For more details on this update to Android Market, please see last week's blogpost.
8208, a new CDMA cellular phone coming from Nokia
KT770, a Symbian S60-based LG slider cell phone
Magic, Vodafone’s first Android-powered HTC cell phone
Hello World in C on Android
Today I finally managed to do it using CodeSourcery's cross compiler on linux. A cross compiler is something which allows you to compile on one architecture (the host) and run the executable binary on another (the target). In this case, the host is the linux machine where we'll install the toolchain (linux intel x86) and android phone is the host (arm).
- Download CodeSourcery's toolchain installer for GNU/Linux target for IA32 host
- Install it: sh arm-2008q3-72-arm-none-linux-gnueabi.bin
- The toolchain provides the cross compiler arm-none-linux-gnueabi-gcc. You need to put it's directory in your $PATH. Once you have the toolchain, you can easily compile your hello world program: arm-none-linux-gnueabi-gcc -o hello -static hello.c
- Copy the binary to your phone and run it from an adb shell prompt: ./hello
Points to note:
- The above binary is static, that is it does not use the phone's libc libraries. Android ships with its own trimmed down version of libc, called bionic. Next I'll be trying to compile and run using bionic libc, so that I don't have to compile statically
- The above steps do not use the toolchain in the android source code. I'll try later to cross compile using that.
Nokia 8208 Almost Here
LG Showcase its Eco-Friendly Solar-powered Phone
N86, the 8 megapixel Nokia slider phone
Pantech Matrix Pro for AT&T
HTC TouchFLO 3D Available in Landscape Mode Soon on Video
Nokia 5630 XpressMusic Visits FCC
Yahoo Launched Mobile Application
Samsung Blue Earth Charged with Solar Power
LG Arena KM900 Uses SanDisk 8GB iNAND Embedded Flash Drive
Yahoo Announces Partnership with Opera Mini
How to get iPhone out of Recovery Mode?
I finally decided to document how I got out of Recovery Mode through trial & error without full restore: (Note, this was tested on an iPhone 1st gen w/ firmware 2.2.1 on it)
1. In Recovery Mode Screen (it shows a cable and a CD looking iTunes icon), press and hold power + home for about 10 seconds, this will shut the screen down. Let go of buttons!
2. With the screen dark, press and hold power+home buttons again. This time, the Apple logo will light up for about 8 seconds then again it will be powered down. (I noticed this round of power down, it seems to be a little different with the way the screen shuts off, hard to explain). Let go of buttons!
3. Once again, press and hold power+home buttons (only this time, you'll mimic the entering DFU mode like pattern) by counting to about 8 seconds then release the power button. Keep holding down the home button until about 20 seconds then let go. During this time, the Apple logo should reappear but don't get distracted, keep up with the counting. By the time you let go all buttons 20 seconds later, the Apple logo should stay lit and it will boot into regular mode shortly after.
This method has worked for me in the said iPhone and firmware 2.2.1. As always, do this at your own risk and best of luck!
Review: V MODA Vibe II Headset with Mic
Before we get started, I have some basic requirements for headsets: 1). Must have a built-in mic, 2). Must have good sound quality [good highs and deep bass], 3). Must have some sort of in-ear buds that blocks outside noise. You'd be surprised to find how little choices are available if you require all of the above.
The Vibe II is beautifully crafted in stainless steel alloy and comes with an Italian designed leather protective case. My review unit is black with a soft fabric cable and includes a set of sport earhooks which is optional if you need to secure your headphones for more active environment. In addition to including an inline mic, it also includes inline control to play/pause/answer call. This headset will work with other smartphones, media players as well as VOIP laptop applications (ie. BlackBerry Bold, Curve, Storm, Laptops/MacBooks) so long as they support the 24K gold plated 3.5mm plug.
Hands on with Vibe II
"Only the finest materials are used to create..." as claimed by V MODA's press kit. And finest material they are! I am amazed at the quality and craftsmanship that went into this headset. Even down to its packaging, protective case and Kevlar-infused cord fabric for added durability. When other headphones supply 3 different silicon ear buds for sizing, V MODA gives you a wider range of selection with the four sizing options.
Audio Clarity and Quality is Superb!
The sound quality on the Vibe II is sharp and clear. "Precision" is a word I would use to describe this headset, from the sounds to the fitment. The music sounds very tight and concise; I tried out a variety of songs from Classical to R&B and every note is reproduced accurately. The bass from the 8mm driver is especially great with the in-ear design which is nice and deep (hence is 12- 22Hz range). Even when I cranked up the volume (which is not recommended), the audio is still precise and clear. I placed a couple of test calls and I can hear the other party just fine as they have no problem with hearing me either. In fact, the mic is so sensitive it was picking up the HVAC vent sound to my receipient.
Overall, I am very pleased with V MODA Vibe II and I would recommend this set to any hardcore audio phile with or without an Apple product. At $128 MSRP, it is demanding, however, when compared to the super expensive Shure or Bose headphones, this is actually a great price offer excellent performance and build quality. I'd be very interested in comparing the VIBE II to Apple's In-Ear Buds in the upcoming future. (Special thanks to Jamie C. at Formula PR)
AT&T will Start Selling Pantech Matrix Pro from February 24th
MWC2009: Digicel and ZTE Launch Coral-200 Solar Powered Phone
Faster screen orientation change
Android is a mobile operating system meant to be run on a wide array of devices, with very different hardware configurations. Some devices, like the T-Mobile G1, can change their hardware configuration at runtime. For instance, when you open the keyboard, the screen change from the portrait orientation to the landscape orientation. To make Android applications development easier, the OS automatically handles configuration changes and restart the current activity with the new configuration. This is the default behavior that lets you declare resources like layouts and drawables based on the orientation, screen size, locale, etc. If you are not familiar with the way Android handles resources, I highly suggest you to read the official documentation on resources.
While this behavior is really powerful, since your application adapts automatically to the device's configuration at runtime, it is sometimes confusing for new Android developers who wonder why their activity is destroyed and recreated. Facing this "issue," some developers choose to handle configuration changes themselves which is, in my opinion, a short-term solution that will complicate their life when other devices come out or when the application becomes more complex. The automatic resource handling is a very efficient and easy way to adapt your application's user interface to various devices and devices configurations. It sometimes comes at a price though.
When your application displays a lot of data, or data that is expensive to fetch, the automatic destruction/creation of the activities can be lead to a painful user experience. Take the example of Photostream, a simple Flickr browsing application I wrote for the release of Android 1.0. After you launch the application and choose a Flickr account, the application downloads a set of 6 photos (on a T-Mobile G1) from the Flickr servers and displays them on screen. To improve the user experience, I also use slightly different layouts and drawables in portrait and landscape, and this is what the result looks like:
Photostream lets Android take care of the configuration change when the screen is rotated. However, can you imagine how painful it would be for the user to see all the images being downloaded again? The obvious solution to this problem is to temporarily cache the images. They could be cached on the SD card (if there's one), in the Application object, in a static field, etc. None of these techniques is adapted to the current situation: why should we bother caching the images when the screen is not rotated? Fortunately for us, Android offers a great API exactly for that purpose.
The Activity class has a special method called onRetainNonConfigurationInstance(). This method can be used to pass an arbitrary object your future self and Android is smart enough to call this method only when needed. In the case of Photostream, I used this method to pass the downloaded images to the future activity on orientation change. The implementation can be summarized like so:
@Override
public Object onRetainNonConfigurationInstance() {
final LoadedPhoto[] list = new LoadedPhoto[numberOfPhotos];
keepPhotos(list);
return list;
}
In the new activity, in onCreate()
, all you have to do to get your object back is to call getLastNonConfigurationInstance(). In Photostream, this method is invoked and if the returned value is not null, the grid is loaded with the list of photos from the previous activity:
private void loadPhotos() {
final Object data = getLastNonConfigurationInstance();
// The activity is starting for the first time, load the photos from Flickr
if (data == null) {
mTask = new GetPhotoListTask().execute(mCurrentPage);
} else {
// The activity was destroyed/created automatically, populate the grid
// of photos with the images loaded by the previous activity
final LoadedPhoto[] photos = (LoadedPhoto[]) data;
for (LoadedPhoto photo : photos) {
addPhoto(photo);
}
}
}
Be very careful with the object you pass through onRetainNonConfigurationChange()
though. If the object you pass is for some reason tied to the Activity/Context, you will leak all the views and resources of the activity. This means you should never pass a View, a Drawable, an Adapter, etc. Photostream for instance extracts the bitmaps from the drawables and pass the bitmaps only, not the drawables. Finally, remember that onRetainNonConfigurationChange()
should be used only to retain data that is expensive to load. Otherwise, keep it simple and let Android do everything.
Amazing Stantum Multitouch Interface
http://www.viddler.com/explore/engadget/videos/292/
Nokia N86 with Wide-Angle Carl Zeiss Optics Released
Optimized Your Internet Browsing With LG KT770 Slider Phone
New Android Phone: HTC Magic Android
O2 offers new Option ExpressCard with retractable antenna
Sprint Now Offers New Simply Everything Plan Plus Mobile Broadband
LG unveiled a new LG-GD900 fashion phone
LG Releases LG GM730 Windows phone
Nokia N86 Spotted With 8 Megapixel Camera Phone ?
HTC Touch Pro Got Upgraded as Touch Pro2
HTC Unveiled Touch Diamond2 Powered by Windows Phone
Installing non-Market Apps on Android Phone
To ensure that you do not break your phone by installing malicious apps, Android has a couple of safety features built in. So you need to specifically instruct android to be able to install unsigned / non-market apps.
Menu > Settings > Applications > Unknown Sources
Check "Unknown Sources" to allow install of non-Market applications. While developing, you most likely also want to enable "Stay awake" in Menu > Settings > Applications > Development so that your screen does not go to sleep every often.
Now you can install any app (including malicious ones) the usual way either by browsing to the app using the browser or using adb install command.
Most Cell Phones will use Mini-USB Charger by 2012
1. Mini-USB charger is definitely the way to go, majority of smartphones already use such. Which makes it easy to find charging solution on the go. I normally keep a spare mini-USB cord in my office as well as traveling.
2. The fact that it will take until 2012 to change over is a big joke; changing over to DC 5V charging over micro USB doesn't take 4 years, definitely laughable
3. Although Apple is not going to change its port design to mini-USB, it is somewhat compatible already. Note that you can take your iPod data cable and plug into any computer USB for charging. There are even lots of car chargers designed to accept USB ports so an iPhone data cable would work as well.
MWC 2009: Nokia 6710 Navigator
PacketVideo Mobile Video Application Available for iPhone
SEVEN to Support Android OS for Mobile Email Solutions
T-Mobile Releases Samsung Memoir from Feb 29th
New Palm Pre With Calendar Apps Video
Sony Ericsson W995 Hikaru Walkmanphone Details
Sony Ericsson Idou With 12 megapixel camera
Rumor: Sony Ericsson Reese With QWERTY Keyboard
Windows Mobile 6.5 Beta is now ported to HTC Touch HD
NETGEAR to Demonstrate Live 3G Femtocell-Enabled Mobile Services
White LG Cookies KP501On O2 UK
Android Market Paid Applications Coming Soon
Huawei Introduces i-Mo HSPA Modem
LG’s New Eco Friendly at MWC 2009
Ovation MC995D HSPA USB Modem Now Available
Samsung Blue Earth - solar-powered cell phone
Verizon Wireless Offering Friends & Family Feature
i-mate Launches 810-F power by Windows Mobile
Rumor: New Casing For iPhone 2009 ?
Spb Software Develops Windows Mobile Netflix Application in Cooperation with Microsoft and Netflix
Nuance Mobile’s T9 Nav Now Available
Sun Microsystems announced the availability of the JavaFX Mobile
BlackBerry Connect Desktop Tool For HTC Mobile
LG KM900 on Video
How to Turn on GPS on Tmobile G1?
Searching the web wasn't very helpful for me so hopefully this post can help anyone looking for GPS switch. PS - by default, GPS is deactived, so My Location feature is based on IP/Cell Tower proxmity.
Speech recognition: Almost ready for mobile prime time
Not smart, not safe.
So, is voice recognition good enough to let you just talk to your mobile device and then send the converted text as a message?
I first asked myself that question a couple of years ago when I bought a copy of Dragon NaturallySpeaking and a small voice recorder. I tried recording weblog posts and other documents while driving, and then brought the recorded sound back to my computer to convert it into text. The result was a disaster. Dragon was unable to keep pace with the recorded sound in the files, and started dropping sentences, paragraphs, and eventually entire pages of spoken text. I was so disgusted, and so disappointed, that I gave up and went back to listening to sports talk radio while I drove.
Recently a newly appointed product manager at Nuance (publisher of Dragon) sent out a survey asking for feedback on the product. Unlike most product managers, she signed the survey form with her own name and with her own e-mail address. Most product managers wouldn't do that because they don't want to be overwhelmed with feedback. I don't know how much feedback she got in general, or how overwhelming it was, but she got a note back from me describing my problems with the product and explaining why I really wasn't satisfied with it.
I didn't expect to get any reply from the company; Nuance has a remarkably restrictive policy on providing technical support unless you pay extra for it. Usually, companies that do that aren't interested in getting any sort of conversation going with their customers. But to my surprise, I got a note from the product manager not only sympathizing with my problems but offering to send me a copy of the latest version of the software and a voice recorder that she said would work well with the software. I wish my weblog address hadn't been in my signature, so I would know if they do this sort of thing for every frustrated user. But anyway I took her up on the offer.
You can see the results here. I dictated this weblog post using the voice recorder, synced it onto my computer for recognition, and then corrected the (few) errors by hand. There are pluses and minuses to the dictation system. The good news is that the program can now keep up with my dictated speech. I no longer lose sentences or paragraphs of text. I'm also surprised with the way the product recognizes trade names, so for instance when I say Home Depot or McDonald's or Nike or Apple or IKEA or Lowes, Dragon gets the names correct and properly capitalized (I didn't have to fix anything in that sentence).
On the other hand it does make mistakes -- the packaging claims about 99% accuracy, which means that you should expect one word in every hundred to be incorrect. My guess is that I'm getting somewhere between 97 and 99% accuracy. That's not bad. In fact, it's pretty darned impressive. But in practice it still means you have to go back and do a lot of corrections.
The training is close to torture: reading aloud a 20-minute excerpt from a Dilbert book while trying to pronounce every word correctly. Later I tried setting up the program without any training, and it worked exactly the same. So my advice is to skip the training.
The software is not great at understanding where punctuation should be placed in the text. I have learned that I have to give grammatical guidance by saying things like "comma," "period," and "new paragraph" in order to make sure that the text will be reasonably well formatted.
If I just speak naturally the text will come out like this making it very difficult for anyone else to read and even making it hard for me to edit without punctuation inserted it is very hard to get tell where a sentence was supposed to end and another one start add in a few wreck cognition errors by the soft wear and the text is not something you would want to send to someone uncorrected
Speaking with punctuation is unnatural, and could be somewhat distracting while driving. I have to think carefully about the text that I'm dictating, and I believe for some people that could cause them not to pay enough attention to what's happening on the road. I think I can do it safely or I wouldn't do it, but it definitely is an issue to consider.
Overall, I think this approach will make me a bit more productive, so I should be able to produce a little bit more weblog content and maybe get some other sorts of things done as well.
So it's nice for me, and I finally feel like I got my money's worth from Dragon. But is the technology ready for broad deployment in mobile devices?
I think the answer is technically yes, but practically no. Mobile devices are casual-use; tasks that require too much commitment or effort just don't get used. Without careful attention to spoken punctuation, the software produces errors and the sort of run-on text you saw above. Even in a short message, I think it's likely that you'd get more mistakes than you'd find acceptable. Correcting those errors on a small screen with no mouse would be tedious at best (it's an annoying task even on a PC).
More importantly, the software is very sensitive to the quality of the sound file coming into it. I believe most phone microphones and headsets wouldn't produce the required quality. You'd probably get better results with a service that just records your speech and has someone in India retype it (such services exist today).
So, the news from the world of voice recognition is hopeful for mobile users but not yet wonderful. The technology is good enough that you can definitely use it as a substitute for typing if you have physical problems. It's also a useful PC productivity tool for someone who generates a lot of text for a living.
However, I think we're not yet quite at the point where you can just talk to your phone and have it reliably transform all of your speech into text. It's getting better, but it's not all the way there yet. For a mobile device, the dream of just talking is still a dream. But I do think it's a dream that's getting closer to reality.
===========
PS: I'd also like to compliment Kristen Wylie, the product manager at Nuance who responded to my message. Take notes, folks, this is the right way to communicate with customers online -- sign your real name, use an address they can respond to rather than a no-replies mailbox, and when someone has a problem help them solve it.
Android Market update: support for priced applications
I'm pleased to announce that Android Market is now accepting priced applications from US and UK developers. Developers from these countries can go to the publisher website at http://market.android.com/publish to upload their application(s) along with end user pricing for the apps. Initially, priced applications will be available to end users in the US starting mid next week. We will add end user support for additional countries in the coming months.
We will also enable developers in Germany, Austria, Netherlands, France, and Spain to offer priced applications later this quarter. By the end of Q1 2009, we will announce support for developers in additional countries. Developers can find more information about priced applications in Android Market at http://market.android.com/support/
Google Checkout will serve as the payment and billing mechanism for Android Market. Developers who do not already have a Google Checkout merchant account can easily sign up for one via the publisher website.
Also, Android Market for free applications will become available to users in Australia starting February 15th Pacific Time and in Singapore in the coming weeks. Developers can now make their applications available in these countries via the publisher website at http://market.android.com/publish.
We look forward to seeing more great applications on Android Market.
Samsung Ultra Touch S8300 Coming With Live Pics
Mobiado 105GMT
Garmin-Asusvtoday announced the Garmin-Asus nuvifone M20
Garmin Asus Nuvifone G60
Say Hello To iPhone 4G
Sprint Rumor 2?
i-mate 810F Is A Tough Smartphone
Sony Ericsson W395 and C903 Photos
Verizon Wireless and WeatherBug announced WeatherBug Protect
Popular Posts
- 199 iphone wall paper
- Scanbuy Announces Addition to Its Board of Directors
- Millions of Names Available for .Co Open Registration
- YouTube Mobile 3G Enhancements & Java Beta Launchd.
- What a wonderful Second Life!
- Google Wave: First impressions
- Nokia N8 + Bluetooth Keyboard + Mouse
- Developers unhappy over Oracle Android suit
- Caribou Coffee to Use Cellfire for Mobile Coupon Offer
- Catching up: 8 random things about me