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

Refactor for android support #2950

Merged

Conversation

HenrikJannsen
Copy link
Contributor

@HenrikJannsen HenrikJannsen commented Oct 23, 2024

This prepares the Bisq code base for re-use in the Bisq Mobile Android project.
The POC project using that code base is here: https://github.com/HenrikJannsen/andorid_only_poc/tree/use-code-from-production-pr

- getFirst()
- addFirst()
- removeLast()
- Comment out unused isCompleted method using CompletableFuture.state()
Move update package from application to evolution.
Move migration package from application to evolution.
Move creation and instantiation of MigrationService to concrete ApplicationService implementations.
Let MigrationService implement Service and rename runMigrations to initialize.

We want to re-use the application library in Android, but Update and Migration handling is specific for Desktop or headless apps.
On Android we have get the userDataDir from the Activity instance.
Add MemoryReportService interface.
Use MemoryReportService as service not as static class.
Move classes which contain APIs not supported in Android here.

The java-se module hosts classes which are part of Java Standard Edition but not of the JDK used in the Android SDK.
For code re-use in Android we isolate those classes to that module.
Androids default BC version does not support all algorithms we need, thus we remove
it and add our BC provider
Use Stream instead of com.google.common.collect.Streams as it is not supported on Android.
…asses.

Move OSX Foundation classes from presentation to os-specific
Move creation of the os-specific notification services to the concrete ApplicationService.
…t at the application services.

Guava has different APIs for Java SE and Android.
To allow re-usability on Android we apply the Android version here. The Java SE version can be set from the
application service to override the Android version.
…stances used in that project.

We extract the usage of code only supported in Java SE JDKs but not Android.
Add getProcessCommandLineStream method
ProcessBuilder.Redirect.DISCARD is not supported in Android JDK
With a short timeout ane connection attempt to the mobile node will fail quickly and then the message is broadcast to the p2p network as mailbox message. As the mobile node has an outbound connection it will get the mailbox message and receives by that the message.
…e and leave custom image related methods to the implementing class.

Add JavaFxCatHashService for JavaFX Image and ImageUtil.

This allows to reuse the hash cash code for Android, and requires only a implementation for providing the Image type and methods.
@HenrikJannsen HenrikJannsen force-pushed the refactor-for-android-support branch from 6db8547 to 5dfe238 Compare October 23, 2024 17:59
@HenrikJannsen HenrikJannsen force-pushed the refactor-for-android-support branch from 5dfe238 to 77c6cb1 Compare October 23, 2024 18:01
@HenrikJannsen HenrikJannsen merged commit 61f8d4b into bisq-network:main Oct 24, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant