[TIMOB-2713] exitOnclose event not working in android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2017-03-24T17:45:57.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, exitonclose |
Reporter | Lakshmanan |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:27:37.000+0000 |
Updated | 2017-03-31T17:21:37.000+0000 |
Description
I want to exit from application from one screen. When i click the android hardware back button from that screen the application should be exit. I tried this with exitOnclose within window creation but it doesn't work.
This is my code:
var win2 = Titanium.UI.createWindow({
title:'Tab 2',
url:'example.js',
backgroundColor:'#fff',
exitOnClose:true,
navBarHidden:false
});
I am using Titanium version 1.5.1 and android:sdk 2.1 also I tested with titanium 1.4.0
Did someone find a solution for this?
Have you added an event listener on the back button?
var win = Titanium.UI.currentWindow;
function closeWindow() {
} if(Titanium.Platform.name == 'android') {
} // end platform test
Assigning to Don for triage.
Tested on a Samsung Galaxy S2 using TiSDK 2.2.0v20120821095711, unable to reproduce the issue. Ticket marked as resolved.
Closing ticket as I am unable to reproduce the issue using the following environment; Pixel (7.1) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80