Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int runBackup(Uri uri)
- {
- int count=0;
- String file = uri.getHost() +"-"+ System.currentTimeMillis();
- Cursor cursor = cr.query(uri, null, null, null, null);
- count = cursorToCSV(cursor, file);
- cursor.close();
- String msg = String.format("Backed up %d records to %s file", count, file);
- Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
- return count;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement