Slack Webhook Util For Android

Overview

Slack Webhook Util For Android

Build status License: Apache 2.0 License: maven-central

AboutSetupHow to useLicense

About

"Slack Webhook Util" 은 안드로이드에서 Webhook을 쉽게 보내기 위한 라이브러리 입니다.

  • Builder 패턴으로 제공

    • Builder 패턴을 사용해서 원하는 형식의 메시지를 보낼 수 있습니다.
  • 간단한 사용

    • Builder 패턴을 사용해서 메시지 객체를 생성 후 send(Context) 만 호출하면 네트워크가 통신이 될때 보내집니다!

Setup

Before Setting

  1. Slack에 "incoming-webhook" app을 설치합니다.
  2. 웹 후크 URL이 생성이 됩니다. ex) https://hooks.slack.com/services/12345/6789
  3. https://hooks.slack.com/ 뒤에 services/12345/6789 를 복사 합니다. 해당 path를 통해서 Webhook을 보내게 됩니다.

Gradle

License: maven-central
dependencies {
    implementation 'io.github.yunjaena:slackwebhookandroid:x.y.z'
    // x.y.z => Recent Release
}

Android Manifest

  • AndroidManifest.xml 에 meta data로 위에 복사한 path를 복사해주세요.
">
<meta-data
          android:name="slack_webhook_path"
          android:value="services/12345/6789"
/>

How To Use

Simple Example

  • Builder를 사용하여서 보내고 싶은 내용을 세팅하고 send(context)를 통해서 메시지를 보낼 수 있습니다.
SlackWebHook.builder()
             .pretext("hello")
             .title("this is webhook")
             .text("test")
             .color("#FF0000")
             .timeStampEnabled(true)
             .fields("name" to "jason", "github" to "https://github.com/yunjaena")
             .build()
             .send(this)

1.png

Function

  • pretext(pretext: String)
  • fallback(fallback: String)
  • title(title: String)
  • text(text: String)
  • authorName(authorName: String)
  • authorLink(authorLink: String)
  • authorIcon(authorIcon: String)
  • fields(vararg fields: Pair)
  • color(color: String)
  • imageUrl(imageUrl: String)
  • thumbUrl(thumbUrl: String)
  • footer(footer: String)
  • footerIcon(footerIcon: String)
  • timeStampEnabled(isTimeStampEnable: Boolean)
  • send(context: Context)

License

Copyright 2021 yunjaena

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You might also like...
✔️ Secure, simple key-value storage for Android
✔️ Secure, simple key-value storage for Android

Hawk 2.0 Secure, simple key-value storage for android Important Note This version has no backward compatibility with Hawk 1+ versions. If you still wa

A robust native library loader for Android.
A robust native library loader for Android.

ReLinker A robust native library loader for Android. More information can be found in our blog post Min SDK: 9 JavaDoc Overview The Android PackageMan

A lightning fast, transactional, file-based FIFO for Android and Java.

Tape by Square, Inc. Tape is a collection of queue-related classes for Android and Java. QueueFile is a lightning-fast, transactional, file-based FIFO

Joda-Time library with Android specialization

joda-time-android This library is a version of Joda-Time built with Android in mind. Why Joda-Time? Android has built-in date and time handling - why

a SharedPreferences replacement for Android with multiprocess support
a SharedPreferences replacement for Android with multiprocess support

DEPRECATED - no longer actively maintained Tray - a SharedPreferences replacement for Android If you have read the documentation of the SharedPreferen

OpenKeychain is an OpenPGP implementation for Android.
OpenKeychain is an OpenPGP implementation for Android.

OpenKeychain (for Android) OpenKeychain is an OpenPGP implementation for Android. For a more detailed description and installation instructions go to

UPnP/DLNA library for Java and Android

Cling EOL: This project is no longer actively maintained, code may be outdated. If you are interested in maintaining and developing this project, comm

WebSocket & WAMP in Java for Android and Java 8

Autobahn|Java Client library providing WAMP on Java 8 (Netty) and Android, plus (secure) WebSocket for Android. Autobahn|Java is a subproject of the A

:iphone: [Android Library] Get device information in a super easy way.
:iphone: [Android Library] Get device information in a super easy way.

EasyDeviceInfo Android library to get device information in a super easy way. The library is built for simplicity and approachability. It not only eli

Releases(v0.0.3)
Owner
Yunjae-Na
코인 - 한기대 커뮤니티 Android Developer
Yunjae-Na
A util for setting status bar style on Android App.

StatusBarUtil A util for setting status bar style on Android App. It can work above API 19(KitKat 4.4). 中文版点我 Sample Download StatusBarUtil-Demo Chang

Jaeger 8.8k Jan 6, 2023
Android Shared preference wrapper than encrypts the values of Shared Preferences. It's not bullet proof security but rather a quick win for incrementally making your android app more secure.

Secure-preferences - Deprecated Please use EncryptedSharedPreferences from androidx.security in preferenced to secure-preference. (There are no active

Scott Alexander-Bown 1.5k Dec 24, 2022
Android library which makes it easy to handle the different obstacles while calling an API (Web Service) in Android App.

API Calling Flow API Calling Flow is a Android library which can help you to simplify handling different conditions while calling an API (Web Service)

Rohit Surwase 19 Nov 9, 2021
Gesture detector framework for multitouch handling on Android, based on Android's ScaleGestureDetector

Android Gesture Detectors Framework Introduction Since I was amazed Android has a ScaleGestureDetector since API level 8 but (still) no such thing as

null 1.1k Nov 30, 2022
Use Android as Rubber Ducky against another Android device

Use Android as Rubber Ducky against another Android device

null 1.4k Jan 9, 2023
Android Utilities Library build in kotlin Provide user 100 of pre defined method to create advanced native android app.

Android Utilities Library build in kotlin Provide user 100 of pre defined method to create advanced native android app.

Shahid Iqbal 4 Nov 29, 2022
A logger with a small, extensible API which provides utility on top of Android's normal Log class.

This is a logger with a small, extensible API which provides utility on top of Android's normal Log class. I copy this class into all the little apps

Jake Wharton 9.8k Dec 30, 2022
Java implementation of a Disk-based LRU cache which specifically targets Android compatibility.

Disk LRU Cache A cache that uses a bounded amount of space on a filesystem. Each cache entry has a string key and a fixed number of values. Each key m

Jake Wharton 5.7k Dec 31, 2022
a simple cache for android and java

ASimpleCache ASimpleCache 是一个为android制定的 轻量级的 开源缓存框架。轻量到只有一个java文件(由十几个类精简而来)。 1、它可以缓存什么东西? 普通的字符串、JsonObject、JsonArray、Bitmap、Drawable、序列化的java对象,和 b

Michael Yang 3.7k Dec 14, 2022
gRPC and protocol buffers for Android, Kotlin, and Java.

Wire “A man got to have a code!” - Omar Little See the project website for documentation and APIs. As our teams and programs grow, the variety and vol

Square 3.9k Dec 31, 2022