Wednesday, May 9, 2012

How to Upload a Sign In With Facebook App to the Amazon Market

The Amazon market signs apps in a way that will break your app if it uses Sign In with Facebook or any other solution that depends on the signature of the app matching what's input into a developer site ( Google maps is another example).

Contact Amazon 

Contact through the developer portal and tell them that you have this problem.


They will set up your account so you can sign the app yourself.

Here's the steps they sent me ( Directions for steps 7 & 9 will follow).
1. Log in to the Developer Portal 
2. Find the app you want to sign on the My Apps page 
3. Mouse over the Actions button for that app and select App Details 
4. From the application details page under the Upload Binary section, click Edit 
5. If you already have a binary uploaded, click the Remove button 
6. Make your DRM selection and select No, I will sign my binary under Signature 
7. Upload your unsigned binary (shown as Step 1. Upload unsigned binary)
8. Download the processed binary (shown as Step 2. Download processed binary)
9. Sign the downloaded binary
10. Upload your newly signed binary (shown as Step 3. Upload signed binary)
11. Click the Done button 

Upload your unsigned binary 

If you're like me, you've never exported an unsigned binary.

Here's the docs from google...http://developer.android.com/guide/publishing/app-signing.html#releasecompile

For eclipse peoples, here's what it says:
To export an unsigned APK from Eclipse, right-click the project in the Package Explorer and select Android Tools > Export Unsigned Application Package. Then specify the file location for the unsigned APK. (Alternatively, open your AndroidManifest.xml file in Eclipse, select the Manifest tab, and click Export an unsigned APK.)

Note: When I did this on my macbook, I had to edit the source code of the amazon website on this step to the right file path because the filepicker tried to do something strange and used C:/fakepath/....


Sign the downloaded binary 

Then after downloading the processed amazon file, you've got to sign it command line using jarsigner and zipit.

http://developer.android.com/guide/publishing/app-signing.html#signapp jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore /Users/youruser/name.keystore unsigned-amz.apk keyalias

Now the unsigned-amz.apk is signed. With some extra parameters you could create a new one instead.

The final step is a zipalign command for performance.
zipalign -v 4 /path-to/unsigned-amz.apk /path-to/signed-aligned-amz.apk

That's it.  Upload it back to amazon.

No comments:

Post a Comment