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

Modern android applications does not work out of the box with the sdk. Add solution to readme #693

Open
freddyblockchain opened this issue Mar 21, 2024 · 0 comments

Comments

@freddyblockchain
Copy link

Problem

On a jetpack compose android application, you receive this error: Caused by: java.lang.RuntimeException: java.security.NoSuchAlgorithmException: SHA-512/256 MessageDigest not available
When trying to parse an account with a Mnemonic.

Android apparently has its own outdated bouncy castle implementation.

Solution

This needs to be added to the oncreate of the application.
class MyApp : Application() {
override fun onCreate() {
super.onCreate()
Security.removeProvider("BC")
Security.insertProviderAt(BouncyCastleProvider(), 0)
}
}

This code could be added to the README for android developers.

Dependencies

Urgency

Pretty urgent, the solution is present in an algorand forum thread, but its hard to find.

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

No branches or pull requests

1 participant