- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Olá gente, boa tarde.
Estou fazendo meu APP e queria fazer uma verificação para ver se o usuário está conectado ao Wireless...
Não tenho nem ideia de como fazer isso, podem me ajudar?
Obrigada!
- Tags:
- HTML5
- Intel® XDK
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Você pode fazer assim:
var estadoInternet = navigator.connection.type; switch(estadoInternet) { case "none": (... alguma coisa...) case "unknown": (... alguma coisa...) case "wifi": (... alguma coisa...) case "ethernet": return true; default: (... alguma coisa...)
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recommend using the Connection (Network Information) Apache Cordova* plugin. This plugin allows you to get information about the connection type as well as whether there is an active connection as well. You can add and select this plugin to your project under the Projects Panel > Cordova Hybrid Mobile App Settings > Included Plugins > Standard Cordova Plugins > Connection.
For more information about the plugin, visit https://github.com/apache/cordova-plugin-network-information,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks guys!

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page