Cordova plugin android wifi manager



  • 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?



  • @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 ()



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



  • @Sifarid

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


Log in to reply