Registeruser: Android Permission Error

Hi guys,

I try to register a new user on Corona Cloud with the Kindle Fire, but all I get is:

java.lang.SecurityException: Neither user 10043 nor current process has android.permission.INTERNET

My build.settings look like this:

[lua]

settings = {

    orientation =

    {

        default = “portraitRight”,

        supported = { “portraitLeft”, “portraitRight”}

    },

    android =

    {

        plist=

        {

        usesPermissions =

        {

            “android.permission.INTERNET”,

            “android.permission.ACCESS_WIFI_STATE”,

        },        

            UIPrerenderedIcon = true,

            UIStatusBarHidden = true,

            UIApplicationExitsOnSuspend = false,

                    CFBundleIconFile = “Icon.png”,

                    CFBundleIconFiles = 

            {

                        “Icon.png” ,

                        “Icon@2x.png” ,

                        “Icon-72.png”       

                    },

        },

    },

}

[/lua]

The Runtime error happens in corona-cloud-core.lua, after:

Post Request: https://api.coronalabs.com/users.json

Any idea?

Hi there,

It looks like your build.settings file isn’t structured properly.  You have plist as a child of android, but it should be a child of iphone.  Try the following instead:

[lua]

settings = {

    orientation =

    {

        default = “portraitRight”,

        supported = { “portraitLeft”, “portraitRight”}

    },

    

    iphone = {

        plist= {

            UIPrerenderedIcon = true,

            UIStatusBarHidden = true,

            UIApplicationExitsOnSuspend = false,

            CFBundleIconFile = “Icon.png”,

            CFBundleIconFiles = 

                {

                    “Icon.png” ,

                    “Icon@2x.png”,

                    “Icon-72.png”       

                }

        }

    },

    android =

    {

        usesPermissions =

        {

            “android.permission.INTERNET”,

            “android.permission.ACCESS_WIFI_STATE”,

        }

    }

}

[/lua]

Hope this helps!

  • Andrew

Thanks Andrew, I will try that!

Hi there,

It looks like your build.settings file isn’t structured properly.  You have plist as a child of android, but it should be a child of iphone.  Try the following instead:

[lua]

settings = {

    orientation =

    {

        default = “portraitRight”,

        supported = { “portraitLeft”, “portraitRight”}

    },

    

    iphone = {

        plist= {

            UIPrerenderedIcon = true,

            UIStatusBarHidden = true,

            UIApplicationExitsOnSuspend = false,

            CFBundleIconFile = “Icon.png”,

            CFBundleIconFiles = 

                {

                    “Icon.png” ,

                    “Icon@2x.png”,

                    “Icon-72.png”       

                }

        }

    },

    android =

    {

        usesPermissions =

        {

            “android.permission.INTERNET”,

            “android.permission.ACCESS_WIFI_STATE”,

        }

    }

}

[/lua]

Hope this helps!

  • Andrew

Thanks Andrew, I will try that!