Link to home
Start Free TrialLog in
Avatar of William Peck
William PeckFlag for United States of America

asked on

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.
User generated image
I tried a second test app (Employees, using this Tutorial), but it didn't work, it just showed the Oracle logo on the Emulator.
User generated image
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.
ASKER CERTIFIED SOLUTION
Avatar of Chris Harte
Chris Harte
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of William Peck

ASKER

MunterMan,

ok, great, and thanks. I will check into this later today.
is it your experience that the emulator is agonizingly slow ?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Mark Olsen,

great ! sounds like an excellent option, I'll give it a shot.
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).
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.
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.
Mark,

ok thanks. I'll have another look at this and hopefully it will run smoothly.
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

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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 :-(
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
MunterMan,

thanks for the follow-up. I will get to this sometime today.
Munterman - close !

I followed your instructions and finally got everything loaded :-)
User generated image
then I ran "adb devices" and got something better, but not 100% clean . . .
User generated image
oh, oops, success !

My phone was asking me to authorize debugging which I didn't see . . . looks like I'm good :-)
User generated image
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 !
excellent help, thanks MunterMan and Mark Olsen.
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.