Comments (4)
Hi @jerson, these are the fixed functions:
fun install(promise: Promise) {
Thread {
reactApplicationContext.runOnJSQueueThread {
Log.d(TAG, "installing")
try {
val contextHolder = this.reactApplicationContext.javaScriptContextHolder!!.get()
if (contextHolder.toInt() == 0) {
promise.resolve(false)
return@runOnJSQueueThread
}
initialize(contextHolder)
Log.i(TAG, "successfully installed")
promise.resolve(true)
} catch (exception: java.lang.Exception) {
Log.e(TAG, "failed to install JSI", exception)
promise.reject(exception)
}
}
}.start()
}
``` @ReactMethod
fun callJSI(name: String, payload: ReadableArray, promise: Promise) {
Thread {
reactApplicationContext.runOnJSQueueThread {
try {
val contextHolder = this.reactApplicationContext.javaScriptContextHolder!!.get()
if (contextHolder.toInt() == 0) {
call(name, payload, promise)
return@runOnJSQueueThread
}
val bytes = ByteArray(payload.size()) { pos -> payload.getInt(pos).toByte() }
val result = callJSI(contextHolder, name, bytes)
val resultList = Arguments.createArray()
for (i in result.indices) {
resultList.pushInt(result[i].toInt())
}
promise.resolve(resultList)
} catch (e: Exception) {
promise.reject(e)
}
}
}.start()
}
from react-native-fast-openpgp.
Hi @maksimlya could you share the code for those 2 lines after you fixed please?
from react-native-fast-openpgp.
Thanks, PR was created https://github.com/jerson/react-native-fast-openpgp/pull/92/files
from react-native-fast-openpgp.
Awesome, thx alot!
from react-native-fast-openpgp.
Related Issues (20)
- Static library only works for i86 archs HOT 4
- 'import typeof' error when running encryption example HOT 3
- Using another lib with golang HOT 1
- What is the equivalent of the web function for on this library? HOT 1
- Error: boolResponse: signature error: openpgp: unsupported feature: unknown critical signature subpacket type 33
- Unable to build for iOS on M1 HOT 4
- ReferenceError: Can't find variable: BigInt HOT 2
- Error calling functions on expo HOT 1
- Generate a public key from a private key? HOT 7
- Expose the finger print HOT 2
- Is there a standard for the formats of PGP private keys
- Got error when convertPrivateKeyToPublicKey HOT 4
- convertPrivateKeyToPublicKey() return only part of PublicKey HOT 6
- Remove jcenter() from ./android/build.gradle HOT 3
- Enhance getPublicKeyMetadata to get information about subkeys HOT 3
- TypeError: null is not an object (evaluating 'FastOpenPGPNativeModules.install') HOT 6
- openpgp: invalid data: tag byte does not have MSB set HOT 5
- Build failed on iOS:Undefined symbols for architecture x86_64
- JSI functions cannot be initialized in a threaded manner (race condition) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-fast-openpgp.