I have an app which is published on both Google Play and Amazon AppStore. I recently added map API features to this app, so I had to use the Google APIs SDK to build it. I have successfully published my new version on Google Play, but having problems on Amazon.
The app was rejected by Amazon AppStore because they said the Kindle line of devices would not support it. After further research I downloaded the new Kindle emulators and found that they do not support the Google APIs. Since Kindle Fire tablets seem to be the primary devices for people purchasing apps through Amazon AppStore, I realized that I need to submit a version of my app which does not include the map features, but otherwise is the same app.
So my question is: how do I create a second version of the App which is based on the standard Android SDK and does not include the mapping API, but uses the same Java source files? As a long-time C++ programmer I could easily do this in C++ using conditional compile flags, but I've come to realize that Java does not support conditional compilation. And I certainly don't know how to exclude libraries from one Android Eclipse build and include them in another build.
Can anyone give me some tips on how to achieve my desired result in Android? I know I could create two separate apps but there would be a lot of code overlap which would be a lot more work for me when I have to do updates, I really don't want to have to maintain two separate codebases just to support Kindle Fires!