Testing on your own DROID...

Discussion in 'Android Hacks and Help' started by silverx10, Dec 18, 2009.

DroidForums.net is the premier Android Forum - Registered Users do not see these ads. Please Register - It's Free!
  1. silverx10
    Offline

    silverx10 Member

    Joined:
    Nov 22, 2009
    Messages:
    199
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Virginia Beach, VA
    Ratings:
    +0
    So the other night when I finally finished the Sudoku app, I was curious as to how to go about actually pushing the app to the phone for testing.

    Little did I know just how incredibly easy such an endeavour truly was.

    Starting from absolute scratch, this is how you'd go about starting and testing your very first app on the DROID (it takes almost zero skill to do this, and as far as I know, there is zero chance of you accidentally screwing up your device, as it's a very simple Hello, World app):

    I'm at work at the moment, so it's gonna be a bit vague on some of the pre-done steps. I'll create a dedicated page with thorough steps later on.

    1. Visit the official Android SDK site for the steps on configuring and installing the Android SDK and Eclipse IDE.

    2. Go to the official Motorola page to download the necessary USB drivers to interface properly with your device. (I'd provide a direct link, but I acknowledge the fact that some users may have 64-bit systems, and you need to choose the driver appropriate to your configuration). You'll wanna go for the Motorola Mobile Phone USB Drivers (for Windows®), not the charging drivers.

    3. Once again, visit the official Android SDK site for information on how to create your Hello, World app. Honestly, the app is painfully simple to create. It's little more than clicking File » New » New Project, and then selecting Android Project. Beyond that, the fields you fill out are...

    Code:
    Project name: HelloAndroid 
    Application name: Hello, Android 
    Package name: com.example.helloandroid (or your own private namespace) 
    Create Activity: HelloAndroid 
    Min SDK Version: 2
    For the SDK version, you can choose anything from 1 to 6, really. The tutorial at the site was most likely written when they had 1.1 released, and they just never went back and updated it. Anyway, click Finish, and you'll have your new app framework created.

    4. Plug in your DROID via the USB cable, and then click on your Menu button, click Settings » Applications » Development, and then check USB Debugging. This will set your phone into debug mode, and it'll catch your app when you run it from within the Eclipse IDE.

    5. Back in Eclipse, right-click your project folder, and then choose Run As » Android Application. If you haven't saved it, it'll prompt you to do so, and within seconds, it'll launch the app on your DROID. Nothing too spectacular, really: just a readout saying, Hello World, HelloWorld!, or something to that effect.

    6. Congratulations, you've just created and tested your very first Android app on your own DROID!

    If you have any questions on this, or need assistance, lemme know. I'll do my best to assist.
  2. MrGlass
    Offline

    MrGlass New Member

    Joined:
    Dec 6, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    I had no clue you could tether your Droid to a computer for debugging, that is quite awesome.

    If you are doing something simple, such as a hello world app, (or the location app I posted the other day) and want to send it to your phone, you can simply export it as a .apk file, transfer it to the phone (i stuck the files on a webserver for easy distribution), and open it. While this seems obvious, I was the only person in my group of friends who actually thought to try this, so I figured i would point it out.
  3. silverx10
    Offline

    silverx10 Member

    Joined:
    Nov 22, 2009
    Messages:
    199
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Virginia Beach, VA
    Ratings:
    +0
    Heck, until the thread about the Genie widget from the Nexus One, I hadn't even bothered to pursue the whole .apk route. So I gotta thank you for reminding me about that option.

    But for what it's worth, this particular method is quite a bit faster, as you don't have to worry about re-packaging it every single time you wanna test. Just connect, set to debug, and run.

    Edit: Also worth noting that doing this seems to effectively copy the app to your DROID, as opposed to just running it as a temporary file.
    Last edited: Dec 20, 2009
Search tags for this page
droid 4 test mode
,

droid test mode verizon

,

motorola droid test mode