Skip to content

Commit d982071

Browse files
committed
Release v1.0.2
1 parent e78203f commit d982071

File tree

4 files changed

+134
-17
lines changed

4 files changed

+134
-17
lines changed

README.md

Lines changed: 131 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
![ScreenShoot Apps](docs/image/ss_banner.png?raw=true)
22

33
# About This Project
4-
SDK for anything your problem to make easier developing android apps
4+
SDK for your notification problem to make easier developing android apps
55
frogo-notification is under huge large development
66

77
# Version Release
88
This Is Latest Release
99

10-
$version_release = 1.0.1
10+
$version_release = 1.0.2
1111

1212
What's New??
1313

1414
* Notification with singleton method *
1515
* Simple and eazy to use *
16+
* With many feature *
17+
* Full documentation *
1618

1719
# Download this project
1820

@@ -31,29 +33,144 @@ What's New??
3133

3234
dependencies {
3335
// library frogo-notification
34-
implementation 'com.github.amirisback:frogo-notification:1.0.1'
36+
implementation 'com.github.amirisback:frogo-notification:1.0.2'
3537
}
3638

37-
### Step 3. Implement frogo-notification
39+
### Step 3. Implement frogo-notification (Simple Notification)
40+
41+
FrogoNotification.Inject(this) // Intialize for Context
42+
.setChannelId(CHANNEL_ID) // Intialize for Channel ID
43+
.setChannelName(CHANNEL_NAME) // Initialize for Channel Name
44+
.setContentIntent(pendingIntent) // Initialize for Content Intent
45+
.setSmallIcon(R.drawable.ic_frogo_notif) // Initialize for Small Icon
46+
.setLargeIcon(R.drawable.ic_frogo_notif) // Initialize for Large Icon
47+
.setContentTitle(resources.getString(R.string.content_title)) // Initialize for Content Title
48+
.setContentText(resources.getString(R.string.content_text)) // Initialize for Content Text
49+
.setSubText(resources.getString(R.string.subtext)) // Initialize for Sub Text
50+
.setAutoCancel(true) // Initialize for Auto Cancel
51+
.build() // Build the Frogo Notification
52+
.launch(NOTIFICATION_ID) // Notify the Frogo Notification
53+
54+
# Feature frogo-notification
55+
56+
### Simple Notification
57+
58+
FrogoNotification.Inject(this) // Intialize for Context
59+
.setChannelId(CHANNEL_ID) // Intialize for Channel ID
60+
.setChannelName(CHANNEL_NAME) // Initialize for Channel Name
61+
.setContentIntent(pendingIntent) // Initialize for Content Intent
62+
.setSmallIcon(R.drawable.ic_frogo_notif) // Initialize for Small Icon
63+
.setLargeIcon(R.drawable.ic_frogo_notif) // Initialize for Large Icon
64+
.setContentTitle(resources.getString(R.string.content_title)) // Initialize for Content Title
65+
.setContentText(resources.getString(R.string.content_text)) // Initialize for Content Text
66+
.setSubText(resources.getString(R.string.subtext)) // Initialize for Sub Text
67+
.setAutoCancel(true) // Initialize for Auto Cancel
68+
.build() // Build the Frogo Notification
69+
.launch(NOTIFICATION_ID) // Notify the Frogo Notification
70+
71+
### With Action Replay
72+
73+
FrogoNotification.Inject(this)
74+
.setChannelId(CHANNEL_ID)
75+
.setChannelName(CHANNEL_NAME as String)
76+
.setSmallIcon(R.drawable.ic_frogo_notif)
77+
.setContentTitle(getString(R.string.notif_title))
78+
.setContentText(getString(R.string.notif_content))
79+
.showWhen(true)
80+
.setupActionRemoteInput(object : IFNActionRemoteInput {
81+
override fun setRemoteInputResultKey(): String {
82+
return KEY_REPLY
83+
}
84+
85+
override fun setRemoteInputLabel(): String {
86+
return getString(R.string.notif_action_reply)
87+
}
88+
89+
override fun setActionIcon(): Int {
90+
return R.drawable.ic_frogo_send
91+
}
92+
93+
override fun setActionTitle(): String {
94+
return getString(R.string.notif_action_reply)
95+
}
96+
97+
override fun setActionIntent(): PendingIntent? {
98+
return getReplyPendingIntent()
99+
}
100+
101+
override fun setAllowGeneratedReplies(): Boolean {
102+
return true
103+
}
104+
})
105+
.build()
106+
.launch(mNotificationId)
38107

