waku-org / nwaku

Waku node and protocol.
Other
183 stars 46 forks source link

feat(mobile-android): waku example app #2642

Closed richard-ramos closed 1 week ago

richard-ramos commented 2 weeks ago

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! image

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! :)

SionoiS commented 1 week ago

I don't know how to review this. IDk anything about mobile, android or Kotlin. :|

richard-ramos commented 1 week ago

I don't know how to review this. IDk anything about mobile, android or Kotlin. :|

In these cases I use this :) : image