This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sergiandreplace.content; | |
import android.content.ContentProvider; | |
import android.content.ContentValues; | |
import android.content.Context; | |
import android.content.UriMatcher; | |
import android.database.Cursor; | |
import android.database.sqlite.SQLiteDatabase; | |
import android.net.Uri; | |
import android.util.SparseArray; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myTextView.setMovementMethod(new ScrollingMovementMethod()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tempos21.taskexecutor; | |
import android.os.Handler; | |
import java.util.Random; | |
/** | |
* Base class for executable tasks | |
*/ | |
public abstract class Task<I, O> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void exportDatabse(String databaseName) { | |
try { | |
File sd = Environment.getExternalStorageDirectory(); | |
File data = Environment.getDataDirectory(); | |
if (sd.canWrite()) { | |
String currentDBPath = "//data//"+getPackageName()+"//databases//"+databaseName+""; | |
String backupDBPath = "backupname.db"; | |
File currentDB = new File(data, currentDBPath); | |
File backupDB = new File(sd, backupDBPath); |
NewerOlder