Sabtu, 11 Desember 2010

Android Market Client Update

Jika anda baru pertama kali berkunjung ke blog ini, Silakan kasih Komentar untuk artikel yang anda baca.

[This post is by Eric Chu, Android Developer Ecosystem. Dirk Dougherty]

The Android Market field aggroup has been hard at work on rising the Android Market undergo for users and developers. Today, Im entertained to announce a momentous update to the Android Market client. Over the incoming digit weeks, substantially be rolling discover a newborn Android Market computer to every devices running Android 1.6 or higher.

This newborn Market computer introduces essential features that improve merchandising of applications, streamline the browse-to-purchase experience, and attain it easier for developers to distribute their applications.

With a focus on rising discoverability and merchandising, weve introduced a newborn carousel on the home and category screens. Users can quickly fling through the carousel to analyse promoted applications and directly go to the download tender for the covering they want. Developers hit been rattling astir in creating enthusiastic Widgets and Live Wallpapers. To attain it easier for users to encounter their favorites, were introducing digit newborn categories for Widgets and Live Wallpapers. Applications that include Widgets and Wallpapers module be automatically additional to those newborn categories. Well also be adding more categories for favourite applications and games in the weeks ahead. In addition, the app info tender today includes Related content, which makes it easier for users to quickly encounter apps of kindred interest.


To streamline the browse-to-purchase experience, users can today admittance every the information most an covering on a single tender without the need to manoeuver crossways assorted tabs. Were also introducing covering noesis rating to provide users with more information most applications they are interested in. Since most users who letter a defrayal do so within transactions of purchase, we module turn the defrayal pane on Market to 15 minutes. This change module be mostly transparent to buyers, but module help developers manage their businesses more effectively.


To attain it easier for developers to distribute and manage their products, we module introduce hold for device targeting supported on concealment sizes and densities, as substantially as on GL texture densification formats. We are also increasing the maximum size for .apk files on Market to 50MB, to better hold richer games.

With this release, we aimed to have features that are most requested by users and developers. However, were not finished yet. We plan to move to apace compound Android Market for both users and developers and attain it the prizewinning noesis distribution service for the Android ecosystem.

Please stay adjusted as we move to have newborn capabilities in the reaching weeks and months.


Thanks
basyar.com

Kamis, 09 Desember 2010

Saving Data Safely

Jika anda baru pertama kali berkunjung ke blog ini, Silakan kasih Komentar untuk artikel yang anda baca.

With the advent of Gingerbread, were going to be streaming a series of posts in this space most the aspects of Android 2.3 that developers should tending about. One abstract that developers should tending most more than anything else is not losing data. The rules are dynamical slightly as Gingerbread arrives, so I intellection that would be a good starting point. I didnt write this; I pulled it together from the table of an email arrange involving Android engineers Brad Fitzpatrick, Dianne Hackborn, Brian Swetland, and Chris Tate.

The question is: how do you make rattling trusty your datas been written to persistent storage? The respond involves a low-level grouping call named fsync(). Old C programmers same me mostly scholarly this the hard artefact back in the Bad Old Days; in 2008 at OSCON I immensely enjoyed Eat My Data: How Everybody Gets File IO Wrong by histrion Smith; I've included a picture I took of one of his slides.

The think this should be of concern to Android developers is that with 2.3, an increasing equilibrium of devices, notably including the Nexus S, are going to be moving from YAFFS to the ext4 filesystem, which buffers much more aggressively; thusly you requirement to be more assertive most making trusty your accumulation gets to permanent hardware when you poverty it to.

If you just ingest SharedPreferences or SQLite, you crapper relax, because weve made trusty they Do The Right Thing most buffering. But if you hit your possess on-disk format, keep in nous that your accumulation doesn't actually consistently accomplish the flash chip when you write() it or even when you close() it. There are several layers of buffering between you and the hardware! And because of ext4 buffering policy, any POSIX guarantees that you intellection you had before (but actually didn't), you especially don't hit now.

Some Android devices are already streaming non-YAFFS filesystems, but as we brought up the Nexus S, buffering issues hit actually bitten us a couple of nowadays in framework code. When the Gingerbread source cipher becomes available, youll find lots of examples of how file I/O should be done.

To start with, for raw accumulation study using one of the coetaneous modes of java.io.RandomAccessFile, which verify tending of calling fsync() for you in the pertinent way. If you cant, youll poverty Java cipher that looks something same this.

public static boolean sync(FileOutputStream stream) { try { if (stream != null) { stream.getFD().sync(); } convey true; } grownup (IOException e) { } convey false;

In whatever applications, you strength even poverty to analyse the convey status of the close() call.

Now of course, there are digit sides to this story. When you call fsync() and obligate the accumulation onto storage, that crapper be slow; worse, unpredictably slow. So be trusty to call it when you requirement it, but be careful not to call it carelessly.

Background datum if you poverty to know more:

  • ext4 and accumulation loss by Jonathan Corbet.

  • ext4 vs fsync, my verify by Alexander Larsson.

  • Dont fear the fsync! by Ted Tso.


Thanks
basyar.com