How to deploy and test a mobile app on an android device

I am using JDeveloper 12.1.3. I followed an excellent Oracle Tutorial to set up the MAF framework, and I set up the Android SDK and successfully deployed a basic app to the Android emulator.
Successful app on emulator
I tried a second test app (Employees, using this Tutorial), but it didn't work, it just showed the Oracle logo on the Emulator.
employment app but Oracle logo
However, I'm finding the emulator is agonizingly slow, so I thought I'd just test out with my Android phone (HTC One). I set up Developer Options on the HTC One, but when I deploy to the device, nothing happens. I don't see the app in the Apps section, nor can I find the file in Windows Explorer, searching my HTC device.

Here's the deployment log:
[11:12:53 PM] ----  Deployment started.  ----
[11:12:53 PM] Target platform is  (Android).
[11:12:53 PM] Beginning deployment of MAF application "MyMobileApp" to Android using profile "Android_for_HTC_One".
[11:12:54 PM] Checking state of Android Debug Bridge server...
[11:12:58 PM] Started Android Debug Bridge server.
[11:12:58 PM] Verifying a single Android device is online and connected to the ADB server...
[11:12:59 PM] Shutting down Android Debug Bridge server...
[11:12:59 PM] Deployment cancelled.
[11:13:00 PM] ----  Deployment incomplete  ----.
[11:13:00 PM] Failed to detect a connected Android device.  Make sure the device is connected.  Otherwise, manually restart the ADB server.  The following results were provided by ADB:
List of devices	attached
 (oracle.adfmf.framework.dt.deploy.android.deployers.CheckAttachedDevicesDeployer)

Open in new window


I did find this, but when I followed it through it says my HTC One has the most current USB driver.

I also found this, which says to go to  \ADT\sdk\platform-tools folder and
- Run: adb start-server
- Run: adb devices

I only see "adb.exe" in my platform-tools folder and ran that, and it flashed something in cmd window, then went away.
Gadsden ConsultingIT SpecialistAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris Harte2015 Top Expert (Most Article Points)Commented:
What I had to do to get my sony xperia working was load the usb from android, then open the device manager and under Universal Serial Bus controllers->USB Composite Device (the one with a picture of a mobile next to it) update that driver with the one from the android site. So it had to be done in two places.

Now plug in your phone, open a command window and run the 'adb devices' command, you should see your phone listed.

Now go into eclipse and to run your project go to Run->Run Configuration->Target

Select Launch on all compatible devices/AVD's, select Active devices from the drop down menu, then run. It will install to your phone and run, allowing you to debug on your computer.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gadsden ConsultingIT SpecialistAuthor Commented:
MunterMan,

ok, great, and thanks. I will check into this later today.
0
Gadsden ConsultingIT SpecialistAuthor Commented:
is it your experience that the emulator is agonizingly slow ?
0
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Mark OlsenSr. DeveloperCommented:
The emulator that comes with the Android SDK is slow. Oh so slow. For a better performance I would recommend the Genymotion Android emulator.
0
Gadsden ConsultingIT SpecialistAuthor Commented:
Mark Olsen,

great ! sounds like an excellent option, I'll give it a shot.
0
Chris Harte2015 Top Expert (Most Article Points)Commented:
The emulator can be slow, which is why it is sometimes best to test on your own device. However I find it the best option for debugging. And I use eclipse ahead of android studio. The new haxm module does speed up the emulator, once it has loaded.

(I gave up on the oracle jdeveloper a long time ago, before generics had been invented).
0
Gadsden ConsultingIT SpecialistAuthor Commented:
MunterMan, Mark Olsen,

I'm kind of striking out here, after a fast start.
- I got stuck on testing my own device (HTC One 4.4.3), so have to still go through MunterMan's suggestions above.

- I installed Gennymotion per Mark's suggestion. I got the emulator working for Android 4.4.4 (HTC One, which is my phone), but next time around, it's saying "Unable to create virtual device, Failed to import OVA file". Next, I tried Google Nexus 4.4.4 and that loaded ok. So I'm basically ok here, although I have no idea how to deploy an App to it.

- I did also load Intel x86 Emulator Accelerator (HAXM) via Android SDK (and installed manually).

