Then you are coding wrong! You should check whether location hardware is available before using location api calls. So you should never be in the situation where you use the Location api on a device without location hardware.
LocationManager (http://developer.android.com/reference/android/ location/LocationManager.html) has serveral methods wich allow you to check if location hardware is available and it can even help you select which to use: getAllProviders() Returns a list of the names of all known location providers. getBestProvider(Criteria criteria, boolean enabledOnly) Returns the name of the provider that best meets the given criteria. getProvider(String name) Returns the information associated with the location provider of the given name, or null if no provider exists by that name. getProviders(Criteria criteria, boolean enabledOnly) Returns a list of the names of LocationProviders that satisfy the given criteria, or null if none do. getProviders(boolean enabledOnly) Returns a list of the names of location providers. On 26 apr, 17:24, oakmonk <[email protected]> wrote: > Hello, > > i want to know, what happen if i use location-based service (gps) on a > phone without gps. I can t find anything in the api-documentation. If > i understand the api correctly there is a basic api which run on every > phone and there are the optional apis (location, audio, 3d...). The > question is, what happen if i use an optional api-call on a device > without this api/hardware? Is there a emulator-image where without gps/ > wifi... implementation? > > I hope that somebody can answer my questions. > > regards > oakmonk --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

