Skip to content

Instantly share code, notes, and snippets.

Avatar

Tejas Sherdiwala tsherdiwala

View GitHub Profile
@tsherdiwala
tsherdiwala / DatabaseExporter.kt
Created Jul 6, 2019
Android database exporter
View DatabaseExporter.kt
import android.content.Context
import android.util.Log
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream
private val TAG = DatabaseExporter::class.java.simpleName
object DatabaseExporter {
@tsherdiwala
tsherdiwala / CrimeLab.java
Last active Nov 28, 2016
Crime Reference.
View CrimeLab.java
public class CrimeLab{
public File getPhotoFile(Crime crime) {
File externalFilesDir = mContext.getExternalFilesDir(Environment.DIRECTORY_PICTURES);
if (externalFilesDir == null) {
return null;
}
return new File(externalFilesDir, crime.getPhotoFilename());
}
}
You can’t perform that action at this time.