The Wayback Machine - https://web.archive.org/web/20250305094012/https://github.com/NativeScript/NativeScript/issues/7427
Skip to content

[Feature] The method openFile should remember the default app (if one is chosen) #7427

Open
@jokro

Description

Case:
In android i use
import {openFile} from "tns-core-modules/utils/utils"
openFile(path)
to open a *.pdf file from downloads folder. This works like charm with one problem.

Problem: a list of all apps which can open a pdf file is opened. If i select google pdf viewer, the file opens correctly. If I close and reopen, again I first have to select the google pdf viewer before the file opens. That is, it doesn't remember my choice.

If I open the same file with the android downloads app, I get an option to to always select google pdf viewer as the app to open this file. This works as intended. Trying openFile again after this option is set still opens the app list and does not open the file at once.
I tried also with other apps which were set as default app in the android settings. Also in that case openFile does not use the setting for the default app: in all cases you must select the app to use first. Only if there is only one app, then it opens at once.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions