Skip to content
forked from Karn/notify

Simplified notification delivery for Android.

License

Notifications You must be signed in to change notification settings

j0lzsnz3/notify

 
 

Repository files navigation

Notify

Notify

Simplified notification delivery for Android.

Kotlin RxJava Build Status Codecov GitHub (pre-)release

GETTING STARTED

You can install Notify using Jitpack while it is still in development.

As such there currently are pre-releases available until test coverage is improved.

// Project level build.gradle
// ...
repositories {
    maven { url 'https://jitpack.io' }
}
// ...

// Module level build.gradle
dependencies {
    // -SNAPSHOT (latest release)
    implementation "io.karn:notify:-SNAPSHOT"
}

USAGE

The most basic case is as follows:

Notify
    .with(context)
    .content { // this: Payload.Content.Default
        title = "New dessert menu"
        text = "The Cheesecake Factory has a new dessert for you to try!"
    }
    .show()

Basic usecase

If you run into a case in which the library does not provide the requisite builder functions you can get the NotificationCompat.Builder object and continue to use it as you would normally by calling Creator#asBuilder().

NOTIFICATION ANATOMY

Anatory

ID Name Description
1 Icon Set using the Header#icon field.
2 App Name Application name, immutable.
3 Header Text Optional description text. Set using the Header#headerText field.
4 Timestamp Timestamp of the notification.
5 Expand Icon Indicates that the notification is expandable.
6 Content The "meat" of the notification set using of of the Creator#as[Type]((Type) -> Unit) scoped functions.
7 Actions Set using the Creator#actions((ArrayList<Action>) -> Unit) scoped function.

CONTRIBUTING

There are many ways to contribute, you can

  • submit bugs,
  • help track issues,
  • review code changes.

About

Simplified notification delivery for Android.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%