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.

Android Phonegap Native Timepicker

So I’ve been working on a simple android app and I finally got audacious and started to move beyond the basics. I was able to get an app in the store with just my HTML/JS/CSS skills pretty easily which makes phonegap a big success.

Anyhow, now my latest fiasco was to try and use the native android timepicker and while I’ve still got a ways to go, I wanted to post my working code that I also put back on a discussion I had with myself on the google group.

FWIW here’s what I’ve got working.

A simple TimePicker class with a showTimePicker method.

public class TimePicker {
private DroidGap mGap;

public TimePicker(DroidGap gap)
{
mGap = gap;
}

public void showTimePicker(){
mGap.showDialog(HelloWorldPlugin.TIME_DIALOG_ID);
}
}

A custom TimePickerDialog.OnTimeSetListener which is initialized with
knowledge of DroidGap too…

@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
mGap.sendJavascript(” callback javascript goes here!”);
}

Initialize and add the createdialog stuff like the android dialog
tutorial.

TimePicker timepicker = new TimePicker(this, appView);
appView.addJavascriptInterface(timepicker, “TimePicker”);

Then in the javascript, once phonegap loads, you can refer to the
timepicker:

window.TimePicker.showTimePicker();

Hope that Saves Somebody else some time or inspires somebody to show
me the ways of the plugin framework.

 

As I get better at this stuff, I might end up understanding how to do it within the plugin architecture but for now that’s it.

Cheers.

HTC Hero Mount USB to Mac Os X (macbook pro)

I wanted to get the media off of my htc hero and onto my macbookpro, but plugging the USB cable in does not result in a notification on android which allows me to mount sd card through the USB cable.

I found lots of promising articles, most of which pointed me to either Twisted, which didn’t work for me, or to the Android developer SDK. I’m fully capable of using the SDK but this seems like overkill for such a simple issue.

My Solution: Close the lid on the macbook. Plug in the phone and then I get the notification allowing me to mount a USB. Once mounted, its the same as working with any other USB card.