Skip to content

Commit

Permalink
[Feat/#51] FCM Service 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ss99x2002 committed Jul 13, 2023
1 parent 7d88386 commit 1e26c87
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
16 changes: 13 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.INTERNET"/>

<application
android:allowBackup="true"
Expand Down Expand Up @@ -44,11 +44,21 @@
</intent-filter>
</activity>
<service android:name=".util.fcm.MyFirebaseMessagingService"
android:exported="false">
android:exported="false"
android:enabled="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value=" " />
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_umbba_logo"/>
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/primary_400"/>
<activity
android:name=".presentation.invite.InviteCodeActivity"
android:exported="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {

override fun onNewToken(token: String) {
super.onNewToken(token)
Log.e("hyeon","fcm token : $token")
Log.e("hyeon", "fcm token : $token")
}

override fun onMessageReceived(message: RemoteMessage) {
super.onMessageReceived(message)
Timber.e(message.notification.toString())
Timber.e(message.data.toString())
Log.e("hyeon", message.notification.toString())
Log.e("hyeon", message.data.toString())
createNotification(message)
}

Expand Down

0 comments on commit 1e26c87

Please sign in to comment.