{ "id": "164067", "key": "TIMOB-24050", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": [], "resolution": { "id": "10000", "description": "", "name": "Done" }, "resolutiondate": "2018-01-20T21:05:24.000+0000", "created": "2016-10-19T00:25:22.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-08-06T17:34:46.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": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "attachment": [], "flagged": false, "summary": "Android: Be able to open particular application's system settings.", "creator": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "subtasks": [], "reporter": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "environment": null, "closedSprints": [ { "id": 990, "state": "closed", "name": "2018 Sprint 02 SDK", "startDate": "2018-01-14T22:48:43.544Z", "endDate": "2018-01-28T22:48:00.000Z", "completeDate": "2018-01-29T16:22:42.911Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "399329", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Try hyperloop?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-19T00:50:49.000+0000", "updated": "2016-10-19T00:50:49.000+0000" }, { "id": "399345", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hyperloop example (PoC):\r\n\r\n{code:javascript}\r\nvar Intent = require('android.content.Intent');\r\nvar Activity = require('android.app.Activity');\r\nvar Uri = require(\"android.net.Uri\");\r\nvar Settings = require(\"android.provider.Settings\");\r\n \r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"white\"\r\n});\r\n \r\nvar btn = Ti.UI.createButton({\r\n title: \"Open Application Settings\"\r\n});\r\n \r\nbtn.addEventListener(\"click\", openIntent);\r\n \r\nwin.add(btn);\r\nwin.open();\r\n \r\nfunction openIntent() {\r\n var activity = new Activity(Ti.Android.currentActivity);\r\n\r\n var intent = Ti.Android.createIntent();\r\n var nativeIntent = new Intent(intent);\r\n\r\n nativeIntent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\r\n nativeIntent.addCategory(Intent.CATEGORY_DEFAULT);\r\n nativeIntent.setData(Uri.parse(\"package:\" + activity.getPackageName()));\r\n nativeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n nativeIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\r\n nativeIntent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);\r\n \r\n activity.startActivity(nativeIntent);\r\n}\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-19T07:17:04.000+0000", "updated": "2016-10-20T07:23:40.000+0000" }, { "id": "399436", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "You could try {{activity.getPackageName()}} to get it from the native activity, updated the example.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-20T07:23:11.000+0000", "updated": "2016-10-20T07:23:11.000+0000" }, { "id": "399488", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The context is nothing else but the activity, so you can just use the casted activity and get it from there ({{var activity = new Activity(Ti.Android.currentActivity);}}). See the {{[android.content.Context|https://developer.android.com/reference/android/content/Context.html]}} class that is the super class of all activities.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-20T13:55:07.000+0000", "updated": "2016-10-20T13:55:07.000+0000" }, { "id": "433424", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Question answered last year, resolving now.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-20T21:05:24.000+0000", "updated": "2018-01-20T21:05:24.000+0000" }, { "id": "439837", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closed as completed. If this is in error, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:34:46.000+0000", "updated": "2018-08-06T17:34:46.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }