{ "id": "118113", "key": "ALOY-778", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-03-12T19:06:41.000+0000", "created": "2013-08-07T21:58:33.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-03-07T22:28:29.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "On an Android device when creating a confirm dialog in Alloy, it will not open when the application is launched, it must instead be put inside of an event listener or will not be triggered, This does not happen on Android Emulator and iOS.\r\n\r\nExample below demonstrates this problem, comments show the workaround.\r\nindex.js\r\n{code}\r\nvar dialogs = require('alloy/dialogs');\r\n\r\n\tdialogs.confirm({title:'Push Notifications', message:'Register for push notifications?'});\t\t\r\n/*\r\nfunction doOpen(){\r\n\tdialogs.confirm({title:'Push Notifications', message:'Register for push notifications?'});\r\n};\r\n*/\r\n$.win.open();\r\n{code}\r\n\r\nindex.tss\r\n{code}\r\n\"Window\": {\r\n\tbackgroundColor: \"#fff\"\r\n}\r\n\r\n{code}\r\n\r\nindex.xml\r\n{code}\r\n\r\n \r\n \r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "Confirm Dialogs no opening on device", "creator": { "name": "jbuckley", "key": "jbuckley", "displayName": "Jamie Buckley", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jbuckley", "key": "jbuckley", "displayName": "Jamie Buckley", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti 3.1.1\r\nAndroid Device", "comment": { "comments": [ { "id": "265495", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Just a heads up, the confirm builtin is going to be deprecated soon in favor of simply using the AlertDialog API.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-07T23:38:10.000+0000", "updated": "2013-08-07T23:38:10.000+0000" }, { "id": "296849", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "This seems to be simply a case of the alertDialog attempting to open before the window is fully loaded. On Android, alerts are modal to the window that contains them, thus I expect there's no valid window to attach to at the point at which your code runs. Change your controller code to the following and the confirmation dialog is shown as expected:\n\n{code}\nvar dialogs = require('alloy/dialogs');\n\n_.defer(function() {\n dialogs.confirm({title:'Push Notifications', message:'Register for push notifications?'});\n});\n\n$.win.open();\n{code}", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-03-12T19:05:54.000+0000", "updated": "2014-03-12T19:05:54.000+0000" }, { "id": "296850", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Resolving as invalid as this appears to be expected platform behavior and a suitable workaround is available.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-03-12T19:06:41.000+0000", "updated": "2014-03-12T19:06:41.000+0000" }, { "id": "435358", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid. If this is incorrect, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-07T22:28:29.000+0000", "updated": "2018-03-07T22:28:29.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }