English | 中文
Tomoyo is a Kotlin Multiplatform app. On one hand, it is a functional copy of the website, enabling some of its features to be implemented on mobile and desktop platforms. On the other hand, it serves as a sample for common functionalities such as navigation, socket (for chat), video, audio, and db in Kotlin Multiplatform.
Please note that this project is still under development and some features may not work as expected.
Android | IOS | Desktop/JVM | Web |
---|---|---|---|
√ | √ | √ | × |
Building cross-platform client interfaces
Leverage Google Firebase to deliver system-level push notifications for Android apps
Music playback solution in Kotlin Compose Multiplatform
Implementing HTTP requests in Kotlin Compose Multiplatform
Navigation solution in Kotlin Compose Multiplatform
Global Notification Component Construction in Kotlin Compose Multiplatform
Custom Fonts in Kotlin Compose Multiplatform
Global Notification Component Construction in Kotlin Compose Multiplatform (Part II)
Data Persistence Solutions in Kotlin Compose Multiplatform
Socket Solutions in Kotlin Compose Multiplatform
- Regarding system-level message push notifications:
Processing should follow this tutorial.
Relevant client-side code is already provided in the repository. However, due to security
considerations, the corresponding
google-services.json
file is not included. If you need to develop similar functionality for reference, you may replace it and adapt the relevant messaging logic. Note that it will not be able to interact with the default server to receive messages from other users or groups inTomoyo
. - About the current strategy for system-level message push notifications:
The current client/server policy is that whenever there is a message and the user is not logged in
via the web or desktop client, messages are delivered to the user's mobile client via FCM. For
scenarios with a large number of users, you may:
- Synchronize active status from the mobile client to the server, and only trigger push notifications when the client is inactive.
- Reduce FCM usage through message batching (e.g., sending only the last message to each user/group every N seconds to avoid short-term message overload).
- Notes on testing system-level message push notifications:
Testing has been completed on the author's three mobile devices. More devices could not be tested
due to limited resources. If message delivery fails:
- First verify whether the device can access internet networks.
- Check if Google Play Services is installed (not mandatory, but may be required for certain phone models)
- If FCM-based messaging cannot be implemented or is unacceptable for your business needs, consider
using:
- Manufacturer-provided push platforms (e.g., Huawei/Honor Push, Xiaomi Push)
- Third-party push platforms (e.g., JPush, Getui).
- Regarding system-level message push notifications: Requirements vary across different mobile manufacturers. Generally, users need to enable notifications, grant auto-start permissions, and adjust the app's battery optimization settings ( to prevent the system from restricting background activity).
Open project in Android Studio and run
Run command ./gradlew :composeApp:run
- If you encounter
nw_proxy_resolver_create_parsed_array [C5.1 proxy pac] Evaluation error: NSURLErrorDomain: -1004
, please disable the proxy on your iPhone or the computer where the simulator is running