I am currently developing an android application uses Google map API.
I am wondering do all android devices support map API, becuase this api is an optinal api and it is an add-on to the platform.
I am worried that my application won’t be able to run on that device.
What I need to know is programatically detect wether the device support map API, and catch the exception and do something else.
Because, using map capability is only one of features of my application, I would like to let those devices that don’t support map api can still download and run my application with out effecting other features of my app.
Any comment or suggestions are welcome
Thanks for all your guys help! all of your suggestion are useful to me!!
I wrote a simple application that is able to deployed on None-Google-Map API emulator, and detect presence of Google API problematically.
What I did was I specifying
<uses-library android:name="com.google.android.maps" android:required="false" />(but android “required” attribute only works for 2.1 and doesn’t work for 1.6. I will need to find out why. cos when I had look at the documentation, it says that this attributed supported by 1.6)
Thus, I am able to deploy the application on to emulator.
Secondly, I created a map activity which is called HelloMaps
In my main activity
This will catch the exception and tell me that the device couldn’t run map activity.