{"action":"closed","issue":{"url":"https://api.github.com/repos/freshplanet/ANE-Alert/issues/3","labels_url":"https://api.github.com/repos/freshplanet/ANE-Alert/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/freshplanet/ANE-Alert/issues/3/comments","events_url":"https://api.github.com/repos/freshplanet/ANE-Alert/issues/3/events","html_url":"https://github.com/freshplanet/ANE-Alert/issues/3","id":18522664,"number":3,"title":"Android alerts dismissed by tapping anywhere on the screen will not call its button's callback","user":{"login":"edmundito","id":168664,"avatar_url":"https://avatars.githubusercontent.com/u/168664?v=3","gravatar_id":"","url":"https://api.github.com/users/edmundito","html_url":"https://github.com/edmundito","followers_url":"https://api.github.com/users/edmundito/followers","following_url":"https://api.github.com/users/edmundito/following{/other_user}","gists_url":"https://api.github.com/users/edmundito/gists{/gist_id}","starred_url":"https://api.github.com/users/edmundito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edmundito/subscriptions","organizations_url":"https://api.github.com/users/edmundito/orgs","repos_url":"https://api.github.com/users/edmundito/repos","events_url":"https://api.github.com/users/edmundito/events{/privacy}","received_events_url":"https://api.github.com/users/edmundito/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2013-08-25T15:55:38Z","updated_at":"2015-02-21T05:53:02Z","closed_at":"2015-02-21T05:53:02Z","body":"I noticed that on Android the behavior of the alert is a little different from iOS. When an ANE-Alert has one button, you can actually tap anywhere around the alert to dismiss it. However, if you have set up a Function callback for that button, and the user taps anywhere but the button itself, the alert goes away and that Function never gets called.\r\n\r\nI have a very basic solution that fixes this issue. Basically, the `setCancelable()` property needs to be set to `false` in [AirAlertShowAlert.java](https://github.com/freshplanet/ANE-Alert/blob/master/android/src/com/freshplanet/alert/functions/AirAlertShowAlert.java#L70):\r\n\r\n```java\r\nalertBuilder\r\n  .setTitle(title)\r\n  .setMessage(message)\r\n  .setCancelable(false) // THIS\r\n  .setNeutralButton(button1, Extension.context);\r\n```\r\n\r\nThe new behavior is that the user is now required to click on the button before dismissing the dialog.\r\n\r\nLet me know if you want me to push this change, unless the intended behavior was to indeed be able to dismiss the alert by tapping anywhere on the app, then we can talk about other solutions. :)"}}