31

Amazon's documentation is surprising lacking in information about the submitting binary process. From what I can tell, you submit an unsigned binary and they wrap it in their own code and produce a signed apk?

This leaves several questions:

  1. Does the Amazon App Store perform a zipalign for you?
  2. If you have your app in the Android Market (Google's) already, is it recommended to use the same package name or a different one? Does it make any difference?
  3. I also saw elsewhere, that they offer the option to download the apk they prepare and sign it with your own key. Is it recommended to take this and then sign it with the same key you are using in the Android Market? Does it make any difference?

Are there any other considerations or pitfalls that one should know before diving into this process?

starball
  • 20,030
  • 7
  • 43
  • 238
cottonBallPaws
  • 21,220
  • 37
  • 123
  • 171

4 Answers4

14
  1. Yes. Amazon wraps your binary with code specific to their appstore that allows them to collect analytics data and enforce DRM. The app will be repackaged after that.

  2. You should use the same package name. The Amazon distribution agreement currently has a number of provisos; e.g., that your app is not priced lower on another app store. They also do occasional checks to see whether the version of your app on the market is up to date. These checks are primarily done using the package name; changing the package name of your app could easily be viewed by them as a means to evade the terms of the agreement.

  3. No. There may be good reasons why one would want to do this, but none that I can think of. By default, Amazon signs your apk with a signature that is specific to your Amazon developer account.

Other:

Read this. In particular, ensure that the app links correctly to the Amazon app store and not the Android market, or others. I don't have inside data, but I'd wager a fair amount that the vast majority of submissions that Amazon turn down fall afoul of that requirement.

Edit: Point 2 is no longer correct; see comment below.

Michael A.
  • 4,163
  • 3
  • 28
  • 47
  • 4
    I ended up submitting my app and I'll just tack on some of my experience/notes to this answer in hopes it might help someone else. I wanted to keep the signature the same across both markets. In order to enable the option to upload your binary this way, you must contact Amazon and request it be turned on in your developer portal. Once it has, you will see an option in the upload binary section. In eclipse if you right click your project and go to Android tools there is an unsigned binary export option. Upload that to Amazon and follow the steps they provide. – cottonBallPaws Jun 28 '11 at 20:13
  • 2
    I recently had to upload my app to Amazon and there is definitely a large use case for signing your own app. If you use any type of third party api such as Google Maps or Facebook SSO, you will need to sign your production key with those services to use them in your app. In this case, you need to know the key you sign the app with, so you will want to sign it with your own key (not to mention the convenience of managing one key for 3rd party services). – onit Feb 27 '12 at 21:09
  • Yep - since then I have also seen a couple of cases where I can see the benefits of signing personally. – Michael A. Mar 04 '12 at 00:53
  • I have a problem here. I have a app already on Amazon Appstore and I had accepted for their DRM. So my app on amazon is currently signed with their key. But in my next update I will be introducing Facebook SSO for which I need to know the key it is signed with. How do I deal with this situation? – Sudarshan Bhat Sep 13 '12 at 05:26
  • That's a tough problem. Your best bet is probably to just contact Amazon dev support directly and see whether they can help you. – Michael A. Sep 16 '12 at 21:55
  • 4
    The answer to the 2nd question is no longer true. See https://developer.amazon.com/public/support/submitting-your-app/tech-docs/submitting-your-app **"Each app's package name must be unique. The package name of each app that you submit to Amazon must be different from the package name used on any other app store, such as Google Play."** – Alex Bitek Jul 28 '14 at 09:17
  • Thanks for the updated info; corrected the answer. Any idea why they made this change? – Michael A. Jul 28 '14 at 20:57
  • 3
    It looks like they changed it again, not specifying other stores anymore: **"Each app's package name must be unique. The package name of each app that you submit to Amazon must be different from the package name used in any other app."** What to trust? – Murphy Sep 25 '14 at 12:10
  • You should trust the **latest** information provided by the Amazon documentation or if none is present ask Amazon support. With the last change they allow apps to have the same package name between different app stores. **You only need to make sure your app's package name is unique within Amazon App Store**. – Alex Bitek Aug 27 '15 at 09:17
8

Here is the reply I received from the amazon mobile app distribution team for a question concerning whether to submit signed or unsigned apk's:

"You can submit signed, or unsigned binaries to the store - we will then apply our signature to your app in either case. If you need to sign your app with a known signature (if you are using Facebook authorization for example) you can choose to upload your app using our self signing process (you will need to ask us for this to be enabled for you)."

The most straight forward way to submit an app is to export your signed apk from Eclipse (all zip aligned are ready to go), then upload via the Distribution Portal using our DRM and signature.

For the latest update of my app I just took the same signed apk I previously released to google play, and it worked well.

NULL
  • 353
  • 3
  • 13
1

I have only published two little applications that sell almost nothing, but both got aproved and I followed exactly the same procedure I follow for publishing on the Android Market: I just exported the signed .apk from eclipse and also used the same package name. So far I have no problems, so I guess it's ok.

1

You should zipalign during every build, as a matter of practice.

I use the same exact build process for Amazon as I do before publishing to Google. Only difference is an Interface's variable to determine the market link (at build time, if/else is compiled out).

CrackerJack9
  • 3,650
  • 1
  • 27
  • 48
  • I was wondering if you could clarify how you switch your market link. Currently I have to go through and swap out the Android Market links for the Amazon Appstore links manually. This results in two different APK's. Do you have a method that allows you to create only one APK? Thanks – Tony Chan Sep 30 '11 at 00:37
  • using one apk-not that I am aware of. my build script generates multiple apks (pay, demo, google, amazon) for each Final build – CrackerJack9 Sep 30 '11 at 20:14
  • @Turbo set a static method in one class, and then do `if (ThisOneClass.IS_MARKET){useMarketLink} else {useAppStoreLink}` – Reed Oct 06 '11 at 04:43
  • @Jakar I think he's asking how to set `ThisOneClass.IS_MARKET` in the first place. – CrackerJack9 Oct 06 '11 at 17:16
  • @Jakar CrackerJack9 is correct. I have no idea how you could check (I would think at runtime) which Market your app was installed from. Amazon's dev blog alludes to it being possible to do a runtime [switch of the links](http://www.amazonappstoredev.com/2011/06/make-your-app-fly-through-testing-part-2.html) but I have no idea how to do it. – Tony Chan Oct 06 '11 at 23:09
  • @Turbo Okay. I guess I sort of misunderstood. I was thinking the question was more about avoiding 2 projects, rather than simply an issue of compiling two APKs. If I think of something, I'll let you know. – Reed Oct 06 '11 at 23:59
  • @Jakar we're both right :) I have it setup the same as you, except I set `ThisOneClass.IS_MARKET` at compile time (which subsequently removes the if/else condition entirely). – CrackerJack9 Oct 07 '11 at 00:28
  • @Turbo Go here: http://stackoverflow.com/questions/7683130/how-to-support-amazon-and-android-market-links-in-same-apk – Reed Oct 07 '11 at 04:47
  • @crackerjack9 the above link may also be interesting to you. – Reed Oct 12 '11 at 01:24
  • @Jakar awesome stuff, I'm a bit surprised it was possible. Thanks! I'd also like to try the method you and @CrackerJack9 talked about for managing only one project. When CrackerJack talks about setting `ThisOneClass.IS_MARKET` at compile time is he basically just changing a static boolean variable before exporting the APK? – Tony Chan Oct 12 '11 at 06:35
  • @Turbo Yes, that would be correct. That's what I WAS doing anyway. – Reed Oct 14 '11 at 03:46
  • @Turbo I do it during my build, ` ` – CrackerJack9 Oct 15 '11 at 01:25
  • @Turbo will that still work if you sign both APK's with the same signature? Have you tested it? – CrackerJack9 Oct 15 '11 at 01:34
  • Side note from the above discussion. There is no reason to zipalign if the APK is going to be resigned as the resigning un-aligns it. http://developer.android.com/guide/publishing/app-signing.html#align – Jeremy Logan Dec 08 '11 at 15:21