DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Android Development: How to Set Up Your Mobile Device for Testing

Android Development: How to Set Up Your Mobile Device for Testing

Ajitesh Kumar user avatar by
Ajitesh Kumar
CORE ·
Sep. 02, 14 · Java Zone · Interview
Like (0)
Save
Tweet
5.91K Views

Join the DZone community and get the full member experience.

Join For Free
This article presents a quick tip on how to have your android app (developed using Android IDEs such as Eclipse or Titanium-based IDE) installed on your mobile device and have them tested right from your mobile device rather than from an emulator.

While trying to get this done with both Samsung and Motorola mobile handset, I failed on following front when I was working with Titanium IDE:

Titanium IDE was unable to detect android device. All that I did was connect my mobile device and laptop with a cable and, expected magic to happen.
After doing a little research, I figured out what needs to be done on both mobile and laptop for getting you setup such that your mobile app that you are developing, gets tested on your device. Following are key steps:
  • Configure your mobile device
  • Install/Configure on your laptop/desktop

Configure your Mobile Device

Assuming you have got latest android mobile devices, following shall work in all probabilities. I tested with Motorola (Moto G) and Samsung S3 handset.

  • On your mobile device, goto Settings and click “Security”
  • Check the “Unknown sources” which would allow installation of apps from unknown sources such as your desktop/laptop
  • Back on Settings screen, click on “Developer Options”.
  • Check “USB debugging” which will enable your device in debug mode. If you want to use mock locations, check on “Allow mock locations”. You may also want to check “Stay awake” to have your device active when you are working with your app.

That is it. You are all set.

Install/Configure on your Laptop/Desktop

Do following and you should be all set.

  • Install appropriate XXXX (Motorola/Samsung/any other…) Device Manager in order to install and configure appropriate USB drivers to connect mobile devices to your computer. For example, for Motorola, install Motorola Device Manager. For Samsung, install Samsung Kies Device Manager.
  • Connect the mobile device and appropriate USB drivers would be installed.
  • Once USB drivers get installed, go to ANDROID_HOME/tools directory, and execute “adb devices”. If connected, it would display your device name.

Execute “adb start-server”

Once above two steps are done, all that is needed to get started installing your app on mobile device is execute following command:

“adb start-server”

With above done, go to Titanium IDE and run the project on Android device. And, your app would be run on your mobile device.

mobile app Android (robot)

Published at DZone with permission of Ajitesh Kumar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • What Is URL Rewriting? | Java Servlets
  • Role of Development Team in an Agile Environment
  • How to Optimize MySQL Queries for Speed and Performance
  • Choosing Between REST and GraphQL

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo