solrudev / simpleinstaller Goto Github PK
View Code? Open in Web Editor NEWEasy to use Android package installer wrapper leveraging Kotlin coroutines (API 16+). Newer alternative: https://github.com/solrudev/Ackpine
License: Apache License 2.0
Easy to use Android package installer wrapper leveraging Kotlin coroutines (API 16+). Newer alternative: https://github.com/solrudev/Ackpine
License: Apache License 2.0
I suspect this is more due to my inexperience with Kotlin with your code, but I've been able to get installPackage() to work, but not installSplitPackage(). I'm trying to take an array of File and convert them to an array of ApkSource, but even after I do that, I get a compiler error of: Type mismatch: inferred type is () -> Unit but SessionOptions was expected
(located before the brace on the installSplitPackage() call).
val arr = mutableListOf<File>()
for (packageApk in packageApks) {
val apkFile = FileUtils.getFile(packageApk)
arr.add(apkFile)
}
var apks : Array<File> = arr.toTypedArray()
var apkSourceArray : Array<ApkSource> = apks.toApkSourceArray()
val result = PackageInstaller.installSplitPackage(*apkSourceArray) {
notification {
icon = R.drawable.ic_installer
}
}
when (result) {
is InstallResult.Success -> Log.i(TAG, getString(R.string.installed_successfully))
is InstallResult.Failure -> {
Log.i(TAG, result.toString())
Log.i(TAG, getString(R.string.install_failed))
}
}
Apks xAPK Can I use it?
I've attached an app that uses the file picker to pick apks from the Download directory. It recreates a problem that I'm having, namely that the first time I run installPackage() it works fine, and then fails to finish when run again. I've tried with both ConfirmationStrategy.DEFERRED and ConfirmationStrategy.IMMEDIATE. I have used the simpleinstaller app and that works, so I would appreciate any insights as to why my code doesn't.
Can you please attach installable apk file of sample app here?
An error occurs when installing apk on Xiaomi devices. The installation process starts and after clicking "Install" an error occurs but there is no error description, the result returns "null"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.