> Is there a way to check if our code is running in the emulator vs a
> real device?

ANDROID_ID should be null on the emulator and non-null on a device:

http://developer.android.com/reference/android/provider/Settings.Secure.html

> I'm using a MapView which requires a signing key. I'm using the
> signature of the eclipse debug key when running on the emulator, but
> this won't work when I build a release version. I think I need to have
> a check to see if I'm running on a real device, and set it to the real
> release key at that time.

I don't see a setter for the API key in the MapView docs. You could,
though, have two different editions of the layout, one with each key, and
load in the right copy of the layout based on emulator vs. device.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to