android - no internet?

According the to 2.0BetaGuide.pdf that came with beta5:

However, the following items are not yet implemented for Android:
• Orientation events • Camera • Network • Multiline text fields • Text input with keyboard • Webpopups

1. Regarding "Network": Does this mean I cannot download images/data from an internet source - for instance if I wanted to create an RSS reader?

2. "Multiline text fields" - does this include the native.newTextBox as described in the API?

I don't develop for Android but here is my understanding of the limitations.

1. I believe the internal LuaSocket library can be used to access the internet.

2. The "native." functions are only for the iPhone/iPad and not for Android. This includes keyboard, webpopups and TextBox.

Tom

From reading the Beta 5 docs it looks like Android may not support network/internet access. Can someone confirm that?

Tom

That would explain why the image download sample application doesn't work on my Droid, but if that is the case then it severly limits the usefulness of creating anything in corona.

The relatively completely list of what is not implemented in Android is in the beta guide:

http://developer.anscamobile.com/demo/2.0BetaGuide.pdf

Network support is indeed not yet implemented. It's difficult because Android doesn't support much in their NDK. We're considering implementing separate http functionality for this (and to allow non-blocking wait on network).

Thanks for the info Eric. When do you think a decision would be made regarding implementation of http functionality? Seems like this would be a key component of a majority of mobile apps; along with a more robust text engine (i.e. multiline textfields, and formatting options). I work at an internet media company, so every app/game I create would require http functionality at a minimum.

The highest priority items for Android are:

- Critical bugs
- Native text
- Webpopup
- Network
- Performance

... not necessarily in that order. These will definitely be implemented, as soon as possible.

Please note that Corona SDK beta 6 adds luasocket support.

My socket app works fine in the droid simulator.

Non internet apps I build work find on my DroidX.

My socket app does not state that it will be using the internet when installed - in fact it just says:

Allow this application to:
- Hardware controls
control vibrator

If it was able to access the internet it would ask about that as well.

Where can I get this "beta 6"?

Sigh... I see we are way past beta 6. I have Version 2.0.0 (2010.9.16.148)

Hi,

you have to activate the internet access inside your build.settings file.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-- build.settings
 
settings =
{
    android =
    {
         versionCode = "1"
    },
    
    androidPermissions =
    {
         "android.permission.ACCESS_FINE_LOCATION",
         "android.permission.INTERNET",
         "android.permission.SET_ORIENTATION"
    },
    orientation =
        {
                 default = "portrait", 
                 content = "portrait",
                 supported = 
                 { 
                 "portrait", "portraitUpsideDown", 
                 }, 
        },
}

Thanks Mike - that solved my problem and was nice to wake up to a solution!

It would likely be helpful to new users to make this more clear in the getting started or online reference / online docs.

I had to create a build.settings file as there wasn't one for Hello World and other apps I built or studied. I found the one in the Network sample tho and used that.

No problem. I nice that my suggestion was helping you.

@secure411dotorg, I updated the documentation with the build.settings information. Sorry for the confusion. And thanks Mike, for helping out.

http://developer.anscamobile.com/content/network#Enabling_network_access_on_Android

Tim

views:1734 update:2011/10/9 9:57:41
corona forums © 2003-2011