Wednesday, March 30, 2011

Identifying App Installations

[The contents of this post grew out of an internal discussion featuring many of the usual suspects who’ve been authors in this space. — Tim Bray]

In the Android group, from time to time we hear complaints from developers about problems they’re having coming up with reliable, stable, unique device identifiers. This worries us, because we think that tracking such identifiers isn’t a good idea, and that there are better ways to achieve developers’ goals.

Tracking Installations

It is very common, and perfectly reasonable, for a developer to want to track individual installations of their apps. It sounds plausible just to call TelephonyManager.getDeviceId() and use that value to identify the installation. There are problems with this
: First, it doesn’t work reliably (see below). Second, when it does work, that value survives device wipes (“Factory resets”) and thus you could end up making a nasty mistake when one of your customers wipes their device and passes it on to another person.

To track installations, you could for example use a UUID as an identifier, and simply create a new one the first time an app runs after installation. Here is a sketch of a class named “Installation” with one static method context). You could imagine writing more installation-specific data into the INSTALLATION file.

public class Installation {
private static String sID = null;
private static final String INSTALLATION = "INSTALLATION";

public synchronized static String id(Context context) {
if (sID == null) {
File installation = new File(context.getFilesDir(), INSTALLATION);
try {
if (!installation.exists())
sID = readInstallationFile(installation);
} catch (Exception e) {
throw new RuntimeException(e);
return sID;

private static String readInstallationFile(File installation) throws IOException {
RandomAccessFile f = new RandomAccessFile(installation, "r");
byte[] bytes = new byte[(int) f.length()];
return new String(bytes);

private static void writeInstallationFile(File installation) throws IOException {
FileOutputStream out = new FileOutputStream(installation);
String id = UUID.randomUUID().toString();

Identifying Devices

Suppose you feel that for the needs of your application, you need an actual hardware device identifier. This turns out to be a tricky problem.

In the past, when every Android device was a phone, things were simpler: TelephonyManager.getDeviceId() is required to return (depending on the network technology) the IMEI, MEID, or ESN of the phone, which is unique to that piece of hardware.

However, there are problems with this approach:

  • Non-phones: Wifi-only devices or music players that don’t have telephony hardware just don’t have this kind of unique identifier.

  • Persistence: On devices which do have this, it persists across device data wipes and factory resets. It’s not clear at all if, in this situation, your app should regard this as the same device.

  • Privilege:It requires READ_PHONE_STATE permission, which is irritating if you don’t otherwise use or need telephony.

  • Bugs: We have seen a few instances of production phones for which the implementation is buggy and returns garbage, for example zeros or asterisks.

Mac Address

It may be possible to retrieve a Mac address from a device’s WiFi or Bluetooth hardware. We do not recommend using this as a unique identifier. To start with, not all devices have WiFi. Also, if the WiFi is not turned on, the hardware may not report the Mac address.

Serial Number

Since Android 2.3 (“Gingerbread”) this is available via android.os.Build.SERIAL. Devices without telephony are required to report a unique device ID here; some phones may do so also.


More specifically, Settings.Secure.ANDROID_ID. This is a 64-bit quantity that is generated and stored when the device first boots. It is reset when the device is wiped.

ANDROID_ID seems a good choice for a unique device identifier. There are downsides: First, it is not 100% reliable on releases of Android prior to 2.2 (“Froyo”). Also, there has been at least one widely-observed bug in a popular handset from a major manufacturer, where every instance has the same ANDROID_ID.


For the vast majority of applications, the requirement is to identify a particular installation, not a physical device. Fortunately, doing so is straightforward.

There are many good reasons for avoiding the attempt to identify a particular device. For those who want to try, the best approach is probably the use of ANDROID_ID on anything reasonably modern, with some fallback heuristics for legacy devices.

READ MORE - Identifying App Installations

Tuesday, March 29, 2011

In-app Billing Launched on Android Market

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

Today, we're pleased to announce the launch of Android Market In-app Billing to developers and users. As an Android developer, you will now be able to publish apps that use In-app Billing and your users can make purchases from within your apps.

In-app Billing gives you more ways to monetize your apps with try-and-buy, virtual goods, upgrades, and other billing models. If you aren’t yet familiar with In-app Billing, we encourage you to learn more about it.

Several apps launching today are already using the service, including Tap Tap Revenge by Disney Mobile; Comics by ComiXology; Gun Bros, Deer Hunter Challenge HD, and WSOP3 by Glu Mobile; and Dungeon Defenders: FW Deluxe by Trendy Entertainment.

To try In-app Billing in your apps, start with the detailed documentation and complete sample app provided, which show how to implement the service in your app, set up in-app product lists in Android Market, and test your implementation. Also, it’s absolutely essential that you review the security guidelines to make sure your billing implementation is secure.

We look forward to seeing how you’ll use this new service in your apps!

READ MORE - In-app Billing Launched on Android Market

Monday, March 28, 2011

Wallpaper Inn Cape Town
digital vision toptafelberg road cape town thousands of sprawling cape
cape corner century avenue and economic and photos in cape
Wallpapers 7 Stars Luxury Bedroom Sets |
... Natural Desktop Wallpapers 2011 2012: Cape Town Wallpapers 2011 2012
Cape Town, Day 1: The One & Only, Bloubergstrand, and Nobu
The World Visit: Burj Dubai Hotels
Explore SA: Where to go this Valentine’s Day
leadcapetown2010.blogs...Laguna) Beach Apartments
Why Akele goes through pain while they can be the new Singapore of all ...
saltbox treasures: Cape Cod, Massachusetts . . . Yarmouthport
Horror Wallappers - The Descent Movie
Rebecca Shreeve; Interior Architecture: SU-Podium - Rendering
images of 17 ramadan hd wallpapers style wallpaper
saltbox treasures: Cape Cod, Massachusetts . . . Yarmouthport
Please click on the logo to continue to the website
Jan Camper - Email, Fotos, Telefonnummern zu Jan Camper
saltbox treasures: Cape Cod, Massachusetts . . . Yarmouthport
saltbox treasures: Cape Cod, Massachusetts . . . Yarmouthport
Virgin Active Constantia
HOTEL AND TOURISM: Golden Temple Diwali HD wallerpaper
... of belle de jour the beach a poem written by myself alecia wallpaper
Christinas Design og Håndverk Blogg :D: september 2010
saltbox treasures: Cape Cod, Massachusetts . . . Yarmouthport
Rebecca Shreeve; Interior Architecture: SU-Podium - Rendering
Rebecca Shreeve; Interior Architecture: SU-Podium - Rendering
saltbox treasures: Cape Cod, Massachusetts . . . Yarmouthport
Day Airport
games download wallpapers samsung galaxy tab model karolina kurkova ...
chota bheem wallpapers Top My Wallpapers 1
onemotherhen.blogspot.comMy header on this blog was
saltbox treasures: Cape Cod, Massachusetts . . . Yarmouthport
Posted by shabee at 11:28 PM
australia beaches best wallpapers & pics
1941 View from the Enemy H.Q. at Gubba watercolour & drawing 39.4 x 51 ...
golden gate bridge san,+the+Citadel,+Mohammed+Ali+Mosque+pencil+&+watercolour+47+x+59.7+cm+%C2%A9+Tate.jpg
c1941 Cairo, the Citadel, Mohammed Ali Mosque pencil & watercolour 47 ...
freevintagedigistamps....backgrounds, blog headers,,+the+Citadel,+On+the+Roof+of+the+Officers%27+Mess+watercolour+46.4+x+59.1+cm+%C2%A9+tate.jpg
1941c Cairo, the Citadel, On the Roof of the Officers' Mess ...

READ MORE - Wallpaper Inn Cape Town

Sunday, March 27, 2011

Fairy Wallpapers For Desktop
Fairy wallpaper | Top Wallpapers | Free Wallpaper for Desktop,Mobile ...
Fairy wallpaper | Top Wallpapers | Free Wallpaper for Desktop,Mobile ...
Fairy wallpaper | Top Wallpapers | Free Wallpaper for Desktop,Mobile ...
Fairy wallpaper | Top Wallpapers | Free Wallpaper for Desktop,Mobile ...
Dark fairy wallpaper desktop |Clickandseeworld is all about Funny ...
Fairy Desktop Wallpapers: Fairy Wallpapers for Desktop
Fairy wallpaper | Top Wallpapers | Free Wallpaper for Desktop,Mobile ...
... Beautiful Fairy wallpaper, Cute Fairy Wallpapers Free Desktop
Fairy wallpaper desktop - All About Screensavers - Zimbio
desktop wallpaper: Dark fairy wallpaper desktop
Fairy Desktop Wallpapers: Fairy Wallpapers for Desktop
Place For Free HD Wallpapers | Desktop Wallpapers: Fairy Wallpaper
Fairy Wallpapers: HD Fairy Wallpapers
Fairy wallpaper, Cute Fairy Wallpapers Free Desktop
Fairy Tail Wallpaper | Wallpaper for desktop
Artefantasy: Fairy green free wallpaper - desktop background
Pin Fairy Wallpaperbackground 2560 X 1570 Id 233097 Wallpaper ... Wallpapers
Fairy Desktop Wallpaper -
... Beautiful Fairy wallpaper, Cute Fairy Wallpapers Free Desktop
... fata incantatrice di gatti - free wallpaper desktop - sfondo scrivania
Fairy Wallpapers: HD Fairy Wallpapers
fairy tail wallpaper 1 fairy tail wallpaper 2 fairy tail wallpaper 3 ...
Fantasy Fairy Wallpaper Desktop Tattoo Page 20
Fairy Desktop Wallpaper -
... Fata dei ghiacci ice fairy - free wallpaper desktop - sfondo scrivania
... -charming-anime-fairy-desktop-wallpaper-wallpaper_1440x900_90762.jpg
... of classic disney find great walls wallpapers from the swell wallpaper
Magic Forest Fairy Free Desktop Wallpaper Hd Wallpapers Download ...
Mermaid Fairy
3d Fairy Desktop Wallpaper |
Fairy Tale Wallpaper Desktop
Fairy Bird Girl Background Wallpaper | Fairy Background Wallpapers
Cute For Your Computer Wallpaper |
Fairy Tail Desktop Wallpapers #1
Free Holiday Wallpapers: Christmas Fairy Wallpapers
One Piece Desktop Wallpaper Windows 7
Free Dragon Fantasy Wallpaper -
wallpapers # wolfs # nature
1920x1440 | Tumblr
... halloween 2012 haunted wallpapers horror horror wallpapers wallpapers
heat, # wade # miama
the disturbing origins of 10 famous fairy tales the little mermaid by ...
Cool Mushroom Drawings - Ajilbab.Com Portal
Animated Stars Tumblr Background - Ajilbab.Com Portal
Fantasy Ocean Art
Coloring Disney Pics Fairies | Free HD Wallpapers
december calendar | Tumblr
DUENDE VERDE !!Norman Osborn, mejor conocido como el Duende Verde, es ...
talk-sports.netBrian Wilson's Girlfriend
... Imgenes De Fondos De Pantalla Para Computadora | Free HD Wallpapers
Fairy Tail Crime Sorciere Jellal Fernandez Meredy
... Grey Couple Fairy Tail Fairy Tail Animes - Ajilbab.Com Portal
Coloring Disney Pics Fairies | Free HD Wallpapers
At Ease, Soldier
Pin Haruhi Suzumiya Hd Wallpaper Cake on Pinterest
wallpaper, | Tumblr
Lisanna Fairy Tail Natsu Happy - Ajilbab.Com Portal
free 720p wallpapers: Tgod Wallpaper
... wallpaper high pink hair anime anime girls 1500x1200 wallpaper
My Little Pony Tattoo 10 Months Ago In Tattoos 9 Comments More Like
images of pz c uk pudsey 2012 wallpaper
Pin Native American Themes « { Symbolic Tattoos } Tattoo Artistsorg ...
Pin Cute Girl Tattoosjpgw=480 on Pinterest
And Knights Lionel Messi Gq Italia Photoshoot 2011 Mv C 322x402px ...
Beelzebub Wallpaper
Parody Wallpaper
Cartoon Rooster Tattoo Boxing Gloves Weider Equipment With Bag
Winx Wallpaper Enchantix
images of chris http 25 media tumblr com wallpaper
Ask Anything This Blog Dedicated Our Favorite Couple
In the kitchen, before watching SPN with my brother
Tattoo Horde Shield Under Skin Worgen Full Back World Of Warcraft
tumblr.comdandelion tattoo | Tumblr
images of tove jansson ru wallpaper

READ MORE - Fairy Wallpapers For Desktop
Related Posts Plugin for WordPress, Blogger...