Skip to content
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

plugin: new channel API #5

Merged
merged 7 commits into from
May 21, 2018
Merged

plugin: new channel API #5

merged 7 commits into from
May 21, 2018

Conversation

jaimecbernardo
Copy link
Member

This PR adds to the plugin's APIs:

  • JSON serializable messages can now be sent through the plugin, and many arguments can be sent.
  • different event names can now be sent through the channel.
  • the cordova side API is now more similar to the node side events API.
  • os.tmpdir() will now return the application's cache directory on Android.
  • an app channel was added to handle pause / resume events in the node side and to get a writable path.

enricogior and others added 7 commits March 27, 2018 17:57
Add 'system' channel to send 'pause' and 'resume' events to node.
Add 'events' to the channel to allow user defined events.
Allow user defined objects to be sent through the channel.
Add documentation for the channel API changes.
Adds app.datadir to the bridge to access a writable persistent path
from the nodejs-mobile runtime, which should be the FilesDir on
Android and the NSDocumentDirectory on iOS.
Also sets the os.tmpdir() to the CacheDir on Android.
Messages sent to the node runtime with values that evaluate as false
in conditions were reaching node as undefined value.
Fixes this behavior so that only undefined values can reach node.
Waits for the pause event handler to finish before letting the iOS
application suspend after going to the background.
Passes a pauseLock object to the pause event handlers to release so
the app channel can signal the application it can suspend.
@jaimecbernardo jaimecbernardo merged commit 0eab389 into unstable May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants