Posts tagged with SDK

Android SDK Add-Ons

November 8th, 2010

I’m very happy with avd and plan to continue improving it, but I though it would be worth pointing out the many of the device manufacturers actually have SDK add-ons that provide skins and device profiles like avd does. Of course, theirs tend to be locked behind screenfulls of legalese, but hey, what can you do?

In no particular order:

  • Sony Ericsson Xperia X10
  • Google APIs – Ok, this is actually available from the SDK Manager by default but it’s worth pointing out that it’s technically an add-on.
  • Most Motorola devices – Among others there are profiles for the Milestone, Droid X, and Droid 2 but not for the original Droid.
  • Samsung Galaxy Tab – Props to Samsung for supporting the actual add-on site functionality: there’s no need to manually download zips and such. By Samsung, why is it  impossible to find any mention of Android on your developer site? What about your nice Galaxy S phone?

Installing Android Apps via USB using the Android SDK

November 8th, 2010

I had some trouble installing an Android app I was testing today over the internet so I used the SDK. I’m working with a tester with a Windows machine who didn’t have the SDK, so I wrote up the steps so they could do the same. It’s essentially the same on OS X or Linux. Here is how to install the Android SDK so that you can install APKs over USB:

1. Go to http://developer.android.com/sdk/index.html and download the Windows version.
2. Unzip the android-sdk_r07-windows.zip and move the android-sdk-windows folder to somewhere easy to find.
3. Double click on SDK Manager to launch the application.
3a. If you get a message like “Warning: Java not found in your PATH,” go to http://www.oracle.com/technetwork/java/javase/downloads/index.html.
3b. Click on the left-most big Java button (the plain one). Select your platform (either Windows or Windows x64… probably the former). Click continue.
3c. The download should start. Once the installer is downloaded run it, choose all the default options.
3d. Now try SDK Manager again.
4. Now that you know you can open the SDK Manager, you don’t need to use it. ;-p Copy the APK file into the tools directory.
5. Click on Start, then Search for “Command Prompt” and open it.
6. type “cd Desktop” to move to the Desktop folder, assuming you unziped the Android SDK there.
7. Do the same for android-sdk-windows: “cd android-sdk-windows”
8. And now tools: “cd tools”
9. Finally, with the Android device connected via USB, install the APK with the adb tool: ‘adb -d install “My App.apk”‘ Here’s how I did it:

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Peter Robinett>cd Desktop

C:\Users\Peter Robinett\Desktop>cd android-sdk-windows

C:\Users\Peter Robinett\Desktop\android-sdk-windows>cd tools

C:\Users\Peter Robinett\Desktop\android-sdk-windows\tools>adb -d install "My App.apk"
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
753 KB/s (3701434 bytes in 4.797s)
        pkg: /data/local/tmp/My App.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]

Ignore the INSTALL_FAILED message, I already have the app on my phone. ;-) If you ever want to reinstall an app, add the -r option: apk -d install -r "My App.apk".

Installing the Google App Engine SDK and Django 1.0.2

May 6th, 2009

This was quite tricky for me, so I’m writing this down to share it with others.

  1. Install the SDK

    Simply download the SDK and install it. On Mac OS X that meant that I mounted the disk image, dragged the SDK app to my applications directory, and launched it. Make sure to give the app the necessary permission to create symlinks.

  2. Get the latest version of google-app-engine-django

    Use SVN to export the latest version of google-app-engine-django: svn export http://google-app-engine-django.googlecode.com/svn/trunk/ your-app-dir

  3. Get the latest stable version of Django

    Download from http://www.djangoproject.com/download/. Decompress it.

  4. Zip up Django

    Google Apps currently uses version 0.96 of Django and they do not plan to switch in the near future. Thus, you need to put a django.zip file in your App Engine app directory, your-app-dir. You create the file by, from the Terminal, going to the directory of the new version of Django you downloaded and typing:

    1. zip -r django.zip django/__init__.py django/bin django/core django/db django/dispatch django/forms django/http django/middleware django/shortcuts django/template django/templatetags django/test django/utils django/views
    2. zip -r django.zip django/conf -x 'django/conf/locale/*'
    3. zip -r django.zip django/contrib/__init__.py django/contrib/formtools django/contrib/auth django/contrib/sessions

      Note there is an oversight in the App Engine article about zipping Django 1.0; the last two directories are necessary.

  5. Edit settings

    Open app.yaml in your App Engine app directory and change the application name on line 1 to the name of your application. Then, open settings.py and uncomment line 83 so that django.contrib.sessions.middleware.SessionMiddleware is included.

  6. Launch the default app

    From your App Engine app directory, launch the server: python manage.py runserver. If everything went correctly you should see the server mention using zipimporter and then announce that your app is running at http://localhost:8000. Open the URL and your should see a simple welcome message.

  7. Build your app!

    Now you can get started building a Django app on App Engine. Make sure to read the article on using the Django App Engine helper to see how to start building your app.