lua - corona network.download() is not working on android -


i have function downloads weather xml feed , displays now, if can't connection loads in last report or blank 1 if it's first time downloading. part seems work fine, when has connection seems not want finish downloading it. works fine on ios on android brings loading sign.

this function

function display:doquery(zip, web)   display:loadxml() -- calls functions display previous or blank weather data   network.download(web .. zip, "get",                    networklistener,                    "weather.xml",                    system.temporarydirectory) end 

also have seen weather demo , tried , same thing seems happen seems.

the network listener

function networklistener(event)     if (event.iserror)       print("network error!")     else       loadxml()    end end 

so reloads the xml if , when gets them.

on android, must add following permission "build.settings" file.

 settings =    {    android =    {       usespermissions =       {          "android.permission.internet",       },     },   } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -