No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    navigator.app.exitApp(); is not working in cordova app (Android, Vue, Quasar Framework)

    Help
    3
    5
    6424
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sangchoel last edited by sangchoel

      hello.
      I tried exiting app on my android app. but, it’s not working.
      I am using quasarframework, vue2 and javascript.

      0_1518148244287_dialog.jpg

      ‘yes’ touch is not working.

      help me. thank you.

      • this is my code.

        methods: {
        onDeviceReady () {
        document.addEventListener(“backbutton”, this.onBackKey, false);
        },
        onBackKey() {
        Dialog.create({
        title: ‘Exit’,
        message: ‘exit?’,
        buttons: [
        {
        label: ‘No’,
        handler () {
        }
        },
        {
        label: ‘Yes’,
        handler: () => {
        this.onBackKeyResult();
        }
        }
        ]
        })
        },
        onBackKeyResult (buttonIndex) {
        if (buttonIndex == 1) {
        navigator.app.exitApp();
        }
        }
        },
        mounted: function() {
        document.addEventListener(“deviceready”, this.onDeviceReady, false);
        },

      1 Reply Last reply Reply Quote 0
      • eder.blinga
        eder.blinga last edited by

        window.navigator.app.exitApp();

        S 1 Reply Last reply Reply Quote 0
        • S
          sangchoel @eder.blinga last edited by

          @eder-blinga
          hello.

          I tried to use this code.
          Didn’t work.

          1 Reply Last reply Reply Quote 0
          • C
            cklinx last edited by

            I’m pretty sure you dont need “deviceready” with quasar. In fact quasar wait for the device ready automaticatly.
            Anyway look at this maybe you need install <plugin name="cordova-plugin-whitelist" source="npm" spec="1.1.0" />.

            S 1 Reply Last reply Reply Quote 0
            • S
              sangchoel @cklinx last edited by

              @cklinx

              solved problems.
              As you said, “deviceready” was not necessary in the quasar.

              thank you.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post