android - How can i insert a .bin created on desktop file into apk -
i have code creating internal file, there random algorithem create data stored in , want app have same file same binary data in it.
so need make file on desktop , add internal files how.
my question think best way it. thought locate in project, read it, , write internal files.
the problem is, dont know locate file in android studio included in external files , read from.
thanks. =] hope made myself clear.
put in src/main/assets/
.
you can access file assetmanager , whatever want it.
from android developers website:
main/assets/
this empty. can use store raw asset files. files save here compiled .apk file as-is, , original filename preserved. can navigate directory in same way typical file system using uris , read files stream of bytes using
assetmanager
. example, location textures , game data.
Comments
Post a Comment