context error in android studio 1

context error in android studio

//You can try this

Context context = this;

//or

File f = File(UploadToServer.this.getCacheDir(), "filename");
 

Here is what the above code is Doing:
1. Create a new file in the internal storage
2. Get the URI for the file
3. Grant temporary read permission to the content URI
4. Share the file

Similar Posts