No Internet On Kindle Fire

Hi,

On the Kindle Fire, I use the following code to check if the user has Internet Access:

[lua]

if require(“socket”).connect(“google.com”, 80) == nil then

      print(“Game: No internet, goto gameover”)

      storyboard.gotoScene( “gameover”, “fade”, 400  )

else

      print(“Game: We have internet, goto createPlayer”)

      storyboard.gotoScene( “createPlayer”, “fade”, 400  )

end

[/lua]

The Kindle Fire has internet access, but never detects it this way.

I changed my build settings and added “android.permission.INTERNET”, but same result.

Any idea what I’m doing wrong here?

I’m having a similar issue. I have an application that uses Lua sockets written in Corona. It works perfectly fine when built with Corona build 2012.840, but exactly the same code without any modification but built with Corona build 2013.1076 

I didn’t have to add the explicit permissions to the build.settings file before. But, even after adding them, the app sockets do not work.

Did you find any solution to your problem? I’m pretty much dead in the water without sockets. Any help would be much appreciated.

I have tried all 2013 Corona builds and Lua sockets do not work. The last build that works as expected is 2012.971  Anyone from Corona Labs in this forum that could provide any insights?

Does your code work in the simulator and just not on the Kindle Fire?

Yeah, it works perfectly fine in the simulator. But only builds on 2012.* work as well on the actual device, not the ones with 2013.*  I’m trying to isolate a minimal app that replicates the issue. 

Ok, I found the problem. My build.settings had a key named android.use r Permissions not android.use s Permissions - hard-to-spot typo, an r for an s, and the network just stopped working.

The observation here is that prior to 2013.* builds of Corona, applications would always request the following permissions by default upon installation, even if there was no explicit android.usesPermissions key in the build.settings file:

Network communication (full Internet access)

Kindle calls (read Kindle state and identity)

I did notice something subtly off when installing apps on my Kindle Fire built with 2013.* builds of Corona, but I just didn’t register right away: Applications stopped asking for the two permissions above by default. Therefore, socket programming didn’t work unexpectedly. I realize now that the Corona documentation for socket module explicitly says to request internet access via the android.usesPermissions. However, the fact that it worked without it in older builds made it a bit difficult to troubleshoot.

Good catch

I’m having a similar issue. I have an application that uses Lua sockets written in Corona. It works perfectly fine when built with Corona build 2012.840, but exactly the same code without any modification but built with Corona build 2013.1076 

I didn’t have to add the explicit permissions to the build.settings file before. But, even after adding them, the app sockets do not work.

Did you find any solution to your problem? I’m pretty much dead in the water without sockets. Any help would be much appreciated.

I have tried all 2013 Corona builds and Lua sockets do not work. The last build that works as expected is 2012.971  Anyone from Corona Labs in this forum that could provide any insights?

Does your code work in the simulator and just not on the Kindle Fire?

Yeah, it works perfectly fine in the simulator. But only builds on 2012.* work as well on the actual device, not the ones with 2013.*  I’m trying to isolate a minimal app that replicates the issue. 

Ok, I found the problem. My build.settings had a key named android.use r Permissions not android.use s Permissions - hard-to-spot typo, an r for an s, and the network just stopped working.

The observation here is that prior to 2013.* builds of Corona, applications would always request the following permissions by default upon installation, even if there was no explicit android.usesPermissions key in the build.settings file:

Network communication (full Internet access)

Kindle calls (read Kindle state and identity)

I did notice something subtly off when installing apps on my Kindle Fire built with 2013.* builds of Corona, but I just didn’t register right away: Applications stopped asking for the two permissions above by default. Therefore, socket programming didn’t work unexpectedly. I realize now that the Corona documentation for socket module explicitly says to request internet access via the android.usesPermissions. However, the fact that it worked without it in older builds made it a bit difficult to troubleshoot.

Good catch