I have an Android library that uploads data to a test server and production server. I\'d like developers using this library to use the test server when developing, and produ
Starting with API 5, you can use PackageManager.getInstallerPackageName(String). From the documentation:
Retrieve the package name of the application that installed a package. This identifies which market the package came from.
To get the package of the Android Market, this post may help.