Coder Social home page Coder Social logo

setapp-io / setapp-android-sdk Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 180 KB

Setapp is an android SDK that lets you change the behavior and appearance of your app without requiring a rebuilt app.

Home Page: https://setapp.io

License: Apache License 2.0

Kotlin 98.21% Shell 1.79%
android kotlin android-sdk kotlin-library android-library android-development settings settings-management setapp setapp-sdk

setapp-android-sdk's Introduction

setapp

Maven Central Build

Setapp is an android application that lets you change the behavior and appearance of your app without requiring a rebuilt app. When using the setapp client library, you call settings with in-app default values that control the behavior and appearance of your app. Then, you can later use the setapp application to override in-app default values for the app. See the project website for documentation.

setapp demo

To set up setapp SDK for Android, you need to add the necessary dependencies to your app.

Dependencies

Setapp is distributed through mavenCentral. To use it, you need to add the following to your project's root build.gradle file

repositories {
    mavenCentral()
}

Add the following to your project's build.gradle file

dependencies {
    debugImplementation "io.setapp:setapp:${setapp_version}"
    releaseImplementation "io.setapp:setapp-noop:${setapp_version}"
}

Please note that our io.setapp:setapp-noop package provides empty implementations.

Usage

For getting value from setapp application just cal one of the following methods.

Get int value

val value: Int = Settings.getInt("YOUR_KEY_HERE", -1)
val value: Int? = Settings.getIntOrNull("YOUR_KEY_HERE")

Get long value

val value: Long = Settings.getLong("YOUR_KEY_HERE", -1L)
val value: Long? = Settings.getLongOrNull("YOUR_KEY_HERE")

Get float value

val value: Float = Settings.getFloat("YOUR_KEY_HERE", -1F)
val value: Float? = Settings.getFloatOrNull("YOUR_KEY_HERE")

Get string value

val value: String = Settings.getString("YOUR_KEY_HERE", "")
val value: String? = Settings.getStringOrNull("YOUR_KEY_HERE")

Get boolean value

val value: Boolean = Settings.getBoolean("YOUR_KEY_HERE", false)
val value: Boolean? = Settings.getBooleanOrNull("YOUR_KEY_HERE")

setapp-android-sdk's People

Contributors

hakob91 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.