Change app to use sockets with json instead of Intents [WIP] #233
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.
This PR replaces the Broadcast Reciever with a service listening on a socket resulting in a much faster response (miliseconds instead of seconds).
JSON is sent over the
termux-inputsocket and the results get returned ontermux-outputThis is more of a proof of concept for the time being a lot is not working/not yet implemented, I'm open to any feedback on how to improve this.
A test suite would be nice for testing all the APIs, any suggestions for how to implement that would be nice.
Tested APIs
Bugs/Issues:
Out of memory exception happens with dialogs, current work around is android:largeHeap="true" but this is obviosuly not a permanent fix.fixedUsage Examples:
This PR Requires the modified termux-api binary from here https://github.com/Epictek/termux-api-package/blob/master/termux-api.c PR incoming for that soon once I figure out how to handle rewriting all the scripts.