알람

· Kotlin
푸시 알람 좋아요, 팔로우, 댓글이 눌렸을 때 푸시 알람을 발송하는 기능을 구현하며 프로젝트를 마무리해보자. 푸시 알람은 서버 측에서 발송해야 한다. Firebase에 있는 fcm 기능을 이용하여 특정 계정, 프로젝트(앱)에 푸시를 전송할 수 있다. pushDTO를 만들어 push에 대한 내용을 관리하자. package com.example.firstapp.navigation.model data class PushDTO( var to: String? = null, var notification: Notification = Notification() ){ data class Notification( var body: String? = null, var title: String? = null ) } 위의 구..
· Kotlin
알람 RecyclerView 이전에 만들어 놓은 alarmDTO를 이용하여 데이터베이스에서 알람 내용을 읽어와 알람 화면에 띄워보자. alarm fragment이다. 알람을 recyclerview에 하나씩 올려보자. package com.example.firstapp.navigation import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView import androidx.fragment.app.Fragment import androidx.recyc..
· Kotlin
알람 로그 만들기 어플에서 좋아요가 눌렸거나 댓글이 달렸거나 혹은 팔로우가 됐다면 유저에게 알람을 보내주는 기능을 만들어 보자. 그렇기 하기 위해서는 알람의 log를 남겨 놓는 작업이 필요하다. 따라서 각 Activity마다 log를 firebase에 남겨 놓는 함수를 만들어보자. 우선 AlarmDTO라는 모델을 정의하여 표준화해보자. package com.example.firstapp.navigation.model data class AlarmDTO( var destinationUid: String? = null, var userId: String? = null, var uid: String? =null, var kind: Int? = null, var message: String? = null, va..
hvv_an
'알람' 태그의 글 목록