0
votes

I am using phonegap 3.3.1 CLI to build an app and install it on my Android device (Samsung S3). I have the following elements successful -

  1. Create project
  2. Add android platform
  3. Run the android app on emulator and device.

Steps 1 and 2 are successful but 3 is partially successful. The app installs on the emulator and is visible in its Apps menu (the list of installed apps). But the same app, installed on the device doesn't show-up in the Apps menu.

I checked its existence with the command - adb shell pm list packages

This command lists the packages and my new app package is visible there. The app doesn't appear in the menu. Please help in figuring out what's wrong.

UPDATE: It works only on the emulator. Not on any other device (Checked on a Nexus 4 and my own device S3

UPDATE 2: The app works on the mobile device. I am working to deploy it on the google glass device. Now it gives a new error, the logcat says below-

*02-18 14:49:12.266: D/CordovaActivity(2639): CordovaActivity.onCreate()

02-18 14:49:12.282: I/dalvikvm(2639): Could not find method org.apache.cordova.CordovaWebView.setWebContentsDebuggingEnabled, referenced from method org.apache.cordova.CordovaWebView.setup

02-18 14:49:12.282: W/dalvikvm(2639): VFY: unable to resolve static method 4774: Lorg/apache/cordova/CordovaWebView;.setWebContentsDebuggingEnabled (Z)V

02-18 14:49:12.282: D/dalvikvm(2639): VFY: replacing opcode 0x71 at 0x00ba 02-18 14:49:12.321: D/CordovaWebView(2639): CordovaWebView is running on device made by: Google

02-18 14:49:12.329: D/JsMessageQueue(2639): Set native->JS mode to 2

02-18 14:49:12.329: D/CordovaActivity(2639): CordovaActivity.init()

02-18 14:49:12.337: D/CordovaWebView(2639): >>> loadUrl(file:///android_asset/www/index.html) 02-18 14:49:12.344: D/PluginManager(2639): init()

02-18 14:49:12.368: D/CordovaWebView(2639): >>> loadUrlNow()

02-18 14:49:12.368: I/CordovaLog(2639): Changing log level to DEBUG(3)

02-18 14:49:12.368: I/CordovaLog(2639): Found start page location: index.html

02-18 14:49:12.368: D/Whitelist(2639): Unlimited access to network resources

02-18 14:49:12.368: D/CordovaActivity(2639): Resuming the App

02-18 14:49:12.368: D/CordovaActivity(2639): CB-3064: The errorUrl is null*

2

2 Answers

0
votes

Can you actually start the app on your device? If you deploy the app in eclipse clicking Run->Adnroid Application, do you see the build process in console and the logs in LogCat popping up in Eclipse?

When i deploy my app, it always appears on the currently selected home view when i press the menu button to jump back to the home screen.

If it doesnt appear on your home screen, then there must be a problem with your deployment. I guess you use USB cable to connect to your device. Check if your PC is allowed to connect & deploy with your device. The first time you plugin your usb cable, your device should ask you to allow your PC to connect. For this you need to enable developer mode on your device. To enable dev mode on your S3, go to device info and press the build element (the one with build version) 7 times, then enable dev mode. After that, replugin usb cable and allow your pc. If you did before, revoke the list of allowed PC's and replugin, this helped me once fixing a communication problem.

Sometimes it may help to restart your device and repeat steps from above.

But basically you should get error messages on your console & logcat.

0
votes

Identified the problem with Google Glass environment - It requires the Glass core plugin to be installed in the project and instructions to be followed exactly as given in the link here. The app appears in the list, and launches with the voice command as well. :-)