Hello everyone! I am working on an old Android onl...
# multiplatform
h
Hello everyone! I am working on an old Android only project that we want to turn it into KMP to support iOS, too. We had a good progress in building the KMP project, replacing Java specific codes with KMP counterparts, etc.. There are cases we need to implement natively such as listening to location changes. The Expected and actual declarations doc talks about Expected and actual implementation. I am looking for a way (flow like) that the native code (Android, iOS) broadcasts a message/object and the common module listens (or receive the broadcasted message/object). Is there any document that help me to implement this case? thank you color
o
I did something close to this to monitor network state (impl on Desktop & Android, but should be equivalent conceptually for iOS) https://github.com/opatry/taskfolio/pull/246
See
NetworkStatusNotifier.kt
,
NetworkStatusNotifier.android.kt
,
NetworkStatusNotifier.jvm.kt
files
h
ah, that's wonderful! thank you color
o
You'll find the iOS impl in the PR I drafter yesterday: https://github.com/opatry/taskfolio/pull/269
NetworkStatusNotifier.ios.kt
thank you color 1