PDF417 / pdf417-phonegap

PDF417 and QR code scanning plugins for PhoneGap/Cordova framework
47 stars 21 forks source link

Can i use the pdf417-phonegap scanner plugin on an ionic framework project #8

Closed shepherdsiduli closed 9 years ago

ssasa commented 10 years ago

We haven't had a chance to work with ionic framework so far. We guess it should work. If you have the chance to try it, please do.

shepherdsiduli commented 10 years ago

Thanks for the reply

I was able to add the plugin to the project unfortunately when I tried running the grunt command I got the following:

BUILD FAILED /usr/local/Cellar/android-sdk/23.0.2/tools/ant/build.xml:653: The following error occurred while executing this line: /usr/local/Cellar/android-sdk/23.0.2/tools/ant/build.xml:698: null returned: 1

Total time: 3 seconds Error code 1 for command: ant with args: debug,-f,/Users/shepherdsiduli/Trackmatic/trackmatic-ui/tm-yardstick/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen Error: /Users/shepherdsiduli/Trackmatic/trackmatic-ui/tm-yardstick/platforms/android/cordova/build: Command failed with exit code 2 at ChildProcess.whenDone (/Users/shepherdsiduli/Trackmatic/trackmatic-ui/tm-yardstick/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23) at ChildProcess.emit (events.js:98:17) at maybeClose (child_process.js:755:16) at Process.ChildProcess._handle.onexit (child_process.js:822:5)

ssasa commented 10 years ago

From the log it doesn't look like it is related to PDF417.mobi SDK

Cerovec commented 10 years ago

@shepherdsiduli Did you manage to include the plugin in your ionic framework project?

shepherdsiduli commented 10 years ago

yes, I ran the following

cordova plugin add ../pdf417-phonegap/Pdf417 (Installed successfully)

unfortunately when I ran the grunt command it fails, however when I removed the plugin everything was back to normal,

Cerovec commented 10 years ago

DId you try to find out what might cause the grunt error?

shepherdsiduli commented 10 years ago

Please refer to the log extract below:

..... mergemanifest] Manifest merger disabled. Using project manifest only. [echo] Handling aidl files... [aidl] No AIDL files to compile. [echo] ---------- [echo] Handling RenderScript files... [echo] ---------- [echo] Handling Resources... [aapt] Generating resource IDs... [aapt] aapt: warning: string 'menu_settings' has no default translation in /Users/shepherdsiduli/Trackmatic/trackmatic-ui/pdf417-phonegap/Pdf417/src/android/Pdf417MobiSdk/res; found: ar bg ca cs da de el es eu fi fr he hi hu id it iw ja ko nl pl pt ru sk sl sv tr zh_CN zh_TW [aapt] res/raw/beep.ogg:0: error: Resource entry beep is already defined. [aapt] res/raw/beep.mp3:0: Originally defined here.

BUILD FAILED /usr/local/Cellar/android-sdk/23.0.2/tools/ant/build.xml:653: The following error occurred while executing this line: /usr/local/Cellar/android-sdk/23.0.2/tools/ant/build.xml:698: null returned: 1

Total time: 2 seconds Error code 1 for command: ant with args: debug,-f,/Users/shepherdsiduli/Trackmatic/trackmatic-ui/tm-yardstick/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen Error: /Users/shepherdsiduli/Trackmatic/trackmatic-ui/tm-yardstick/platforms/android/cordova/build: Command failed with exit code 2 at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23) at ChildProcess.emit (events.js:98:17) at maybeClose (child_process.js:755:16) at Process.ChildProcess._handle.onexit (child_process.js:822:5) Sindie:tm-yardstick shepherdsiduli$

To be precise its this is a build error not a grunt error, Something I am not sure is happening in this log extract:

[aapt] aapt: warning: string 'menu_settings' has no default translation in /Users/shepherdsiduli/Trackmatic/trackmatic-ui/pdf417-phonegap/Pdf417/src/android/Pdf417MobiSdk/res; found: ar bg ca cs da de el es eu fi fr he hi hu id it iw ja ko nl pl pt ru sk sl sv tr zh_CN zh_TW [aapt] res/raw/beep.ogg:0: error: Resource entry beep is already defined. [aapt] res/raw/beep.mp3:0: Originally defined here.

lhabjane commented 10 years ago

Hi, does your project contains file "beep.ogg"? Because it looks from the log that there is a name clash with the "beep.mp3" provided with pdf417 plugin. Try to rename your file to something other than "beep" and see if it helps.

shepherdsiduli commented 10 years ago

there was a conflict on my plugins anywhere I managed to get it working. Thanx a lot guys

jkearse3 commented 9 years ago

sheperdsiduli, by any chance could you elaborate on how you got pdf417 working? I'm trying to test it out myself and am having issues trying to get it up and running and can't seem to find where the issue is stemming from as of yet.

Testing in browser gives me a 'cordova is not defined' which I expect, but when testing in Ionic View, I get no functionality.

I have this plunker as an example of how I've used it. Thanks so much if anyone responds.

ssasa commented 9 years ago

Have you followed steps from this link?

https://github.com/PDF417/pdf417-phonegap

On Sat, May 9, 2015 at 1:03 AM Johnnie Kearse III notifications@github.com wrote:

sheperdsiduli, by any chance could you elaborate on how you got pdf417 working? I'm trying to test it out myself and am having issues trying to get it up and running and can't seem to find where the issue is stemming from as of yet.

Testing in browser gives me a 'cordova is not defined' which I expect, but when testing in Ionic View, I get no functionality.

I have this plunker http://embed.plnkr.co/AE8oGawQgThfGHEtozD0/preview as an example of how I've used it. Thank so much if anyone responds.

— Reply to this email directly or view it on GitHub https://github.com/PDF417/pdf417-phonegap/issues/8#issuecomment-100390878 .

jkearse3 commented 9 years ago

ssasa, I referenced the usage section, although I didn't follow the sample section prior to it. I've been getting the following error when attempting to clone the repository: screen shot 2015-05-11 at 2 56 17 pm Am I missing something?

I also asked a question regarding this on Stack Overflow: http://stackoverflow.com/questions/30132924/calling-pdf417-phonegap-cordova-plugin-in-ionic

As well as a Plunker: http://embed.plnkr.co/AE8oGawQgThfGHEtozD0/preview

ssasa commented 9 years ago

You can't connect to GitHub ... here are some GitHub troubleshooting instructions: https://help.github.com/articles/error-permission-denied-publickey/

On Mon, May 11, 2015 at 8:58 PM Johnnie Kearse III notifications@github.com wrote:

ssasa, I followed the usage section, although I didn't follow the sample section prior to it. I've been getting the following error when attempting to close the repository: [image: screen shot 2015-05-11 at 2 56 17 pm] https://cloud.githubusercontent.com/assets/4030048/7572667/e97535cc-f7ed-11e4-81d3-05fbf39f08d7.png Am I missing something?

— Reply to this email directly or view it on GitHub https://github.com/PDF417/pdf417-phonegap/issues/8#issuecomment-101017165 .

jkearse3 commented 9 years ago

I noticed in the changelog of this repository that the script 'initDemoApp.sh' is the means of building the demo now rather than doing the sample steps listed in the ReadMe. I ran that script and it completed successfully, and after successfully uploading the demo app to ionic view to test, the plugin ended up being unresponsive.

lhabjane commented 9 years ago

Hi,

can you please specify more details, how exactly is plugin unresponsive (was plugin initialized or camera was not working ... etc) and can you please provide us with log output during the time when plugin was initialized?

jkearse3 commented 9 years ago

Hi Ihabjane, apologies for the late response, just now getting time to jump back on this. I actually cannot tell what the error is from ionic view (I'm still looking for a proper way to view logs). I'm sorry I can't be of much more help in terms of errors with testing on my phone (iOS). So I actually cannot tell if the plugin is being initialized or not...

When running in an emulator an alert box saying "This feature is not supported on iOS simulator", which I believe should be correct. The system log error when the button clicked to trigger the plugin is the following: "THREAD WARNING: ['Pdf417Scanner'] took '21.954102' ms. Plugin should use a background thread."

This is the case with both the sample as well as my attempt to use the plugin.

lhabjane commented 9 years ago

Hi,

you cannot run the plugin inside the emulator, because emulator has no camera available, this is as expected.

We don't have experience with ionic view integration, so we cannot give you a better answer. Can you please share your minimal demo application with us (zip file, github repo) to reproduce your problems - this would be a great help for us to analyze your problem.

LP, Ljudevit Habjanec

On Tue, May 19, 2015 at 10:58 AM, Johnnie notifications@github.com wrote:

Hi Ihabjane, apologies for the late response, just now getting time to jump back on this. I actually cannot tell what the error is from ionic view (I'm still looking for a proper way to view logs). I'm sorry I can't be of much more help in terms of errors with testing on my phone (iOS). So I actually cannot tell if the plugin is being initialized or not...

When running in an emulator an alert box saying "This feature is not supported on iOS simulator", which I believe should be correct.

This is the case with both the sample as well as my attempt to use the plugin.

— Reply to this email directly or view it on GitHub https://github.com/PDF417/pdf417-phonegap/issues/8#issuecomment-103404755 .

jkearse3 commented 9 years ago

Here is a demo project I quickly created that houses the issue. https://github.com/jkearse3/testScanApp

ghost commented 9 years ago

I am having the same issue as @jkearse3

Was anyone able to successfully get this to work in ionic/cordova?

jkearse3 commented 9 years ago

By any chance has there been any update with my particular issue?

Cerovec commented 9 years ago

Hi,

unfortunately, we're primarily developing our native iOS and Android SDKs, and didn't get the chance to look into ionic/cordova.

We're reopening this because it's clearly an issue.

Please post some more details about the issue, or use our native SDKs (iOS, Android).

lhabjane commented 9 years ago

Hi, @shepherdsiduli @bgold0 @jkearse3 @Cerovec we updated the pdf417 plugin, installed the updated plugin, (ionic plugin add command) to your sample project (using the latest ionic framework), and it works with your sample project on Android platform.

If you are still having issues during runtime (after succesfully running the app) please start Chrome Remote Debugger and check for issues in JS code. If it fails during building, well.. we tested on MacOS, so issues on Windows are possible..

Cerovec commented 9 years ago

Closing as inactive.