Reproduce.
1. Run a simple app like following on different Android Device
var win = Ti.UI.createWindow({
backgroundColor:"white"
});
var button = Ti.UI.createButton({
title: "Send Email",
top: 100,
left: 100
});
button.addEventListener("click", function(){
EmailDialog();
});
win.add(button);
win.open();
function EmailDialog() {
var emailDialog = Ti.UI.createEmailDialog();
emailDialog.subject = "Hello from Titanium";
emailDialog.toRecipients = ['foo@yahoo.com'];
emailDialog.messageBody = '<b>Appcelerator Titanium Rocks!</b>';
var f = Ti.Filesystem.getFile('Answers.pdf');
emailDialog.addAttachment(f);
emailDialog.open();
}
2. Click the button, Then choose Gmail to open EmailDialog
3. Touch the device back button on the bottom.
Problem
1. On Samsung S4 with Android 5.0.1, the device back button will close Gmail app, and go back to our original app. This is what customer expected.
2. But On Samsung S5 snd S6 with Android Lollipop and Marshmallow, the device back button will close all app include our original app.
[~sliang] Maybe this could help?