39-
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/amirisback"))
40-
val pendingIntent = PendingIntent.getActivity(this, 0, intent, 0)
108+
109+
### With Inbox Style (Stack)
41110

42111
val frogoNotification = FrogoNotification.Inject(this)
43-
.setNotificationId(NOTIFICATION_ID)
44112
.setChannelId(CHANNEL_ID)
45113
.setChannelName(CHANNEL_NAME)
46-
.setResoures(resources)
114+
.setSmallIcon(R.drawable.ic_frogo_email)
115+
.setGroup(GROUP_KEY_EMAILS)
47116
.setContentIntent(pendingIntent)
48-
.setSmallIcon(R.drawable.ic_frogo_notif)
49-
.setLargeIcon(R.drawable.ic_frogo_notif)
50-
.setContentTitle(resources.getString(R.string.content_title))
51-
.setContentText(resources.getString(R.string.content_text))
52-
.setSubText(resources.getString(R.string.subtext))
53117
.setAutoCancel(true)
118+
119+
// Check if NotificationID is smaller than Max Notif
120+
if (idNotification < MAX_NOTIFICATION) {
121+
122+
stackNotif[idNotification].message?.let {
123+
frogoNotification
124+
.setContentTitle("New Email from " + stackNotif[idNotification].sender)
125+
.setContentText(it)
126+
.setLargeIcon(R.drawable.ic_frogo_notif)
127+
}
128+
129+
} else {
130+
131+
frogoNotification
132+
.setContentTitle("$idNotification new emails")
133+
.setContentText("[email protected]")
134+
.setGroupSummary()
135+
.setupInboxStyle(object : IFNInboxStyle {
136+
override fun addLine1(): String {
137+
return "New Email from " + stackNotif[idNotification].sender
138+
}
139+
140+
override fun addLine2(): String {
141+
return "New Email from " + stackNotif[idNotification - 1].sender
142+
}
143+
144+
override fun setBigContentTitle(): String {
145+
return "$idNotification new emails"
146+
}
147+
148+
override fun setSummaryText(): String {
149+
return "mail@frogobox"
150+
}
151+
})
152+
153+
}
154+
155+
frogoNotification
54156
.build()
157+
.launch(idNotification)
158+
159+
### With Frogo Style
160+
161+
FrogoNotification.Inject(this) // Intialize for Context
162+
.setSmallIcon(R.drawable.ic_frogo_notif) // Initialize for Small Icon
163+
.setupWithFrogoStyle()
164+
.build() // Build the Frogo Notification
165+
.launch(NOTIFICATION_ID) // Notify the Frogo Notification
166+
167+
168+
### For Documentation
55169

56-
frogoNotification.launch() // notify (show the notification)
170+
- Method with description [Click Here](https://github.com/amirisback/frogo-notification/blob/master/frogonotification/src/main/java/com/frogobox/frogonotification/IFrogoNotification.kt)
171+
- Simple Notification [Click Here](https://github.com/amirisback/frogo-notification/blob/master/app/src/main/java/com/frogobox/notification/simple/MainActivity.kt)
172+
- With Action Replay [Click Here](https://github.com/amirisback/frogo-notification/blob/master/app/src/main/java/com/frogobox/notification/custom/NotificationService.kt)
173+
- With Inbox Style (Stack) [Click Here](https://github.com/amirisback/frogo-notification/blob/master/app/src/main/java/com/frogobox/notification/stack/StackNotifActivity.kt)
57174

58175
# Colaborator
59176
Very open to anyone, I'll write your name under this, please contribute by sending an email to me

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ android {
77

88
def versionMajor = 1
99
def versionMinor = 0
10-
def versionPatch = 1
10+
def versionPatch = 2
1111

1212
def appDomain = "com"
1313
def appDevConsole = "frogobox"

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
3-
ext.kotlin_version = "1.4.20"
3+
ext.kotlin_version = "1.4.21"
44
repositories {
55
google()
66
jcenter()

frogonotification/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ android {
1313

1414
def versionMajor = 1
1515
def versionMinor = 0
16-
def versionPatch = 1
16+
def versionPatch = 2
1717

1818
def versionCodeLibrary = (versionMajor * 100) + (versionMinor * 10) + (versionPatch)
1919
def versionNameLibrary = "$versionMajor.$versionMinor.$versionPatch"

0 commit comments

Comments
 (0)