Plugins not installed to device after changing to npm.

  • 1
  • Problem
  • Updated 5 years ago
  • In Progress
In my config file, I changed

to

and ran the project through PhoneGap Build.

After I install the apk, I started the app and examined using the Chrome Debugger. Index.html and phonegap.js are present, but the plugin is not to be seen.

If I unzip the apk on the desktop, the plugin is present in the apk.

What could be happening?
Photo of gh

gh

  • 34 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 1
Photo of Yi Ming Kuan

Yi Ming Kuan

  • 1840 Posts
  • 78 Reply Likes
the plugin is not to be seen
Do you mean that the Javascript call referencing the plugin doesn't run?

Please post your PhoneGap Build app id here.

-yiming
(Edited)
Photo of gh

gh

  • 34 Posts
  • 0 Reply Likes
Correct. 'device' is not defined in JavaScript runtime.

Build ID is 1641616. (The sample tries a few other libraries as well. All have the same problem.)
Photo of Yi Ming Kuan

Yi Ming Kuan

  • 1840 Posts
  • 78 Reply Likes
Tested appĀ 1641616 on a Nexus 5 running Android 5.1.1

The camera, device, contacts and barcode scanner plugins work just fine. Is the issue resolved already?

-yiming
Photo of gh

gh

  • 34 Posts
  • 0 Reply Likes
The version using pgb was at that ID. I've refreshed the build with the npm version.

I also found out a bit more. Devices and Contacts work fine. However, if you take a picture, upon completion it returns to the Home Screen instead of the app. Restarting the app results in the state where the plugins do not get loaded.

Terminating the app from the Home Screen gets Devices and Contacts going again.

I'm using the same device/OS as you in my tests.
Photo of Yi Ming Kuan

Yi Ming Kuan

  • 1840 Posts
  • 78 Reply Likes
I did not manage to replicate the issue you encountered with the camera function in my tests. Which device, and Android version are you facing that issue on?

-yiming
Photo of gh

gh

  • 34 Posts
  • 0 Reply Likes
I'm using the same device you are, with the same Android version.

Were you using app 1641616 or your own app?
Photo of Yi Ming Kuan

Yi Ming Kuan

  • 1840 Posts
  • 78 Reply Likes
Same app. I installed it, tested the camera, device, contacts and barcode scanner options in that order.

-yiming
Photo of gh

gh

  • 34 Posts
  • 0 Reply Likes
Just tested on an Motorola XT910 with Android 4.1.1. The app works properly.

This is all pointing to something funny on the device. I'll do a factory reset on it. Dev phones have a hard life. :-)