I’m working on an application that requires a server to do most of the heavy lifting. I want to prevent pirated clients from sending requests to that server. Is there a way to send some identifier with the requests so that my server can ask the Android Market if someone with that id actually bought the app? How would I go about doing that?
Note that just protecting the app with LVL won’t work, because people could fairly easily write an application to interface with the server and still provide the same functionality as the paid app.
First: There is no 100% security for anything you run on a device that is not under your control (like Android devices in your case).
You could make “abuse” harder by several measures:
IF you really really want to make it very hard you can issue a device-specific client-certificate (when the client buys your app) and use cert-based client authentication (defined in SSL standard) – you can invalidate the cert associated with the device if you see abuse without harm for the legitimate users of other devices…