Ver mensagens sem resposta | Ver tópicos ativos Hoje é 01 Abr 2020, 04:57



Responder Tópico  [ 1 Mensagem ] 
 Glide fails to load resources when trying to load an audio 
Autor Mensagem
What is Android?
What is Android?

Data de registro: 05 Nov 2019, 13:21
Mensagens: 6
Mensagem Glide fails to load resources when trying to load an audio
Problems
Messages in Logcat I'm getting from Android Studio:

01-16 11:27:34.088 15846-15846/? W/Glide: Load failed for /storage/emulated/0/9fe457b5-7baf-459d-be34-76ec5c2bcf74audio_record.3gp with size [80x80]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
     Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{FileInputStream->Object->Drawable}, LOCAL
       Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->GifDrawable->Drawable}
       Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->Bitmap->Drawable}
       Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->BitmapDrawable->Drawable}
     Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{ParcelFileDescriptor->Object->Drawable}, LOCAL
       Cause (1 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor->Bitmap->Drawable}
       Cause (2 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor->BitmapDrawable->Drawable}
     Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{AssetFileDescriptor->Object->Drawable}, LOCAL
       Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{AssetFileDescriptor->Bitmap->Drawable}


I didn't understand those error messages. Why I'm getting then exactly?

Idea
Hello, I am developing an app that records an audio from smartphone, get this audio recorded and transforms it into a byte array vector. The audio after recording is saved by the smartphone as an audio file named "...audio_record.3gp".

What I'm doing: After using the app to record the audio, I open the app called "File Manager" and go to file "/storage/emulated/0" where the audios recorded with end "..audio_record.3gp" are being saved.

To get this local "path" I'm coding this:

 String path =Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+UUID.randomUUID().toString()+"audio_record.3gp";


Then I get this audio file and converts it into a bytes array vector doing this:

public byte[] convert(String path) throws IOException {

FileInputStream fis = new FileInputStream(path);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
byte[] b = new byte[1024];

for (int readNum; (readNum = fis.read(b)) != -1; ) {
    bos.write(b, 0, readNum);
}

byte[] bytes = bos.toByteArray();

String decode = Arrays.toString(bytes);
Log.d("mytag", decode);

return bytes;


The audio is being recorded correctly, and saved to the file "/storage/emulated/0". The problem happens when we get the last audio from this file and try to work with it. "/storage/emulated/0/9fe457b5-7baf-459d-be34-76ec5c2bcf74audio_record.3gp" is the name of the audio file tried to be loaded.


04 Mar 2020, 13:24
Perfil
Mostrar mensagens anteriores:  Organizar por  
Responder Tópico   [ 1 Mensagem ] 

Quem está online

Usuários vendo este fórum: Abraao, adilson.afl, aechiara, alberto, alexandre, Alexandre Castro, alexandreizumi, Alexandrercarvalho, alexandreufcg, alexsander.miranda, allone, alsimoes, anaguerra, Anderson MarkZ, andi, andrelom, Aniquiler, Berbert, Bitor, brcamp, btminzon, Carlos Alexandre, carlosavasconcelos, cassianotartari, cenatech, Chanceler Supremo Finis Valorum, chunga, claudio, Comandante Cody, Cr-Informática, Cynthia, danielbfranco, dariosena, deborazb, Diego Rufino, diogeneskelsen, dobau, dr.faro, drjunior, edlinux, Felipe, Felipe Ferreira, fernando neves, ffabiano, francismarconcini, furlanrapha, gabrielatme, gabrielpg, gapler, germanno, grandebaro, gutodias, HanNiBaLSeTDf, hebert, hellbest, henrikesilva1, henrique.cardoso, Ielo8, infonlinebr, Jar Jar Binks, jasn, jcdeveloper, jeanbr07, JeffCF, Jenius, jhou, Jorge Machin, Josinhaz, jrsilva, juliherms, Julio Assis, juniorfranca, kecyobarros, kristopher, lafamac, Leonardo, Leonardo333, leonardodamata, lfirpo, lillian.brandao, Lincoln, linukiss, lisbao, loferreira, Lord, LucasNascimento, lucianoalves, luciocamilo, Luke Skywalker, MarceloMC, marcelorferrari, MARCIOHG, marciosoliveira, marcosf63, MauNunes, mauriciobreide, maurofjr, Meticore, mmiottobarbosa, Moisés Souto, mrkensley, mvoto, nardosnt, nfaria, nivaldo, Padawan, Paulo Bizzo, paulo.esantos, paulovaz, polonia, pomarolli, Rafael Felix, rbenatti, rcotonet, rdchaves, reginaldo, renegheller, rerp7, robsonrg, ronamore, Samantha, sephct, Shaman286, siker C3PO, sjta, taluna, tassiovirginio, tavares767, tchou, Thelemita, thiagotomais, ThiMatsu, thosjanas, tnarnold, Toks, tonical, tonylock, ttaranto, valaszek, vaniuz, VILESOFT, Wds, wilson.slima, wingdoido, Zam Wesell e 13 visitantes


Você não pode criar novos tópicos neste fórum
Você não pode responder tópicos neste fórum
Você não pode editar suas mensagens neste fórum
Você não pode excluir suas mensagens neste fórum
Você não pode enviar anexos neste fórum

Procurar por:

© 2007 - 2016 Portal Android - Comunidade de Desenvolvedores Android

Estamos no Linkedin    Siga-nos no twitter


Powered by phpBB - Hospedado por Bemobi