(GUYS I AM TRYING TO IMPLEMENT THIS CODE TO THE ANDROID TO LET IT DOWNLOAD AND PLAY IT WITH AUDIO BUT IT FAILS, AND IT WORKS IN IOS CAN U GUYS HELP ME OUT PLS…)
local function networkListener( event )
if ( event.isError ) then
print( “Network error - download failed” )
elseif ( event.phase == “began” ) then
print( “Progress Phase: began” )
elseif ( event.phase == “ended” ) then
print( “Displaying response image file” )
local sound = audio.loadSound(“uptownfunk.mp3”,system.DocumentsDirectory)
local soundchannel = audio.play(sound)
end
end
local params = {}
params.progress = true
network.download(
“GET”,
networkListener,
params,
“uptownfunk.mp3”,
system.DocumentsDirectory
)
(GUYS THE CODE FOR THE URL IS THIS: http://mp3for.me/assets/songs/393000-393999/393160-uptown-funk-feat-bruno-mars-mark-ronson--1422369580.mp3)