You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FrogoNotification.Inject(this) // Intialize for Context
.setChannelId(CHANNEL_ID) // Intialize for Channel ID
.setChannelName(CHANNEL_NAME) // Initialize for Channel Name
.setContentIntent(pendingIntent) // Initialize for Content Intent
.setSmallIcon(R.drawable.ic_frogo_notif) // Initialize for Small Icon
.setLargeIcon(R.drawable.ic_frogo_notif) // Initialize for Large Icon
.setContentTitle(resources.getString(R.string.content_title)) // Initialize for Content Title
.setContentText(resources.getString(R.string.content_text)) // Initialize for Content Text
.setSubText(resources.getString(R.string.subtext)) // Initialize for Sub Text
.setupAutoCancel() // Initialize for Auto Cancel
.build() // Build the Frogo Notification
.launch(NOTIFICATION_ID) // Notify the Frogo Notification
Feature frogo-notification
Simple Notification
FrogoNotification.Inject(this) // Intialize for Context
.setChannelId(CHANNEL_ID) // Intialize for Channel ID
.setChannelName(CHANNEL_NAME) // Initialize for Channel Name
.setContentIntent(pendingIntent) // Initialize for Content Intent
.setSmallIcon(R.drawable.ic_frogo_notif) // Initialize for Small Icon
.setLargeIcon(R.drawable.ic_frogo_notif) // Initialize for Large Icon
.setContentTitle(resources.getString(R.string.content_title)) // Initialize for Content Title
.setContentText(resources.getString(R.string.content_text)) // Initialize for Content Text
.setSubText(resources.getString(R.string.subtext)) // Initialize for Sub Text
.setupAutoCancel() // Initialize for Auto Cancel
.build() // Build the Frogo Notification
.launch(NOTIFICATION_ID) // Notify the Frogo Notification
Custom Layout (NEW FEATURE)
val collapsed =object:FrogoNotifCustomContentViewListener {
overridefunsetupCustomView(): Int {
returnR.layout.notification_collapsed
}
overridefunsetupComponent(context:Context, customView:RemoteViews) {
customView.apply{
setTextViewText(R.id.text_view_collapsed_1, "Hello World!")
}
}
}
val expanded =object:FrogoNotifCustomContentViewListener {
overridefunsetupCustomView(): Int {
returnR.layout.notification_expanded
}
overridefunsetupComponent(context:Context, customView:RemoteViews) {
customView.apply {
setImageViewResource(R.id.image_view_expanded, R.drawable.ic_android)
setOnClickPendingIntent(R.id.image_view_expanded, clickPendingIntent)
}
}
}
FrogoNotification.Inject(this) // Intialize for Context
.setChannelId(FrogoApp.CHANNEL_ID) // Intialize for Channel ID
.setChannelName(FrogoApp.CHANNEL_NAME) // Initialize for Channel Name
.setSmallIcon(R.drawable.ic_android) // Initialize for Small Icon
.setCustomContentView(collapsed)
.setCustomBigContentView(expanded)
.build() // Build the Frogo Notification
.launch(FrogoApp.NOTIFICATION_ID) // Notify the Frogo Notification
val frogoNotification =FrogoNotification.Inject(this)
.setChannelId(CHANNEL_ID)
.setChannelName(CHANNEL_NAME)
.setSmallIcon(R.drawable.ic_frogo_email)
.setGroup(GROUP_KEY_EMAILS)
.setContentIntent(pendingIntent)
.setupAutoCancel()
// Check if NotificationID is smaller than Max Notifif (idNotification <MAX_NOTIFICATION) {
stackNotif[idNotification].message?.let {
frogoNotification
.setContentTitle("New Email from "+ stackNotif[idNotification].sender)
.setContentText(it)
.setLargeIcon(R.drawable.ic_frogo_notif)
}
} else {
frogoNotification
.setContentTitle("$idNotification new emails")
.setContentText("[email protected]")
.setGroupSummary()
.setupInboxStyle(object:FrogoNotifInboxStyleListener {
overridefunaddLine1(): String {
return"New Email from "+ stackNotif[idNotification].sender
}
overridefunaddLine2(): String {
return"New Email from "+ stackNotif[idNotification -1].sender
}
overridefunsetBigContentTitle(): String {
return"$idNotification new emails"
}
overridefunsetSummaryText(): String {
return"mail@frogobox"
}
})
}
frogoNotification
.build()
.launch(idNotification)
With Frogo Style
FrogoNotification.Inject(this) // Intialize for Context
.setSmallIcon(R.drawable.ic_frogo_notif) // Initialize for Small Icon
.setupWithFrogoStyle()
.build() // Build the Frogo Notification
.launch(NOTIFICATION_ID) // Notify the Frogo Notification
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
About This Project
Screenshoot Sample
Version Release
This Is Latest Release
What's New??
Download this project
Step 1. Add the JitPack repository to your build file (build.gradle : Project)
<Option 1> Groovy Gradle
<Option 2> Kotlin DSL Gradle
Step 2. Add the dependency (build.gradle : Module)
<Option 1> Groovy Gradle
<Option 2> Kotlin DSL Gradle
Step 3. Implement frogo-notification (Simple Notification)
Feature frogo-notification
Simple Notification
Custom Layout (NEW FEATURE)
With Action Replay
With Inbox Style (Stack)
With Frogo Style
For Documentation
Colaborator
Very open to anyone, I'll write your name under this, please contribute by sending an email to me
Name Of Contribute
Waiting for your contribute
Attention !!!
This discussion was created from the release Release v1.1.1.
Beta Was this translation helpful? Give feedback.
All reactions