network.canDetectNetworkStatusChanges()
ជាប្រភេទ Boolean ដែលប្រើសំរាប់ត្រឡប់វិញនៅ true បើសិនជា network status API ត្រូវបាន Supported នៅលើ Current platform។
Syntax:
network.canDetectNetworkStatusChanges
សូមមើលកូដះ
local
function networkListener( event )
print( "Network event" )
end
if
network.canDetectNetworkStatusChanges then
network.setStatusListener(
"www.coronalabs.com", networkListener )
else
print( "network reachability not
supported on this platform" )
end
No comments:
Post a Comment