https://github.com/dhleong/staypuft
Save the world, one oversized APK at a time
https://github.com/dhleong/staypuft
android apk expansion library rxjava2
Last synced: 7 months ago
JSON representation
Save the world, one oversized APK at a time
- Host: GitHub
- URL: https://github.com/dhleong/staypuft
- Owner: dhleong
- Created: 2018-03-07T12:58:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-10T14:44:18.000Z (over 7 years ago)
- Last Synced: 2025-02-02T01:29:39.519Z (9 months ago)
- Topics: android, apk, expansion, library, rxjava2
- Language: Kotlin
- Size: 163 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# staypuft [][2] [](https://travis-ci.org/dhleong/staypuft)
*Save the world, one oversized APK at a time*
## What?
Staypuft is a simple, reactive interface to Google's [APK Expansion Files][1] service.
It looks like this:
```kotlin
val apkx = Staypuft.getInstance(activity).setConfig(
DownloadConfig(
salt = // your custom salt array
publicKey = "YOUR_PUBLIC_KEY base64",
notifier = DefaultNotifier.withChannelId("expansions")
)
)
```That's it! If you want to get status updates, just subscribe to them:
```kotlin
apkx.stateEvents.subscribe { event ->
when (event) {
is DownloadState.Ready -> {
// done!
println("Got main expansion file at: ${event.main}")
}
}
}
```## How?
Staypuft is distributed via [JitPack][2]. To use it, first add
the JitPack maven repo to your root build.gradle:```gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```Then add the dependency:
```gradle
dependencies {
compile 'com.github.dhleong:staypuft:'
}
```where `` is the latest version (shown in the badge at the
top of this page).Staypuft provides definitions for the services and permissions it needs,
so you shouldn't even need to modify your manifest. Simply copy and paste
the code above into an appropriate place, fill in the `salt` and
`publicKey` values, and you're good to go![1]: https://developer.android.com/google/play/expansion-files.html
[2]: https://jitpack.io/#dhleong/staypuft