mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-01-21 21:38:12 -05:00
Allow sending newly exported data
With this change once data is exported it can be sent to another application. Translation contributions: Clonewayx: cs PanderMusubi: nl pbeckmann: de Airon90: it arno-github : fr # Conflicts: # app/src/main/res/values-it/strings.xml
This commit is contained in:
@@ -250,7 +250,7 @@ public class ImportExportActivity extends AppCompatActivity
|
||||
builder.create().show();
|
||||
}
|
||||
|
||||
private void onExportComplete(boolean success, File path)
|
||||
private void onExportComplete(boolean success, final File path)
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
|
||||
@@ -277,6 +277,28 @@ public class ImportExportActivity extends AppCompatActivity
|
||||
}
|
||||
});
|
||||
|
||||
if(success)
|
||||
{
|
||||
final CharSequence sendLabel = ImportExportActivity.this.getResources().getText(R.string.sendLabel);
|
||||
|
||||
builder.setPositiveButton(sendLabel, new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
Uri outputUri = Uri.fromFile(path);
|
||||
Intent sendIntent = new Intent(Intent.ACTION_SEND);
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, outputUri);
|
||||
sendIntent.setType("text/plain");
|
||||
|
||||
ImportExportActivity.this.startActivity(Intent.createChooser(sendIntent,
|
||||
sendLabel));
|
||||
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
builder.create().show();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user