Code Monkey home page Code Monkey logo

notify's Introduction

Notify

Notify

Simplified notification delivery for Android.

Kotlin RxJava Build Status Codecov GitHub (pre-)release

GETTING STARTED

Notify (pre-)releases are available via JitPack. It is recommended that a specific release version is selected when using the library in production as there may be breaking changes at anytime.

Tip: Test out the canary channel to try out features by using the latest develop snapshot; develop-SNAPSHOT.

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

// Module level build.gradle
dependencies {
    // Replace version with release version, e.g. 1.0.0-alpha, -SNAPSHOT
    implementation "io.karn:notify:[VERSION]"
}

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 NotifyCreator#asBuilder().

Tip: You can view other notification styles on the Notification Types docs page.

Tip: Advanced usage topics are documented here.

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 NotifyCreator#as[Type]((Type) -> Unit) scoped functions.
7 Actions Set using the NotifyCreator#actions((ArrayList<Action>) -> Unit) scoped function.

CONTRIBUTING

There are many ways to contribute, you can

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

notify's People

Contributors

karn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.