-
GCMService - converts GCM platform-specific API to platform-indepndent Flow API In this variant the API exposed as static methods for sake of simplicity:
ViewModels hide from UI Layer the interaction/business logic layer
- MessagesViewModel - Flow emits the list of all data notification messages received from last launch
- TokenViewModel - Flow emits the GCM tokens as soon as they are received either new or updated from the GC backend
-
MainScreen - Composable to be put into scaffold and contains a column of (at least) 2 nested composables:
- TokenView
- MessagesView
- SendView - commented out in the moment of writing this doc - development helper to bypass GC backend and send fake messages
-
PushNotificationPermitted - a wrapper component ensures the permission are implicitly requested using Jetpack Compose Permissions API