Red-Folder / Cordova-Plugin-BackgroundService

BackroundService plugin for use with Cordova (PhoneGap)
144 stars 85 forks source link

Compile for Cordova V3 #11

Closed Red-Folder closed 11 years ago

benoitc commented 11 years ago

+1

Red-Folder commented 11 years ago

Good news: Started to build for 3.0.0 Bad news: Failed all of my automated tests

I hope to get this tested and out over the weekend

teusink commented 11 years ago

Good to hear (the starting part ;)).

I also faced errors when using your plugin in a PhoneGap 3.0.0 project. I think most of them were related to the library of your plugin.

So, I think you think you got a compiled version ready for testing in an app I can help you with that.

Red-Folder commented 11 years ago

@teusinkorg The transition from 2.x.x to 3.x.x just doesn't seem intuitive. I finally realized, after a couple of hours, that most of the Phonegap/ Cordova steps are all to do with building the cordova.jar

Once you have the cordova.jar - it seems as if the architecture of the project is pretty similar.

Obviously not completely similar - otherwise my automated testing would have passed ;)

I'll step through it over the weekend

wmertens commented 11 years ago

So if I understand correctly you're not including the source of the plugin itself? :confused:

teusink commented 11 years ago

Not in this Repo. If you want to see that source, read readme.md.

www.teusink.org www.droidpapers.org Op 25 aug. 2013 14:50 schreef "wmertens" notifications@github.com het volgende:

So if I understand correctly you're not including the source of the plugin itself? [image: :confused:]

— Reply to this email directly or view it on GitHubhttps://github.com/Red-Folder/Cordova-Plugin-BackgroundService/issues/11#issuecomment-23227110 .

wmertens commented 11 years ago

:sweat_smile: doh missed that :+1:

teusink commented 11 years ago

;)

www.teusink.org www.droidpapers.org Op 25 aug. 2013 15:59 schreef "wmertens" notifications@github.com het volgende:

[image: :sweat_smile:] doh missed that [image: :+1:]

— Reply to this email directly or view it on GitHubhttps://github.com/Red-Folder/Cordova-Plugin-BackgroundService/issues/11#issuecomment-23228135 .

Red-Folder commented 11 years ago

When I run, I'm currently getting:

Unable to resolve superclass of Lcom/red_folder/phonegap/plugin/backgroundservice/BackgroundServicePlugin; (482)

Originally thought this might be related to the Android version. I've been using 2.1, but Cordova docs say it supports 2.2+. So made changes for that (which introduced all sorts of odd problems with my automation) - but still get that error :(

I'll go back to the Cordova docs ... I must be missing something.

teusink commented 11 years ago

Why dont you support pre Android 2.3.3 with PhoneGap 2.9.0 plugin and Android 2.3.3 (API 10) and higher with PhoneGap 3.0 plugin.

Userbase below Android 2.3.3 is very small.

Just a thought. Curious about what is wrong though.

2013/8/26 Red-Folder notifications@github.com

When I run, I'm currently getting:

Unable to resolve superclass of Lcom/red_folder/phonegap/plugin/backgroundservice/BackgroundServicePlugin; (482)

Originally thought this might be related to the Android version. I've been using 2.1, but Cordova docs say it supports 2.2+. So made changes for that (which introduced all sorts of odd problems with my automation) - but still get that error :(

I'll go back to the Cordova docs ... I must be missing something.

— Reply to this email directly or view it on GitHubhttps://github.com/Red-Folder/Cordova-Plugin-BackgroundService/issues/11#issuecomment-23257127 .

www.teusink.org www.droidpapers.org

Red-Folder commented 11 years ago

Think I've got it.

In the plugin previously I was importing:

import org.apache.cordova.api.CordovaPlugin; import org.apache.cordova.api.CallbackContext;

Changed this now to:

import org.apache.cordova.CordovaPlugin; import org.apache.cordova.CallbackContext;

(without the "api").

Initial tests seem better (as in they run). What is really odd is that I would have expect the jar build to fail with the above. Go figure.

Red-Folder commented 11 years ago

Kicked off a full build and test. Hopefully get a chance to check results either later today or tomorrow.

Fingers crosses it will all work and I can upload

Red-Folder commented 11 years ago

Uploaded. As normal, raise an issue if you find any problems.

One gotcha to watch for - the syntax for the /res/xml/config.xml is different than previously. I've documented in the README - but thought worth mentioning ;)