In this PR, the default react native example app is modified to use libwaku.
The app looks kinda bare, and some values like the pubsub topic as well as the attributes to publish a message are hardcoded, but that's something that could be improved in a separate PR, as the main focus here is to get waku to run in a mobile device!
This only works in Android, as the swift code for IOS has not been coded yet.
To execute the example app:
yarn
yarn run start
The WakuModule is created adhoc for this example. I read that it is possible to create a .aar file to package both the shared libraries and the module itself so it's easier for other apps to just include the file and not have to write their own WakuModule.kt. This is something i'll investigate and attempt to improve in a separate PR.
Do note that I don't have much experience with kotlin nor JNI, so suggestions on how to improve the code are highly appreciated! :)
In this PR, the default react native example app is modified to use libwaku.
The app looks kinda bare, and some values like the pubsub topic as well as the attributes to publish a message are hardcoded, but that's something that could be improved in a separate PR, as the main focus here is to get waku to run in a mobile device!
This only works in Android, as the swift code for IOS has not been coded yet.
To execute the example app:
The WakuModule is created adhoc for this example. I read that it is possible to create a
.aar
file to package both the shared libraries and the module itself so it's easier for other apps to just include the file and not have to write their own WakuModule.kt. This is something i'll investigate and attempt to improve in a separate PR.Do note that I don't have much experience with kotlin nor JNI, so suggestions on how to improve the code are highly appreciated! :)