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
From what I can tell there is nothing that the Market Application does to "flag" an application to say that it was downloaded from the market.
I have seen this issue approached in a different manner by another Android library. The AdMob Android SDK is free to download and use as described on their wiki. This library serves ads, so they have the same desire to be able to determine if the application that is currently running is being tested by the developer or if it is being used "in the wild". Their approach was to require that the developer set a "testing" attribute in the XML or to call their libraries "setTesting(boolean)" function to let the library know which ads to serve. This is obviously more of a manual approach that relies on the developer to change one line of code or XML before publishing.