Using the C++ Embedder API to start and stop Node#3
Draft
jermy-c wants to merge 2 commits intoupdate-libnodefrom
Draft
Using the C++ Embedder API to start and stop Node#3jermy-c wants to merge 2 commits intoupdate-libnodefrom
jermy-c wants to merge 2 commits intoupdate-libnodefrom
Conversation
|
Can we load node.js not as capacitor plugin, but rather link it directly from the Android project as native dynamic library that is required by our app binary? Then the OS would link it for us at startup. You'd still need to call node.js own start()/stop() functions, but at least node.js would be guaranteed to be loaded. Our first attempts on iOS did that as well. |
Author
|
Yes, that makes sense. I see iOS Node.js mobile doesn't use the same Plugin pattern. I'll try that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since we don't Node.js explicitly I thought we could try stopping it whenever the app pauses and that would fix some other issues also.
The libnode uses the API provided by Node.js.
The plan was to:
pause,resume,stop,restartevents accordingly and manage how node.js runsnode::Stopfunctionnode::StopHowever, I realized that.
node::Stop()to usehttps://nodejs.org/api/embedding.html#c-embedder-api