Hi, I am attempting to run the hello world app on an Android. I get an error message pubnub.lua:583:
java.lang.SecurityException:
Neither user 100018 nor current process has android.permission.INTERNET.
I am including my build.config and the Helloworld App code below. The app works fine until I begin using my pubnub keys.
Here is the Helloworld App Code.
require “pubnub”
multiplayer = pubnub.new({
publish_key = “my_publish_key”,
subscribe_key = “my_subscribe_key”,
secret_key = nil,
ssl = nil,
origin = “pubsub.pubnub.com”
})
multiplayer:subscribe({
channel = “hello-world-corona”,
callback = function(message)
print(message.msgtext)
end,
errorback = function()
print(“Oh no!!! Dropped 3G Conection!”)
end
})
function send_a_message(text)
multiplayer:publish({
channel = “hello-world-corona”,
message = { msgtext = text }
})
end
function send_hello_world()
send_a_message(“Hello World!!!”)
end
timer.performWithDelay( 500, send_hello_world, 10 )
send_hello_world()
Here is my build.config:
build.settings:
settings =
{
android =
{
usesPermissions = {
“android.permission.INTERNET”,
“android.permission.WRITE_EXTERNAL_STORAGE”,
“android.permission.ACCESS_NETWORK_STATE”,
“android.permission.ACCESS_FINE_LOCATION”,
“android.permission.ACCESS_COARSE_LOCATION”,
“android.permission.READ_PHONE_STATE”,
},
usesFeatures =
{
{ name = “android.hardware.camera”, required = false },
{ name = “android.hardware.location”, required = true },
{ name = “android.hardware.location.gps”, required = true },
},
},
}