How to read binary text with the File tool ?

222 views
Skip to first unread message

Jean-Philippe Audoin

unread,
Jul 20, 2016, 2:52:19 PM7/20/16
to MIT App Inventor Forum
Hi everybody,

I am trying to solve an issue while reading a file that mix text and binary content.

I am wondering if the reading abilities of the Storage/File tool is adapted to binary content.
Whatever how I try to do it, the "text" variable supposed to get my file's content doesn't have the right size: I suppose it looses specific ASCII characters which are not considered as text.
Is there a way to handle binary files with this tool ? Am I misusing it, is it a bug, or a normal behavior ? (documentation is reaaaaaly poor).

Does anybody knows how to deal with reading/writing binary files ?

Thanx for help !

Taifun

unread,
Jul 20, 2016, 6:30:28 PM7/20/16
to MIT App Inventor Forum
the file component can only read text files

Is there a way to handle binary files with this tool ?
what exactly are you trying to do?
you could write your own extension and create a block yourself...

more information about how to create an extension see here https://groups.google.com/d/msg/mitappinventortest/Ip2AX036d0U/5NJlAEbFCgAJ
however that will be more advanced and will require some Java skills...

Taifun

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


Reply all
Reply to author
Forward
0 new messages