Android how to create a JSON file in SDCARD? -
i need on creating new json file sdcard, filenotfoundexception while trying load, , how read file if it's constructed.
how can manage create new json file in sdcard?
first, have add permission manifest
<uses-permission android:name="android.permission.write_external_storage" /> <uses-permission android:name="android.permission.read_external_storage"/>
then, write code in java.
the path sdcard :
string dir = environment.getexternalstoragedirectory()+file.separator+"nameofyourfile.extension"
to create json string, best way use class jsonobject , jsonarray.
Comments
Post a Comment