{ "id": "165030", "key": "TIMOB-24230", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-01-08T23:03:28.000+0000", "created": "2016-12-15T16:21:17.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "feedback" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-01-11T18:32:22.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": "h4. isSupported() method fails with null pointer exception when used on SDK < 23.\r\n\r\nh5. Module is missing method for canceling probing for fingerprints\r\n\r\nI have included my fix for TouchidModule.java:\r\n\r\n{code:java}\r\n\r\n\t@Kroll.method\r\n\tpublic boolean isSupported() {\r\n/* Added SDK check to avoid null pointer Exception */\r\n\t\tif (Build.VERSION.SDK_INT >= 23) {\r\n\t\t\treturn mfingerprintHelper.isDeviceSupported();\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n/* New method to cancel probing for fingerprints */\r\n\t@Kroll.method\r\n\tpublic void cancelAuthenticate() {\r\n\t\tif (mfingerprintHelper != null) {\r\n\t\t\tmfingerprintHelper.stopListening();\r\n\t\t}\t\r\n\t}\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Ti.TouchID fails on SDK < 23", "creator": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "subtasks": [], "reporter": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "environment": "SDK 6.0.0", "comment": { "comments": [ { "id": "403447", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Thanks for the ticket. Can you create a pull request for it? Our Engineers will take care it. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-12-15T19:26:20.000+0000", "updated": "2016-12-15T19:26:20.000+0000" }, { "id": "403559", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey Thomas, thanks for the great ticket! The {{isSupported}} fix is in the following ticket and the {{cancelAuthenticate}} has been added to [this PR|https://github.com/appcelerator-modules/ti.touchid/pull/23], since iOS will also support it in the next feature version. Thx!\r\n\r\nPR: https://github.com/appcelerator-modules/ti.touchid/pull/24\r\nPackaged module: https://github.com/appcelerator-modules/ti.touchid/releases/tag/android-2.0.2\r\n\r\nNote: I bumped to 2.0.2 for SDK release 6.1.0, but with the other PR already bumping to 2.1.0, we'll probably have the 2.1.0 (iOS / Android) for 6.1.0 instead, incorporating all changes. \r\n\r\nTest-case:\r\n1. Create an app with the following content:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Check isSupported()'\r\n});\r\n\r\nbtn.addEventListener('click', function() {\r\n var TiTouchID = require('ti.touchid');\r\n alert('Supported: ' + TiTouchID.isSupported());\r\n});\r\n\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\n2. Run the app on an Android device with API level < 23\r\n\r\nExpected behavior: No crash!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-12-17T16:34:07.000+0000", "updated": "2016-12-17T16:43:08.000+0000" }, { "id": "404473", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified improvement, app no longer crashes and message for {{isSupported}} is displayed. \r\n*Environment*\r\n{code:java}\r\nAppcelerator Command-Line Interface, version 6.1.0\r\nTi.TouchID Module 2.0.2\r\nSamsung Galaxy Note II (Android 4.3)\r\nNexus 6p (Android 7.1)\r\nOperating System Name: Mac OS X El Capitan\r\nOperating System Version: 10.11.6\r\nNode.js Version: 4.6.0\r\nnpm: 4.2.8\r\nTitanium SDK Version: 6.1.0.v20170110133045\r\nXcode: 8.2\r\nAppcelerator Studio: 4.8.1.201612050850\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-11T18:31:38.000+0000", "updated": "2017-01-11T18:31:38.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }