quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time
https://quasar.dev
MIT License
25.96k stars 3.52k forks source link

Export file helper not work on Android #13538

Open kolliss opened 2 years ago

kolliss commented 2 years ago

What happened?

Calling exportFile helper always return true, but do nothing on Android devices. There is no problem, if I try to do this in SPA mode.

const sampleExport = () => {
  const status = exportFile('sampleexport.txt', 'some content')
  if (status == true) {
    $q.notify('Export status: True')
  } else {
    $q.notify(`Export status: ${status.message}`)
  }
}

What did you expect to happen?

I would expect that the following is a helper trigger the browser and start downloading a file with the specified content. Or at least return proper error message, if for some reasons export not possible.

Reproduction URL

No url _

How to reproduce?

Just call this sample function on Android device (capacitor mode).

const sampleExport = () => {
  const status = exportFile('sampleexport.txt', 'some content')
  if (status == true) {
    $q.notify('Export status: True')
  } else {
    $q.notify(`Export status: ${status.message}`)
  }
}

Flavour

Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)

Areas

Capacitor Mode

Platforms/Browsers

Android

Quasar info output

Operating System - Windows_NT(10.0.19043) - win32/x64
NodeJs - 14.19.0

Global packages
  NPM - 6.14.16
  yarn - 1.22.1
  @quasar/cli - 1.2.2
  @quasar/icongenie - Not installed
  cordova - 11.0.0

Important local packages
  quasar - 2.5.5 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app - 3.3.3 -- Quasar Framework local CLI
  @quasar/extras - 1.12.5 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.2.31 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.0.12
  vuex - Not installed
  electron - Not installed
  electron-packager - Not installed
  electron-builder - Not installed 
  @babel/core - 7.17.5 -- Babel compiler core.
  webpack - 5.69.1 -- Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
  webpack-dev-server - 4.7.4 -- Serves a webpack app. Updates the browser on changes.
  workbox-webpack-plugin - Not installed
  register-service-worker - 1.7.2 -- Script for registering service worker, with hooks       
  typescript - 4.5.5 -- TypeScript is a language for application scale JavaScript development
  @capacitor/core - 3.4.1 -- Capacitor: Cross-platform apps with JavaScript and the web      
  @capacitor/cli - 3.4.1 -- Capacitor: Cross-platform apps with JavaScript and the web       
  @capacitor/android - 3.4.1 -- Capacitor: Cross-platform apps with JavaScript and the web   
  @capacitor/ios - Not installed

Quasar App Extensions
  @quasar/quasar-app-extension-apollo - 2.0.0-beta.3 -- A Quasar app extension to add GraphQL support using Apollo Client.

Relevant log output

No response

Additional context

No response

github-actions[bot] commented 2 years ago

Hi @kolliss! 👋

It looks like you provided an invalid or unsupported reproduction URL. Do not use any service other than Codepen, jsFiddle, Codesandbox, and GitHub. Make sure the URL you provided is correct and reachable. You can test it by visiting it in a private tab, another device, etc. Please edit your original post above and provide a valid reproduction URL as explained.

Without a proper reproduction, your issue will have to get closed.

Thank you for your collaboration. 👏

pdanpdan commented 2 years ago

I think you need a plugin in capacitor https://github.com/ionic-team/capacitor/issues/2331