I want to invoke some limitations re loading images if 3G.
TIA
[import]uid: 6547 topic_id: 10030 reply_id: 310030[/import]
I want to invoke some limitations re loading images if 3G.
TIA
[import]uid: 6547 topic_id: 10030 reply_id: 310030[/import]
Well not direct solution but this could be lot more easier to accomplish…
Just ask user via pop up 
[import]uid: 48521 topic_id: 10030 reply_id: 36736[/import]
Thanks for the thought, but not sufficiently classy 
First comment the user would make is “how stupid” which of course would not reflect very well on the App itself.
I know in xcode you can tell, hopefully someday in Corona too.
In the meantime I guess I’ll add a user setting to use small, normal or no images.
Minor, but it’s the little things that make an App a great App.
Still hoping for a ‘behind the scenes’ method though…
[import]uid: 6547 topic_id: 10030 reply_id: 36742[/import]
Totally agree with you.
I too prefer ‘behind the scenes’ method whereever possible.
Just a thought again, why restrict user based on 3g or wifi. Why not let user decide there mode of “quality” irrespective of whichever way they decide to connect to internet.
Is due to loading speed or data usage?
Reason I am asking is because here in Singapore, I get 12GB of monthly usage data, more than sufficient for most of my mobile internet need. I get bit annoyed when app automatically restricts me from using it since I am on 3g. (hinting at Apple’s restriction on downloading app > 20mb in size)
[import]uid: 48521 topic_id: 10030 reply_id: 36744[/import]
Combination of performance and/or cost. Performance would probably only be an issue if network is less than 3g. I might be over-thinking this as each image is only 8k.
I would like to leave it up to the user, in an unobtrusive way.
I.e. If I can tell we’re on 3G I would use a popup to ask and whether to leave settings permanent (until turned off again in settings)
or I would add a ‘download image’ button instead of downloading automatically if not WiFi.
[import]uid: 6547 topic_id: 10030 reply_id: 36745[/import]
Looks like we have the ability now with
network.canDetectNetworkStatusChanges
Have only done some preliminary testing when initially loading the app.
It reports if cellular is available and also if wifi is available
It correctly reports Cellular as false if WiFi is true (available)
Looks like a winner.
[import]uid: 6547 topic_id: 10030 reply_id: 37034[/import]
Did some more testing and will now be using this as my network check when the App is first loaded:
[lua] ---- ADD NETWORK CONNECTIVITY CHECK —
function MyNetworkReachabilityListener(event)
print( “address”, event.address )
print( “isReachable”, event.isReachable )
print(“isConnectionRequired”, event.isConnectionRequired)
print(“isConnectionOnDemand”, event.isConnectionOnDemand)
print(“IsInteractionRequired”, event.isInteractionRequired)
print(“IsReachableViaCellular”, event.isReachableViaCellular)
print(“IsReachableViaWiFi”, event.isReachableViaWiFi)
n2 = “YES” – we assume that we’ll have a network
if event.isReachable == false then
n1 = “No Network Available.\nNetwork connection is required to continue.”
n2 = “NO”
elseif event.isReachableViaCellular then
n1 = “No WiFi available.\nDo you want to continue on the cellular network?”
end
if n1 ~= nil then
print(“n1=” … n1)
end
local function onComplete( event )
if “clicked” == event.action then
local i = event.index
if 1 == i then
if n2 == “NO” then
os.exit()
end
– Do nothing; dialog will simply dismiss
elseif 2 == i then
os.exit()
end
end
end
if n1 ~= nil then
if n2 == “NO” then
local alert = native.showAlert( “Network Check”, n1, { “EXIT” }, onComplete )
else
local alert = native.showAlert( “Network Check”, n1, { “YES”, “EXIT” }, onComplete )
end
end
end
if network.canDetectNetworkStatusChanges then
network.setStatusListener( “www.apple.com”, MyNetworkReachabilityListener )
else
print(“network reachability not supported on this platform”)
end[/lua]
Not sure if this belongs here, feel free to move if not 
Hopefully it’ll be of help to someone.
Feel free to improve/compact the code and post it back.
[import]uid: 6547 topic_id: 10030 reply_id: 37044[/import]
that’s the answer-- only for subscribers - that has not been rolled out
c [import]uid: 24 topic_id: 10030 reply_id: 37051[/import]
Oops. Didn’t have brain in gear when I posted. I was just so elated to have found the solution.
Maybe it’ll help to get some folks off the fence and become subscribers.
Keep up the good work Carlos, and crew. I know there are some beefs about your subscription model but this is a good example of the advantages of being a subscriber, I.e. daily builds, CoronaUI, etc.
I for one appreciate the fact that I’m getting something for having put money down.
I’m probably not saying this right but I appreciate the fact that Corona is catering to subscribers between releases. Without that targeted effort I’d just be twiddling my thumbs in frustration instead of twiddling my thumbs awaiting movement of my first app in the Apple queue.
Well not really twiddling, working on next version thanks to the “only for subscribers” 
[import]uid: 6547 topic_id: 10030 reply_id: 37062[/import]
Awesome. Things like these go long way in building loyal customer base
[import]uid: 48521 topic_id: 10030 reply_id: 37086[/import]