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

    Cordova plugin android wifi manager

    Help
    android plugin
    3
    6
    302
    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
      Sifarid last edited by

      i try this code

      <template>
        <q-page class="column">
          <div class="col-1">a = {{a}}</div>
          <div class="col-1">b = {{b}}</div>
          <q-btn label="CLICK TO GET RESPOND" color="primary" @click="click()" />
        </q-page>
      </template>
      
      <script>
      export default {
        name: 'PageIndex',
        data () {
          return {
            a: '-',
            b: '-'
          }
        },
      
        methods: {
          click () {
            var WifiManager = window.cordova.plugins.WifiManager
      
            WifiManager.isWifiEnabled(function (err, info) {
              console.log(err, info)
              this.a = err
              this.b = info
            })
          }
        }
      }
      </script>
      

      after i build to android with command “quasar build -m android” and install to my android device, open app, and click button ‘click’, nothing happened on there.

      Could someone tell me How working with this plugin?

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @Sifarid last edited by

        @Sifarid said in Cordova plugin android wifi manager:

        WifiManager

        First make sure your code executes the click() function with a console.log(“Click function works”). I tell you this because your code will never reach the click funtion:

        use @click="myClickFuntion" with out the ()

        S 1 Reply Last reply Reply Quote 0
        • S
          Sifarid @dobbel last edited by

          @dobbel no difference when im using @click=“myClickFunction” or @click=“myClickFunction()”. Its still work in my pc.

          dobbel 1 Reply Last reply Reply Quote 0
          • dobbel
            dobbel @Sifarid last edited by

            @Sifarid

            So it works? That’s what you’re saying?

            S 1 Reply Last reply Reply Quote 0
            • S
              Sifarid @dobbel last edited by

              @dobbel yes. but plugin doesnt work.

              metalsadman 1 Reply Last reply Reply Quote 0
              • metalsadman
                metalsadman @Sifarid last edited by

                @Sifarid use arrow function on your call back =>.

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