-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep callback success open. To be callable from doWork() #17
Comments
Notes for development; Would plan to create registerForUpdates and deregisterForUpdates JS methods. The registerForUpdates would accept a JS callback to be used off the back of the doWork listener. Some conversation on keeping the callback open here -> http://stackoverflow.com/questions/7751522/android-phonegap-notify-javascript-when-an-asynctask-is-finished I assume I should be able to call success multiple times as long as I keep the pluginResult.setKeepCallback true Will need to test it |
Update: Code drafted. Interface added for Cordova 3.1 - need to added to test spec. Will need to validate if approach will work for previous Cordova versions before release |
Committed code for Cordova 3.1.0 version - Commit 0e3a990 Will update & upload version by version over the next few days. Note sure at this stage if I'll be able to support all versions. |
Quick update; version 2.2.0 through to 3.0.0 have been built and tested. I'll probably be able to update to the repo tonight. |
All versions now uploaded (commit ac9f989) Any problems, please log issue as normal |
Please help me, I have a error: Error: Plugin unable to bind to background servace |
@vladjiss Please stop adding comments to existing issues. The issue should be kept on topic. Please create a new issue and provide a copy of your code so that I can assist. It will almost certainly be because you have missed a step in the instructions - which I'm prepared to help with, but please stop spamming the issues list |
As you suggested to me elsewhere (http://red-folder.blogspot.com.es/2012/09/phonegap-service-tutorial-part-3.html, comments), I think the ability to call back the success function from doWork could be beneficial to integrate the service. The need for a set interval in the cordova app would be eliminated. This would be in line with the pattern used elsewhere, cf http://stackoverflow.com/questions/7751522/android-phonegap-notify-javascript-when-an-asynctask-is-finished.
I'm not clear on the impact of the client app being killed by Android as it goes out of focus a new instance of the client connecting again.
Regards
The text was updated successfully, but these errors were encountered: