-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
check for android compatibility #50
Comments
@marc0olo I can try to help you with this one. What end result do you expect? Should it be made available via maven/jitpack? Or just building a jar would be enough? |
Hey @Defuera, thanks for asking. Honestly I haven’t thought about the android support in detail. Most important thing is to check whether KeyPair generation and tx signing is working when using the SDK in android. I don’t know about how to use libsodium on android. That might be the first hurdle. We probably need to ship libsodium dependencies within the jar file and build a separate version of the SDK specifically for android. I think the bouncycastle / spongycastle topic shouldn’t be a problem on newer android versions. But this is only an assumption. argon2-jvm probably won’t work at all right now (see linked issue above). But since we use argon2 only for creation and import of keystore files that wouldn’t be necessary for the moment. Building a separate jar for android would be enough if you get it working and if it is necessary to make some dependency changes specifically for android. Let me know what you think about that topic. |
Hi @marc0olo, I've started to look into the issue.
Do you think solution would be to replace |
thanks for testing @Defuera. I hoped and thought that newer android versions don't have that classpath issue with bouncycastle anymore :-/ there might be another problem because spongycastle is not always up to date with bouncycastle and Ed25519 was introduced in one of the most recent bouncycastle versions. so the currently available spongycastle version probably won't support it. I think someone made a tool to automatically build spongycastle or rename the bouncycastle packages. but this build then would not be available on a central repository. but when testing this and building it locally you could verify whether this solves your problem. |
here some links regarding the bouncycastle / spongycastle problem: |
@Defuera it seems like I don't run into the issue you had. I had some other issues but I will hopefully be able to share an example in the near future here the solution for the problem that made me crazy: |
generating KeyPairs and working with the KeyPairService in general works without problems. I now wanted to get account data from the node and have the problem that the app on the emulator isn't able to open a socket connection:
|
this could be solved by just adding the required permission(s). I forgot to set <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
so here my general observations and required steps to get the SDK working on an emulator in my android studio. gradle android settingsWith the following settings I got an app working on the emulator:
The packaging exclusions are required because we make use of bitcoinj, see: https://stackoverflow.com/questions/54263808/android-bitcoin-j-install-failed-no-matching-abis-failed-to-extract-native-lib The packaging options are currently also necessary. Maybe we can fix that in the SDK build so that those files in Unfortunately it is currently required to use API version 26 at minimum due to the usage of permissionsFollowing android permissions need to be set: <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> loggingFor logging you should add following dependency:
aepp-showcase-androidTo get started quickly and play around with the SDK we published a simple showcase application which allows to transfer funds from Alice to Bob and vice versa: |
another error that currently appears is:
more information about it here:
should be solved when upgrading netty-dependency to version 4.1.33.Final |
for argon2 there exists an Android/Kotlin binding: |
closing this for now. given the provided config in https://github.com/kryptokrauts/aepp-showcase-android the SDK can generally be used in Android applications |
we need to check whether the SDK can work with Android.
there was a thread opened in the forum:
I think 3 dependencies could make problems:
The text was updated successfully, but these errors were encountered: