jimagic / foreground-camera-plugin

Automatically exported from code.google.com/p/foreground-camera-plugin
Apache License 2.0
0 stars 0 forks source link

Compatibility with Cordova 2.3.0 #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Include Foreground Camera Plugin for Phonegap (Cordova) 2.1.0 in an Eclipse 
Phonegap 2.3.0-based project (Windows x64 - Eclipse 4.2.1).
2. Validate project tree.

I was hoping that the plugin stuff would work as expected (I know there's 
probably a difference between v2.1.0 and 2.3.0), but instead I got some errors 
when validating the project:

- Cannot cast from ForegroundCameraLauncher to Plugin
- ctx cannot be resolved or is not a field (x2)
- R cannot be resolved to a variable (x4)
- The method success(PluginResult, String) is undefined for the type 
ForegroundCameraLauncher

Now, I solved the first three of the above errors by updating some deprecated 
code lines (I hope I got it solved - it doesn't show the errors anymore)..

The first error was corrected by changing Plugin to CordovaPlugin in the line 
"import org.apache.cordova.api.Plugin;" in ForegroundCameraLauncher.java.
ctx was replaced with cordova.getActivity() at those two places, where it 
caused trouble.
This thing with R was fixed by doing some library changes which made it create 
an R object (sorry, I don't know how to explain this the right way, as I'm not 
too experienced with Eclipse yet).

About the last error, it seems that the line with "this.success..." from 
ForegroundCameraLauncher.java is referencing something ("success") which is not 
available, or am I misunderstanding something here?

I hope you will be able to look into this, and that I'm not the one causing 
this error :)

- Mark

Original issue reported on code.google.com by markjoa...@gmail.com on 7 Feb 2013 at 4:24

GoogleCodeExporter commented 8 years ago
It seems that the issue has been resolved here 
http://stackoverflow.com/questions/14755336/phonegap-2-3-0-and-the-foregroundcam
era-plugin

I made the appropriate changes with Cordova 2.4.0 and it worked nicely. 
It would be nice if the authors provided a new bundle in Downloads for Cordova 
2.4.0 to help migration.

Original comment by Stelios....@gmail.com on 21 Feb 2013 at 7:02

GoogleCodeExporter commented 8 years ago
Thanks Stelios

I was trying to fix this but I was lack of time :(
We will test and provide this new bundle for cordova 2.4.0 as soon as possible.

Original comment by luca...@gmail.com on 22 Feb 2013 at 4:44

GoogleCodeExporter commented 8 years ago
I tried to make those changes, but failed to make it work :/ So I might be one 
of those needing a new download bundle to help migration.. I hope you will have 
it ready soon - and thanks in advance :)

Original comment by markjoa...@gmail.com on 26 Feb 2013 at 10:46

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
We have posted the fix, please test and let us know if you have any problem 
with the plugin.

Original comment by luca...@gmail.com on 26 Feb 2013 at 3:49