Sunday, 29 November 2020

Censory Library



A small library which will convert censored words to * so that we can process string on frontend side 

There are many cases in Android app where the user enters some abusive content.
So what does admin needs to supervise all the posts and then publish to public feeds !

Isn't that a hectic work, So where the CENSORY used.

With censory, frontend dev can filter the Input string to a well suitable string.

HOW TO USE

Implementation

Add jitpack to your maven sources

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

Add Censory as a dependency to your build.gradle

dependencies {
    implementation 'com.github.KapilYadav-dev:Censory:1.0.4'
}

Usage

  1. Use with default list
  2. Use with custom list

Use with default list

String string ="Your string";
Censory censory = new Censory();
String output=censory.defaultCensor(string,context);

Use with custom list

String string ="Your string";
List words =Arrays.asList("head", "now");
Censory censory = new Censory();
String output=censory.customCensor(string,words);

view raw Readme.md hosted with ❤ by GitHub

post written by:

Related Posts