GithubHelp home page GithubHelp logo

jahirfiquitiva / kustomapi Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 2.0 4.08 MB

A slightly up-to-date fork from Frank Monza's Kustom API https://bitbucket.org/frankmonza/kustomapi/

Home Page: https://bitbucket.org/frankmonza/kustomapi/

Java 100.00%

kustomapi's Introduction

Kustom API

Kustom API is the core library to create Play Store Skin packages for Kustom the most advanced Android Wallpaper Engine!

Basic Usage

The best way is to start from the sample application available at: https://bitbucket.org/frankmonza/kustomskinsample

Manual Setup

If you want to integrate it manually into your project just add this to your build.gradle file:

dependencies {
    implementation 'org.bitbucket.frankmonza:kustomapi:+'
}

Then edit your Android Manifest and add the provider specifying what kind of data your are going to offer

<provider
     android:name="org.kustom.api.Provider"
     android:authorities="pick.your.favourite.provider.name"
     android:exported="true"
     >
     <intent-filter>
         <action android:name="org.kustom.provider.WALLPAPERS" />
     </intent-filter>
</provider>

Preset Info

If you need to add Preset Informations in your dashboard you can load easily using the Info Loader class, first add the preset library:

dependencies {
    implementation 'org.bitbucket.frankmonza:kustompreset:+'
}

Then, for example, if you need to get the info for a widget called "awezome.kwgt" stored in your asset folder it will be enought to do:

PresetInfoLoader.create(new AssetPresetFile("widgets/awezome.kwgt"))
    .load(context, new PresetInfoLoader.Callback() {
        @Override
        public void onInfoLoaded(PresetInfo info) {
            // Do something when data is loaded, for example set it to a recycle view holder, check PresetInfo class for more fields
            holder.setTitle(info.getTitle());
            holder.setAuthor(info.getAuthor());
        } 
    });

Image preview with Glide library

If you are using Glide library you can easily load Kustom previews by first including preset library along with Glide basic libs:

dependencies {
    implementation 'org.bitbucket.frankmonza:kustompreset:+'
    implementation 'com.github.bumptech.glide:glide:+'
    annotationProcessor 'com.github.bumptech.glide:compiler:+'
}

Then implement an empty class that extends AppGlideModule in your app anywhere, something like:

@GlideModule
public class MyAppGlideModule extends AppGlideModule {
}

Finally use Glide to load the previews, for example:

Glide.with(context)
    .asBitmap()
    .load(new PresetFile("widgets/awezome.kwgt")
    .into(R.id.myimageview);

kustomapi's People

Contributors

frmz avatar jahirfiquitiva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

offbyamile debz-g

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.