Permissoes de armazenamento!

59 views
Skip to first unread message

RAFAEL GONÇALVES

unread,
Aug 13, 2019, 10:30:37 AM8/13/19
to MIT App Inventor Forum
Bom dia amigos, estou  tendo um problema ao querer compartilhar audios.
sou usuario novo do APP inventor, estou programando meu primeiro app, e nesse app eu trabalho com audios, dos quais, o usuario pode compartilhalos por whatsapp caso desejar. 
quando eu faço o teste usando o codigo QR tudo funciona perfeitamente. Mas quando eu baixo  o app para o meu aparelho celular, e instalo, eu consigo ouvir os audios mas quando eu vou compartilhalos igual eu faço quando estou em teste. ele nao compartilha. ai depois de muito pensar, eu fui nas informaçoes do app no meu celular e vi que nao tinha permissao para armazenamento, apos conceder essa permição eu consegui compartilhar os Audios. Porem queria colocar para o usuario ceder a permissao na hora que ele instalar o applicativo. ai que esta o problema, eu nao sei como fazer isso. Alguem mais experiente poderia me ajudar? ..

Texto em Ingles:

Good morning friends, I'm having a problem wanting to share audios. I am a new user of the inventor APP, I am programming my first app, and in this app I work with audios, of which, the user can share them by whatsapp if you wish. when I do the test using QR code everything works perfectly. But when I download the app to my mobile device, and install it, I can hear the audios, but when I'm going to share them just like I do when I'm testing. He does not share. Then after much thought, I went to the information of the app on my phone and saw that I had no permission for storage, after granting this permission I managed to share the Audios. But I wanted to put the user to give permission when he installs the application. That's the problem, I don't know how to do it. Could someone more experienced help me?

Taifun

unread,
Aug 13, 2019, 4:02:47 PM8/13/19
to mitappinv...@googlegroups.com
 after granting this permission I managed to share the Audios. But I wanted to put the user to give permission when he installs the application. That's the problem, I don't know how to do it.

usually all components should ask for required permissions automatically... (?)
but you can do it also manually: just use the AskForPermission method from the Screen drawer together with the PermissionGranted and PermissionDenied events

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 


RAFAEL GONÇALVES

unread,
Aug 15, 2019, 12:13:01 AM8/15/19
to MIT App Inventor Forum
Obrigado Tufao, eu consegui solicitar as permissoes. reinstalei o app que eu criei no meu celular novamente e ao iniciar ele pediu as permissoes da forma que eu queria. te agradeço. Porem agora apareceu outro obstaculo, quando coloco para compartilhar o audio, aparece uma mensagem de erro "error 2001: the file could not be found on your device no app inventor" . um amigo disse que talves eu tivesse que ver se o app esta copiando os arquivos para o armazenamento externo. mas eu ainda sou totalmente cru em programaçao por isso estou usando o appinventor. tem como me ajudar? nesse caso oque eu devo fazer???vou postar uma imagen de como esta +- os blocos que eu estou usando. A imagem esta em anexo!
amostra.png

BodyMindPower

unread,
Aug 15, 2019, 5:03:54 AM8/15/19
to MIT App Inventor Forum
You can not share assets with the sharing component.
You must first copy them to the external storage (if: storage/emulated/0/Music) by using eg Taifun's file extension.

RAFAEL GONÇALVES

unread,
Aug 15, 2019, 11:27:53 PM8/15/19
to MIT App Inventor Forum
Obrigado amigo, eu instalei a extensao do Taifun antes de ler esse post, mas na verdade nao sei quais blocos uso para copiar os arquivos para o armazenamento externo. teria como me orientar?

Taifun

unread,
Aug 16, 2019, 9:51:54 AM8/16/19
to MIT App Inventor Forum
but I really don't know which blocks I use to copy the files to external storage
wha about using the Copy method?
see also the documentation about how to use that method
Reply all
Reply to author
Forward
0 new messages