Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 8 open apk file cannot show installed successfully page. #260

Closed
abcfy2 opened this issue Jun 1, 2019 · 2 comments · Fixed by #261
Closed

Android 8 open apk file cannot show installed successfully page. #260

abcfy2 opened this issue Jun 1, 2019 · 2 comments · Fixed by #261

Comments

@abcfy2
Copy link
Contributor

abcfy2 commented Jun 1, 2019

Expected Behaviour

After using file opener2 to open a apk file to upgrade self, should see apk installed successfully page.

Actual Behaviour

When I click install button, it crashed.

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

Android 8.0+

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Any

Cordova CLI info

cordova info
[email protected] with:
  [email protected]
  [email protected]
  [email protected]
  [email protected]

Environment:
  OS: win32
  Node: v10.16.0
  npm: 6.9.0

Plugins:
  cordova-plugin-advanced-http
  cordova-plugin-android-permissions
  cordova-plugin-app-version
  cordova-plugin-appavailability
  cordova-plugin-device
  cordova-plugin-file
  cordova-plugin-file-opener2
  cordova-plugin-file-transfer
  cordova-plugin-inappbrowser
  cordova-plugin-ionic-keyboard
  cordova-plugin-ionic-webview
  cordova-plugin-qrscanner
  cordova-plugin-screen-orientation
  cordova-plugin-splashscreen
  cordova-plugin-statusbar
  cordova-plugin-whitelist
  es6-promise-plugin

Plugin version

cordova plugin version | grep cordova-plugin-file-opener2

Here is the output:

cordova-plugin-file-opener2 2.2.0 "File Opener2"

Sample Code that illustrates the problem

    async installApp(apk){
        this.fileOpener.open(apk, 'application/vnd.android.package-archive').then(() => {
        }).catch(async e => {
            this.toast.show('Upgrade failed', 'middle');
        });
    }
@abcfy2
Copy link
Contributor Author

abcfy2 commented Jun 1, 2019

Related issue: #245 (comment)

@abcfy2
Copy link
Contributor Author

abcfy2 commented Jun 1, 2019

And I find add Intent.FLAG_ACTIVITY_NEW_TASK to FileOpen2.java could solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant