Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

WiFi Manager - some example more?
Started by inforaudio Oct 12 2017 03:32 AM

42 replies to this topic
[TOPIC CONTROLS]
Page 1 of 2 1 2
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

inforaudio

[GLOBAL: userInfoPane.html]
inforaudio
  • Enthusiast

  • 30 posts
  • Corona SDK

Hello:

 

We buy the plugin of Wifi Manager few days ago.

Sometimes have more documentation and same examples more?

unique and actual sample dont run properly

we need more documentation.

 

Thanks.



[TOPIC: post.html]
#2

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,795 posts
  • Enterprise

I responded to your email. Could you explain a little more?

Here is the link to documentation
https://scotth.tech/plugin-wifiManager

[TOPIC: post.html]
#3

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,795 posts
  • Enterprise

I just notice I screwed up build settings on documentation, will fix this

You can find a working sample here
https://github.com/scottrules44/wifiManager-demo

[TOPIC: post.html]
#4

inforaudio

[GLOBAL: userInfoPane.html]
inforaudio
  • Enthusiast

  • 30 posts
  • Corona SDK

 
 
A Question, how can i try to connect a WIfi without Intenet Conection.??
 
If connect with android Wifi utility ,, the smartphone ask about this wifi  dont have internet conection.  connect in any way ???
 
If try to connect with wifi manager pluging , the smartphone connect ,, show Wifi connect to this network,, but there are comunication...
 
How can i solved it??
 
Thanks advance


[TOPIC: post.html]
#5

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,795 posts
  • Enterprise

 

 
 
A Question, how can i try to connect a WIfi without Intenet Conection.??
 
If connect with android Wifi utility ,, the smartphone ask about this wifi  dont have internet conection.  connect in any way ???
 
If try to connect with wifi manager pluging , the smartphone connect ,, show Wifi connect to this network,, but there are comunication...
 
How can i solved it??
 
Thanks advance

 

Are you asking if you can check for an internet connection? The wifi manager cannot check if there is an internet connection, only if wifi is turned on and get the current network. Having an internet connection is very hard to determine. You can do this corona without a plugin. The more info plugin will check if you can talk to google.com using the native api on Android and iOS. 

 

Corona search

https://forums.coronalabs.com/topic/27940-best-method-for-detecting-an-internet-connection/

 

Get more info

https://marketplace.coronalabs.com/plugin/more-info



[TOPIC: post.html]
#6

inforaudio

[GLOBAL: userInfoPane.html]
inforaudio
  • Enthusiast

  • 30 posts
  • Corona SDK

Not, i explain bad.

 

My Question is:

 

When connect by smartphone to a wifi without internet conecction, the smartphone ask, about if you can keep the conection with this wifi, else the smartphone dont connect with this wifi. 

If dont check Yes, the smartphone is connect to this wifi but dont transfer data.

If i check yes, the connection active and run all properly.

 

With Wifi Manager pluging can connect to WIFI, but if dont have internet, connect but dont transfer data.

How can solved it..

 

I add a image with the problem.. Is when try to connect a red wifi without internet..



[TOPIC: post.html]
#7

inforaudio

[GLOBAL: userInfoPane.html]
inforaudio
  • Enthusiast

  • 30 posts
  • Corona SDK

images, i forget in the last post

Attached Files



[TOPIC: post.html]
#8

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,795 posts
  • Enterprise

I still cannot really understand the question that well. I have read you posted 4 times in my head and 2 times out loud. I make some guesses on what you are trying to say but it may not be exactly what you asking. I am guessing you are using an auto translate tool which can not only mess up your words but mine too.

[TOPIC: post.html]
#9

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,795 posts
  • Enterprise

After reading it a couple more times, it still sounds like you want to check if a WiFi connection actually has internet. You should see me previous post on how to do that if that is what you are asking.

[TOPIC: post.html]
#10

inforaudio

[GLOBAL: userInfoPane.html]
inforaudio
  • Enthusiast

  • 30 posts
  • Corona SDK

I explain again.

 

Case 1.  We go to connect to a WIFI network without access to Internet.  (i know that dont have internet access, but the wifi is activated)

 

If we try to connect with android system wifi. Android  tell me that there are not Internet access, and show a message that "there are not internet access, do you want to keep connect to the WIFI network".

 

The conecction is enabled but dont transfer data.  When accept "keep connect to the WIFI network".
We can transfer data to the wifi (ping, internal web server etc..).

If we dont check YES or dont answer, is connect to the WIFI but data dont transfer, and cant made a ping and dont received data of web server..

Case 2. When connect with you pluging (Wifi Manager). Connect with WIFI network, but cant transfer data.
Is similar that we dont check YES or dont made nothing  in CASE 1.

We connect but can´t  transfer data.

 



[TOPIC: post.html]
#11

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,795 posts
  • Enterprise

What kind of wifi are you trying to connect to?



