Coder Social home page Coder Social logo

Comments (6)

tripflex avatar tripflex commented on August 28, 2024

Right now this is what I have to do to get this to work correctly, which seems kinda overkill:

    let ssid = "some-ssid";
    cordovaNetworkManager.getCurrentSSID( function( currentSSID ){

        console.log( 'GET CURRENT SSID', currentSSID );

        cordovaNetworkManager.androidConnectNetwork(ssid, currentSSID, function(s){
            console.log('Connected to device WiFi...', s );
        }, function(f){
            console.log( 'Failed to connect to ', ssid );
        });

    }, function( f ){

        console.log( 'FAILURE GET CURRENT SSID', f );

    });

But that only works when connected to existing network, if not connected to existing network, it's not even possible to connect ....

from cordova-network-manager.

tripflex avatar tripflex commented on August 28, 2024

Here's something i found on parent repo regarding wifi enabled:
hoerresb/WifiWizard#6

from cordova-network-manager.

arsenal942 avatar arsenal942 commented on August 28, 2024

Like I've said before, I made this particular part for my personal application/use. It probably wasn't the best for a global solution and therefore was an oversight on my behalf. I need to parse in a very specific network to disable/enable and it isn't always the current network that's connected.

That being said, for a global solution, it would be best to do what you have described above. I am going away next week for 3 weeks however I will look to implement these changes before I go.

from cordova-network-manager.

tripflex avatar tripflex commented on August 28, 2024

Yeah completely understandable, I think I may actually just fork the main WiFiManager plugin and update that one, unless you want me to just submit a PR to you?

from cordova-network-manager.

arsenal942 avatar arsenal942 commented on August 28, 2024

I do not mind you submitting a PR. Simply follow the PR template and I'll review it all accordingly. :D

If you want to become a contributor to this plugin, let me know. I will be rewriting the Android platform since the OG WifiWizard is a bit trash and therefore the code in this is trash as well.

Contact me on Discord and we can talk about it more: Nomm#0176

Also see the open issue: #8

from cordova-network-manager.

arsenal942 avatar arsenal942 commented on August 28, 2024

Fixed as of release v2.2.0.

You can now just give it an empty string or a null object and it will still work.

If you notice the issue again, just create a new issue referencing this.

from cordova-network-manager.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.