-
Notifications
You must be signed in to change notification settings - Fork 103
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
Phonegap Build access #1
Comments
I believe it will work with Build - but I've not tried it. Have a go and see if it works. I'd be interested in any feedback |
Thanks for the feedback! |
Ok. I think I need to amend the Plugin.xml licence node. Currently it reads "Apache 2.0 License" I'm unable to make the change at the moment (maybe tonight). If you want to try before then, fork the repository - make the change on your fork then try with build. If it works, then issue a pull request and I'll merge the change back in. |
I'll let you handle the code for now. I'm tied up in the app functionality that requires this plugin at the moment, so rather let you work on it when you get to it. |
Fair enough. You are aware that this plugin is intended to be extended? The plugin by it's own does nothing. It requires a developer to add their own functionality on top of it |
Yes, you mention it in the readme. So will this plugin be usable to a phonegap build user then? Or not? Adding javascript for functionality when using phonegap build is easy, but you can't add .java files and such. Or am I misunderstanding something? |
No my plugin won't keep the app alive. The idea is that the plugin provides the scaffolding for a developer to write java logic which is performed as a background service. Under Android, background services run in a separate process to the app and have a completely different life-cycle. The background service, once started, basically will continue to run until such point as it is killed off (user request or Android because it is too resource hungry). An app will run all the time it is visible on the screen - so turn of the screen or open another app then your app will likely be paused/ closed. So a couple of constraints in using the plugin ...
There is nothing stopping you (or someone else) from creating a plugin which extends onto mine - which can then be used in build. This might all make more sense once we get the plugin to work in build |
So it's specifically interaction with the screen that keeps android apps alive? |
Indeed, if you are talking about the interface (UI Thread). And Javascript 2014-02-04 neogeo987 notifications@github.com:
|
I've updated the Licence. I'd be interested if Build is happier with it |
Did you ever try this on Build? |
Changed to enhancement. Needs to be tested on Build |
It would be great if this plugin on build included your sample service - this way it could be extended from js. thx |
I am commenting here just to let you all know that MyService sample is working on Phonegap Build.
The status for 'Service', 'Timer' and 'Boot' remains 'Running', 'Enabled', and 'Registered' respectively after I close the app, restart the phone and reopens the app. But 'Listen' is back to 'Unregistered'. The sample app works but how are we going to include the Java file within the app with the directory structured for Phonegap Build? Can we use config.xml via <config-file> element (to update AndroidManifest.xml) and point it to our own Java file? If so, how? Thanks a lot for this wonderful plugin. Your efforts is very much appreciated! |
@lionlancer Normally I would expect you to include the relevant files in your project. The MyService example is just an example - I'd expect you to create your own .html & .js which implements the service you want to create. This you would include in you normal source |
First of all thanks for the awesome plugin.
As you can see there are other developers who would really love to have a background service plugin for Phonegap Build. Will it not be possible to add this plugin as a plugin to phonegap build?
The text was updated successfully, but these errors were encountered: