Skip to content

Tomoyo is a Kotlin Compose Multiplatform app that is a sample for for common functionalities such as navigation, socket (for chat), video, audio, and db

License

Notifications You must be signed in to change notification settings

AsterCass/Tomoyo

Repository files navigation

Tomoyo App

English | 中文

Introduction

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.

WIP

Please note that this project is still under development and some features may not work as expected.

Platforms Support

Android IOS Desktop/JVM Web
×

Documents

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

Screenshots

Android

Desktop

IOS

Important Tips

  • About System-Level Push Notifications:
    • You need to follow this tutorial for setup. Relevant client code has already been provided in the repository. However, for security reasons, the corresponding google-services.json file is not included. If you need similar functionality for your own development, you can replace the file and refer to the related message handling logic. However, it will not be possible to interoperate with the default backend server and receive messages from other users or groups within Tomoyo.
    • The current client/server strategy is: As long as a message is generated and the user is not logged in on the web or desktop side, an FCM push will be sent to the user's mobile device. For use cases involving many users, it is recommended to sync the user's activity status from the mobile app to the server, and only send push notifications when the client is inactive. Additionally, FCM usage can be reduced by message aggregation (e.g., sending only the latest message every N seconds per user/group to avoid message flooding).
    • Currently, I has only tested this on three mobile devices. Testing on more devices is not possible due to limited resources. If you are not receiving push notifications:
      • First check whether the device is allowed to access the internet;
      • Then check whether the Google Play Store app is installed. These are not strictly required, but some phone models may depend on them. If you are unable to receive FCM messages or this method is not acceptable for your use case, consider using the vendor-specific push platforms (e.g., HarmonyOS Push, Xiaomi Push), or third-party platforms such as JPush or Getui.
    • Regarding system-level push notifications, requirements vary by phone manufacturer. In general, notifications need to be enabled, auto-start should be allowed, and the app's battery optimization settings may need to be adjusted.
    • The iOS version of this feature is not implemented due to the lack of a developer account, but the logic will be the same as on Android.

Run Project

Android

Open project in Android Studio and run

Desktop

Run command ./gradlew :composeApp:run

IOS

Run your application on iOS

TIPS

  • 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

Tech Stack

About

Tomoyo is a Kotlin Compose Multiplatform app that is a sample for for common functionalities such as navigation, socket (for chat), video, audio, and db

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published