[TOPIC: post.html]
#12

inforaudio

[GLOBAL: userInfoPane.html]
inforaudio
  • Enthusiast

  • 30 posts
  • Corona SDK

IOT 

one device that generate a AP. 

 

with APP Android we send the data of connection (user, pass) to this device, for connect to Wifi of home.

 

When this device receive this data (user, pass), connect to WIFI HOME.

 

 

Then at first time this device dont have internet connection.

 

 



[TOPIC: post.html]
#13

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,795 posts
  • Enterprise

what type of WiFi authencation does your network use( Wep, Wpa)?

[TOPIC: post.html]
#14

inforaudio

[GLOBAL: userInfoPane.html]
inforaudio
  • Enthusiast

  • 30 posts
  • Corona SDK

WPA2-Personal



[TOPIC: post.html]
#15

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,795 posts
  • Enterprise

That pop up you are getting is not generated by the os but by the web browser. The pop up is nothing but a warning.



[TOPIC: post.html]
#16

inforaudio

[GLOBAL: userInfoPane.html]
inforaudio
  • Enthusiast

  • 30 posts
  • Corona SDK

I check again , and the pop up is no only a Warning.

 

We connect again to a WIFI network without internet conection. This Time we never open the browser, instead it, we use a app for made a ping.

 

Try to made the ping, without check yes in keep the conexion and there are not transfer data.

See the image. please

Attached Files



[TOPIC: post.html]
#17

inforaudio

[GLOBAL: userInfoPane.html]
inforaudio
  • Enthusiast

  • 30 posts
  • Corona SDK

if check YES and test again..

The transfer of data is correct..

 

 

Attached Files



[TOPIC: post.html]
#18

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,795 posts
  • Enterprise

Have you tried performing a network request after connecting to network over wifi via my plugin? I looked at the api and cannot find a pop up api. 



[TOPIC: post.html]
#19

inforaudio

[GLOBAL: userInfoPane.html]
inforaudio
  • Enthusiast

  • 30 posts
  • Corona SDK

We try again.

 

When use you plugin, we can connect to all wifi with Internet, without problem. The connection OK and transfer data OK.

 

But if we try to connect to wifi without internet conection,  the conection is ok,  but cant transfer data.

 

So, We try with other smartphone with other version of Android 5.01, 7.01 etc..

 

Android 4.2.1 dont ask about the conexion when connect to a wifi without internet conexion..Connect and transfer data perfect.



[TOPIC: post.html]
#20

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,795 posts
  • Enterprise

Ok, I added new api. It may help. 

wifiManager.ping()

I am hoping it will trigger the pop-up.



[TOPIC: post.html]
#21

inforaudio

[GLOBAL: userInfoPane.html]
inforaudio
  • Enthusiast

  • 30 posts
  • Corona SDK

thanks so. How i manage it?

 

like:  if (wifiManager.ping  == true) 

if (wifiManager.ping (192.168.4.1)???

 

The pop up show 2 - 3 second after connect to the wifi networks, try to connect or not.

 

I looking for information and only succes in Android 6 and 7, and some version of 5..  There are other version of Android that dont show it..



[TOPIC: post.html]
#22

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,795 posts
  • Enterprise

I don't know about versions less then 5.0, I don't have device less than that. If should be

if (wifiManager.ping()  == true) then

It should check wifi. I am not familiar with that popup. I am an iOS user.



[TOPIC: post.html]
#23

RedBeach

[GLOBAL: userInfoPane.html]
RedBeach
  • Corona Geek

  • 1,132 posts
  • Corona SDK

@inforaudio, I am pretty sure that popup you see is custom made (by the android system or the developer).

 

So, if you are inside your app and you connect to a wifi that does not have internet connection, it is up to you to show a popup for the user.

 

If the Yes/No button of the popup is making any difference if you can reach another device in the network, that is probably being managed by the app itself.  If you have your own app and you connect to a wifi, you should be able to connect to other devices on that network regardless the internet connections status.


  • Scott Harrison likes this

[TOPIC: post.html]
#24

inforaudio

[GLOBAL: userInfoPane.html]
inforaudio
  • Enthusiast

  • 30 posts
  • Corona SDK

of course that the message is generate by Android system.

We try in other smartphones with Android 7.0 and in all system ask about the connect to the network or not . when there are not internet conection. And there are not data transfer , to pulse yes.

How can generate this message with Corona sdk? Really how can confirm it?

 

About the new function of wifimanager (ping) only confirm is there are transfer data or not. But dont solved the problem of message and connection.

The bigger problem is that the message dont show is connect with wifimanager plugin. Then there are not data tranfer



[TOPIC: post.html]
#25

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,795 posts
  • Enterprise

There is a network library to test connections

https://docs.coronalabs.com/api/library/network/index.html


[topic_controls]
Page 1 of 2 1 2
 
[/topic_controls]