@@ -0,0 +1,891 @@
+package com.maxiee.heartbeat.backup;%0A%0Aimport android.content.Context;%0Aimport android.content.Intent;%0Aimport android.net.Uri;%0Aimport android.support.v4.content.FileProvider;%0Aimport android.widget.Toast;%0A%0Aimport com.maxiee.heartbeat.R;%0A%0Aimport java.io.File;%0A%0A/**%0A * Created by maxiee on 15-8-10.%0A */%0Apublic class BackupManager %7B%0A    private final static String DB = %22heartbeat%22;%0A%0A    public static void backup(Context context) %7B%0A        Uri db = Uri.fromFile(context.getDatabasePath(DB));%0A        Intent i = new Intent();%0A        i.setAction(Intent.ACTION_SEND);%0A        i.setDataAndType(%0A                db,%0A                %22*/*%22%0A        );%0A        if (i.resolveActivity(context.getPackageManager()) != null) %7B%0A            context.startActivity(i);%0A        %7D else %7B%0A            Toast.makeText(context, context.getString(R.string.share_not_found), Toast.LENGTH_LONG).show();%0A        %7D%0A    %7D%0A%7D%0A

backup database.