Solution code for Advanced Android with Kotlin Codelab
Content: http://codelabs.developers.google.com/codelabs/advanced-android-kotlin-training-notifications-fcm
EggTimer is a timer app for cooking eggs. You can start and stop the timer, choose different cooking intervals..
In this codelab, working from this starter app, you:
- Add notitications to the eggtimer app.
- Use channels and importance for the app notifications.
- Customize and style the notifications.
You should be familiar with:
- Services, AlarmManager, Broadcast Receivers.
- Download
- Swtich to start branch
- Run the app.
- Create a Firebase project
- Register your app with Firebase
- Add the Firebase configuration file to your project
- Configure your Android project to enable Firebase products
- AndroidManifest.xml
- Step 3.0 - Uncomment to start the service
- EggTimerFragment.kt
- Step 3.1 - Create a new channel for FCM
- MyFirebaseMessagingService.kt
- Step 3.2 - Log registration token
- EggTimerFragment.kt
- Step 3.3 - Subscribe to breakfast topic
- Step 3.4 - Call subscribe topics on start
- MyFirebaseMessagingService.kt
- Step 3.5 - Check messages for data
- MyFirebaseMessagingService.kt
- Step 3.6 - check messages for notification and call sendNotification