Giter VIP home page Giter VIP logo

simpleinstaller's People

Contributors

solrudev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

twinscodeinc

simpleinstaller's Issues

installSplitPackage problems

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))
    }
}


1st install works fine, subsequent installs fail

Installer.zip

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.

Sample App

Can you please attach installable apk file of sample app here?

Failed install MIUI

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"

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.