Xamarin C# Android And Parse - Downloading A Parsefile Inside A Parseobject
I previously made a post asking how to send a .3gpp audio file up to the parse cloud here: Xamarin C# Android - converting .3gpp audio to bytes & sending to parseObject I have
Solution 1:
this line will return a collection of results
IEnumerable<ParseFile> results =await query.FindAsync();
you either need to iterate through them with foreach
, or just pick the first one
// for testing, just pick the first oneif (results.Count > 0) {
var result = results[0];
byte[] data = awaitnew HttpClient().GetByteArrayAsync(result.Url);
File.WriteAllBytes(some_path_to_a_temp_file, data);
// at this point, you can just initialize your player with the audio file path and play as normal
}
Post a Comment for "Xamarin C# Android And Parse - Downloading A Parsefile Inside A Parseobject"