3

I've got an app that I have published to the google marketplace. It uses the google licensing. As you know, the Amazon store has its own DRM. What are others doing to compile the project for both stores? I would need to exclude the project reference and the call to the license checker when compiling for amazon.

user568551
  • 337
  • 3
  • 11

3 Answers3

2

The answer in the link is for opening links with intents, but the same applies here, just you use a different method/class to use the DRM. Note that you may want to use Conditional Class loading to avoid any potential errors. Example: Create one class

How to support Amazon and Android Market (Google Play) links in same APK

Basically, you find out what the int value of your app's signature is (this is the signature that will be used on the Google Marketplace), then you check at runtime

if (isMarketSig){
    useMarketDRM();
} else {
    useAmazonDRM();
}

The way it works is Amazon unpacks your app and then signs it again prior to publishing it using their own key which is tied to your developer portal account, so the signature for the Amazon one will be different from what testing shows you.

Community
  • 1
  • 1
Reed
  • 14,703
  • 8
  • 66
  • 110
1

Have a look at library projects.

BTW, you could have license checker implementation for your Amazon project that always returns true and doesn't connect to the LVL service. No need to exclude the whole thing altogether.

Nikolay Elenkov
  • 52,576
  • 10
  • 84
  • 84
  • I use library projects myself, because I don't want the dead weight of the LVL in my non-Google versions. If you set up the library projects well, the top-level project is very simple and lightweight. – ProjectJourneyman Jan 01 '12 at 19:09
1

I have a simple static final boolean which is a flag for the amazon market version. Then I remove all the links to the market etc. You can do the same. Something like:

IF (!IS_AMAZON_MARKET)
{
    checkLicense();
}

2 notes: 1) Library is a headache in some projects 2) Amazon is a c**p market. I have around %0.5 downloads compared to the Android market and they give you hell at least like Apple before publishing anything...

IncrediApp
  • 10,303
  • 2
  • 33
  • 24