Android Projects

Android Development Books

Thursday

How do run application on actual phone? in android


Now, it’s cool to install your own application on your phone so you can show all your friends, but the best benefit is the fact you also won’t have to deal with the emulator acting like a sloth.  You will also be able to test your applications that use the accelerometer (yea, I’m sure there  is a way you can on the emulator, but have never taken the time to care).   It was fun while it lasted you dirty emulator, but your time has come…
  • The first thing you want to do is set your application to debuggable (I don’t know if I have ever done this, but the Android Developers site tells you to, so I’m just going to go with it).  So open up the Android Manifest  of your project package in Eclipse and you can set it to debuggable two ways:
  1. Through the Application tab and set Debuggable to true like in this picture:
  2. Or you can open up the XML of the Manifest can declare it in code by adding android:debuggable="true" to the <application>:
  • After you have done that, you will set your phone up to USB Debugging mode, to do that you can either:
  1. On the device, go to the home screen, press MENU, select Applications > Development, then enable USB debugging.
  2. Or if you have the Settings option in your list of apps, you can go to Setting > Applications > Development, then enable USB debugging.
  • Lastly, you want to make sure you computer recognizes your android phone.  This is probably the trickiest part (its not that tricky though),  If you have a Mac you won’t have to even worry about this step and you can just skip it all together.  As for Windows, you might already be able to run your app on your phone as well, but if not follow this steps:
  1. Make sure you know where you install the SDK (in the picture you can see it is named android-sdk-windows), if you followed along with my Youtube series to the t, you should have extracted it to the C:/ drive, or whatever you main drive is, here is a picture of what we are looking for:
  2. Once you have located where your SDK is located, start up the command prompt by going to your Windows Start button and typing in “cmd” in the search and hit enter like this:
  3. That should open up the Command Prompt, now make sure you have your phone plugged into your computer and type something like this (assuming your sdk is in C:/ drive) :
  4. After you hit Enter, you should see a serial number of some sort and you are good to go.

If you are still have trouble, you may want to try this additional step (because most likely you don’t have the driver you need):
  • try to find you specific driver for your phone, but if you can’t find it, just try installing the Google USB Driver (I know it says it’s only for ADP, Nexus One, or Nexus S, but I have been told it works for other devices as well).  You want to install the driver from the AVD and SDK Manager in Eclipse, Here is a picture of what you are looking for:

Well, I hope that helps/works for you to start using your phone instead of that dang emulator.
For more information, you can check out the Android developer site, here are a couple of links related to this topic:
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

1 comments

Thanks for your comment

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

Related Posts Plugin for WordPress, Blogger...
© Google Android Lovers
Designed by BlogThietKe Cooperated with Duy Pham
Released under Creative Commons 3.0 CC BY-NC 3.0