Read and Store Json Files in Internal Storage
Understanding the storages in an Android device, you can easily check or transfer files in both directions: your app and the device. For example, if your app have a licence file, and you want to check the permission, you can store licence file in Android device for further updating and changing.
Storages in an Android Device
To work with your device’s file system, do the following:
- Open the device file browser by clicking View > Tool Windows > Device File Explorer.
- Select a device from the drop-down list.
There two useful storages you can store your data:
- one is the internal storage, which is located at:
data/data/app_name/
- another one is the external user storage, which is located at:
sdcard/
Examples for Creating files
Here is a sample code that creates a file in the internal storage:
1 | public void createFile() { |