Skip to content

Commit 4388500

Browse files
committed
update: README.md
1 parent 5466d40 commit 4388500

File tree

2 files changed

+29
-6
lines changed

2 files changed

+29
-6
lines changed

README.md

+27-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Frogo Notification Helper (work-in-progress 👷🔧️👷‍♀️⛏)
1+
# Frogo Notification (work-in-progress 👷🔧️👷‍♀️⛏)
2+
Beta Release
23

34
# About This Project
45
SDK for anything your problem to make easier developing android apps
@@ -7,11 +8,12 @@ frogo-notification is under huge large development
78
# Version Release
89
This Is Latest Release
910

10-
$version_release = development
11+
$version_release = 1.0.0
1112

1213
What's New??
1314

14-
* Development *
15+
* Notification with singleton method *
16+
* Simple and eazy to use *
1517

1618
# Download this project
1719

@@ -30,9 +32,30 @@ What's New??
3032

3133
dependencies {
3234
// library frogo-notification
33-
implementation "Coming Soon"
35+
implementation 'com.github.amirisback:frogo-notification:1.0.0'
3436
}
3537

38+
### Step 3. Implement frogo-notification
39+
40+
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/amirisback"))
41+
val pendingIntent = PendingIntent.getActivity(this, 0, intent, 0)
42+
43+
val frogoNotification = FrogoNotification.Inject(this)
44+
.setNotificationId(NOTIFICATION_ID)
45+
.setChannelId(CHANNEL_ID)
46+
.setChannelName(CHANNEL_NAME)
47+
.setResoures(resources)
48+
.setContentIntent(pendingIntent)
49+
.setSmallIcon(R.drawable.ic_frogo_notif)
50+
.setLargeIcon(R.drawable.ic_frogo_notif)
51+
.setContentTitle(resources.getString(R.string.content_title))
52+
.setContentText(resources.getString(R.string.content_text))
53+
.setSubText(resources.getString(R.string.subtext))
54+
.setAutoCancel(true)
55+
.build()
56+
57+
frogoNotification.launch() // notify (show the notification)
58+
3659
# Colaborator
3760
Very open to anyone, I'll write your name under this, please contribute by sending an email to me
3861

app/src/main/java/com/frogobox/notification/MainActivity.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class MainActivity : AppCompatActivity() {
1515
companion object {
1616
private const val NOTIFICATION_ID = 1
1717
private const val CHANNEL_ID = "channel_01"
18-
private const val CHANNEL_NAME = "dicoding channel"
18+
private const val CHANNEL_NAME = "amir channel"
1919
}
2020

2121
override fun onCreate(savedInstanceState: Bundle?) {
@@ -25,7 +25,7 @@ class MainActivity : AppCompatActivity() {
2525

2626
//aksi untuk onClick pada button
2727
fun sendNotification(view: View) {
28-
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("http://dicoding.com"))
28+
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/amirisback"))
2929
val pendingIntent = PendingIntent.getActivity(this, 0, intent, 0)
3030

3131
val frogoNotification = FrogoNotification.Inject(this)

0 commit comments

Comments
 (0)