I bought my G1 phone today. Yes, my Android phone. Dude. Am I happy. It is soo much faster than the emulator. So much fun. Not much time to play with it yet.
When I got it home tonight, I got to the task of getting my application installed on it.
Obviously the way to go is to just publish the application to one of the many marketplaces.
But, my app isn't ready yet. I want to install it on my phone and play with it and to get feedback from friends.
Here are the steps to getting that app on your phone. Maybe I will clean this up later.
Use keytool. From the command line (you obviously need the JDK installed):
Now you have a key. We will be using a self-signed key. Don't worry. Android accepts that.
Now you need to sign your .apk file. Screw the command line. You're gonna be doing this a lot. Use ant. Ant has a core task called oddly enough signjar.
Here's a build file you can start with.
Run the build. Hopefully, the "build" succeeds. Check the last modfied date on your file. It should have updated. It if it did, your jar should be signed. I'm sure there's a more intelligent way of examining it.
Now you can install your app on your phone. How the heck do you do that? Well, you need a server. Just install Tomcat locally. Copy the file to a simple web app. Modify your web.xml file (or your web server) to treat the .apk file extension as "application/vnd.android.package-archive".
Now add a link to your file in a web page or JSP. Hopefully the PC/laptop you're running this little local app is on your local network. And, you've turned on wi-fi on your phone. Go to your browser on your phone. Access your pc/laptop: http://192.168.1.10/yourapp/yourfile.jsp or some such url). Click the apk file and the Chrome browser should download the file. Once the file finishes click on the file. It should try to install the application. If it fails, it will tell you so. Unfortunately, it doesn't tell you why it failed. If it succeeeds, it will tell you and allow you to launch it.
Good luck!