So I'm basically ok here. I have two emulators set up, and instructions for setting up my phone from MunterMan.

I'm a Java hack, have tried Eclipse at home, IBM Rad, and now JDeveloper 12.1.3. I like JDeveloper, especially since it's part of the Oracle framework, which is my main focus (Oracle PL/SQL).

I will still try  to get set up to test to my own phone.
0
Mark OlsenSr. DeveloperCommented:
My Android development has been through Eclipse and it's been able to detect the Genymotion virtual devices when they are running as if they were physical devices connected via USB. I didn't have to do anything special.
0
Gadsden ConsultingIT SpecialistAuthor Commented:
Mark,

ok thanks. I'll have another look at this and hopefully it will run smoothly.
0
Gadsden ConsultingIT SpecialistAuthor Commented:
MunterMan,

I'm giving your original tips a shot . . . not quite working out . . .
- Per this for my HTC One, I went to HTC to find the USB driver and didn't find anything,

- I googled a bit for the USB driver and ended up with junk

So still striking out here, I tried again to deploy to device, and got this:
11:48:01 PM] ----  Deployment started.  ----
[11:48:01 PM] Target platform is  (Android).
[11:48:02 PM] Beginning deployment of MAF application "MyMobileApp" to Android using profile "Android_for_HTC_One".
[11:48:05 PM] Checking state of Android Debug Bridge server...
[11:48:07 PM] Android Debug Bridge server already running.
[11:48:34 PM] Verifying a single Android device is online and connected to the ADB server...
[11:48:47 PM] Deployment cancelled.
[11:48:47 PM] ----  Deployment incomplete  ----.
[11:48:48 PM] Failed to detect a connected Android device.  Make sure the device is connected.  Otherwise, manually restart the ADB server.  The following results were provided by ADB:
List of devices	attached
emulator-5554	device
 (oracle.adfmf.framework.dt.deploy.android.deployers.CheckAttachedDevicesDeployer)

Open in new window

0
Chris Harte2015 Top Expert (Most Article Points)Commented:
Since nobody has mentioned it yet I am going to ask the obvious question. Do you have debugging turned on in your phone?

If you do...

After you connect your phone, open a command window  and type

adb devices

what is the output from that?
0
Gadsden ConsultingIT SpecialistAuthor Commented:
MunterMan, yes I do have debugging enabled on my phone. when it's connected, I see the two emulators listed for "adb devices", but no phone :-(
0
Chris Harte2015 Top Expert (Most Article Points)Commented:
That means your usb driver is not talking to the ADB Interface Driver. In device manager I have two new entries when I connect my phone, Portable Devices and a second USB Composite Device.  For my (budget) model of Sony there is no specific usb driver. I had to use the google usb driver and forced windows to update the Portable and the USB. Just because windoze says you are using the latest driver does not mean you are using the right one.

Where to get the usb driver package from android
http://developer.android.com/sdk/win-usb.html

Link which explains how to install driver.
http://developer.android.com/tools/extras/oem-usb.html#InstallingDriver

My phone is at the bottom end and the support from Sony for it is not up to much. Since yours is a bit more expensive you may find a bit more information at the HTC support site.
0
Gadsden ConsultingIT SpecialistAuthor Commented:
MunterMan,

thanks for the follow-up. I will get to this sometime today.
0
Gadsden ConsultingIT SpecialistAuthor Commented:
Munterman - close !

I followed your instructions and finally got everything loaded :-)
Android device status
then I ran "adb devices" and got something better, but not 100% clean . . .
adb devices result
0
Gadsden ConsultingIT SpecialistAuthor Commented:
oh, oops, success !

My phone was asking me to authorize debugging which I didn't see . . . looks like I'm good :-)
Android recognized by adb
I'll close this out tonight, then try to deploy to the phone and will post other questions as needed.

Thanks for sticking with me !
0
Gadsden ConsultingIT SpecialistAuthor Commented:
excellent help, thanks MunterMan and Mark Olsen.
0
Gadsden ConsultingIT SpecialistAuthor Commented:
FYI - I was able to deploy to my phone, yea ! But I got the Oracle logo screen instead of the "Deployment Successful" app / feature. So I will fiddle with that, but for the purposes of this post, I'm good to go.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Android

From novice to tech pro — start learning today.