What is the best way to support both android map apis in my application ?
Google released the android google map api v2 while the v1 is still around (and works better for older phones).
So far, I see two scenarii.
1) Two apks : one apk for each api
I could use the multiple apk feature available in google play
.
- How would I do the distinction on
google play
? On the opengl support ?
This scenario means that each time I want to build my project, I have to copy/paste some files, update others which could be cumbersome.
Unless I use a tailored build process (Using ant or maven).
- Any recommendation on that matter ?
2) One apk
That one could be achieved using if/else
statements, including in the manifest
file the declaration for both the apis.
- Has anyone ever tried this ?
Note : Google maps for older phones
First, the new v2 api is vector based which is heavier on the CPU/GPU (the v1 api used bitmap tiles).
Second, the new v2 api requires opengl 2.0. Which is said to be supported in all Android device running froyo
or later.
Unfortunately, this is not true.
For example, a venerable HTC magic running gingerbread (on a custom rom) is not recognized by the google play/market to support opengl 2.0.
And maybe there are more of them...