{ "id": "172578", "key": "AC-6016", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2018-11-08T23:30:24.000+0000", "created": "2018-11-08T10:26:00.000+0000", "labels": [ "3-Party" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-11-08T23:30:24.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "I try to build an Android module for (BT-) communicating with devices.\r\nIn the demo app of the manufacture this pattern will used:\r\n\r\n{code:java}\r\npublic class myActivity extends Activity implements\r\n\t\tDeviceManager.FoundAvailableDeviceListener {\r\n @Override\r\n\tpublic void onAvailableDeviceFound(final Device device) {\r\n\t\tLog.i(LCAT, \"Model: \" + device.getModel() + \" Name: \"+ device.getDeviceName());\r\n\t}\r\n void findAvailableDevices() {\r\n deviceManager.setFoundAvailableDeviceListener(this);\r\n deviceManager.findAvailableDevices(getApplicationContext());\r\n }\r\n} \r\n{code}\r\n\r\nThis works in activity (as aspected). If I try to build this pattern in KrollProxy, the internal class DeviceManager detects the device with all properties but later during Device instantiating the app crashes because of null reference. The only difference to original code is that we use the KrollProxy. For `getApplicationContext()` I'm using `TiApplication.getInstance().getApplicationContext()`. I have played with thread messaging and getbaseContext(), but nothing helps.\r\n\r\nThe manufactor don't feel responsible for Titanium framework ... \r\n\r\nAny clue? \r\n\r\nHere my KrollProxy: https://gist.github.com/AppWerft/40e88c86ee87d0fb2481b6eb5a2603f6\r\nHere the original: https://gist.github.com/AppWerft/de0c36b720d4cd180db71efee341d444", "attachment": [], "flagged": false, "summary": "Issue with ApplicationContext by usage of 3-party library (leica) ", "creator": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "443424", "author": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "body": "It is solved, was a problem with closed cource and a \"bug\"", "updateAuthor": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-11-08T17:01:07.000+0000", "updated": "2018-11-08T17:01:07.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }