Skip to content

Commit

Permalink
added method for activity support in prepareNotification
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunalapk committed Oct 26, 2020
1 parent 0faaa4f commit ecd2ab2
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ open class MessagingService : FirebaseMessagingService() {
}
}

fun prepareNotification(title: String,message: String,activity:Class<Any>,queryString:String?,code: Int,image:String?){

try {
val intent = IntentHelper.getIntent(this,activity,queryString)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK and Intent.FLAG_ACTIVITY_CLEAR_TASK)
loadLargeIconAndNotification(intent,code,title,message,image)
}catch (e:Exception){
e.printStackTrace()
}
}


fun prepareNotification(title: String,message: String,activityName:String,queryString:String?,code: Int,image:String?){

Expand Down

0 comments on commit ecd2ab2

Please sign in to comment.