Skip to content

Commit

Permalink
feat : 디테일뷰로 url 넘기기
Browse files Browse the repository at this point in the history
  • Loading branch information
m6z1 committed Mar 28, 2024
1 parent f09b157 commit 8338ffa
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.media.RingtoneManager
import android.net.Uri
import android.os.Build
import androidx.core.app.NotificationCompat
import com.dongyang.android.youdongknowme.ui.view.detail.DetailActivity
import com.dongyang.android.youdongknowme.ui.view.main.MainActivity
import com.google.firebase.messaging.FirebaseMessagingService
import com.google.firebase.messaging.RemoteMessage
Expand Down Expand Up @@ -41,8 +41,9 @@ class FCMService : FirebaseMessagingService() {

// Intent 및 PendingIntent 생성
val intent = if (url.isNullOrEmpty().not()) {
val uri = Uri.parse(url)
Intent(Intent.ACTION_VIEW, uri)
DetailActivity.newIntent(this, url).apply {
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
}
} else {
Intent(this, MainActivity::class.java).apply {
flags = Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP
Expand Down

0 comments on commit 8338ffa

Please sign in to comment.