I am making a Bluetooth chat app, which displays the chat in ListView named "list". I am new to android and have no idea how to save listview to root directory in .txt format. I tried searching but it went over my head.
Here is the part where I want to implement the save option:
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
switch(item.getItemId())
{
case R.id.save:
//add the function to perform here
return(true);
}
return(super.onOptionsItemSelected(item));
}
Also, following is the way I declare list in one of my .java file:
listView = (ListView) findViewById(R.id.list);
I am using the following permission in the manifest file:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
I don't even know how to begin.
Do you want to save the data of list view into the internal storage? Because we can not store directly view object into the memory.