Skip to content

Instantly share code, notes, and snippets.

Tejas Sherdiwala tsherdiwala

Block or report user

Report or block tsherdiwala

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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.