I have an app Android with deep link via Browser. I use the code below inside onCreate()
Intent appLinkIntent = getIntent();
if (appLinkIntent != null && appLinkIntent.getData() != null) {
Uri data = getIntent().getData();
List<String> params = data.getPathSegments();
id = params.get(1); // "id"
when finish the app return in browser page for next deep link. If i reopen the app from "recent app" the deep link start with the previous data causing a duplicate.
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode== RESULT_OK && data != null) {
//if (requestCode == 123 && data != null) {
Bundle extras = data.getExtras();
if (extras != null) {
//signature_signed_field_count = extras.getInt("signature_signed_field_count");
ArrayList<String> firme = extras.getStringArrayList("signedSignatureFields");
if (firme != null && !firme.isEmpty()) {
sendmail();
} else {
pdf.delete();
}
}
//other extras
//data=null;
setResult(RESULT_CLOSE_ALL);
//finishAffinity();
super.finish();
}
}
Can i prevent this?