{ "id": "160470", "key": "TIMOB-23429", "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": [ { "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-05-19T20:41:03.000+0000", "created": "2016-05-24T17:50:57.000+0000", "epic": { "id": 155642, "key": "TIMOB-20554", "name": "Support for Android N features and changes", "summary": "Explore new, changed and deprecated APIs in Android N", "color": { "key": "color_2" }, "done": false }, "priority": { "name": "Critical", "id": "1" }, "labels": [ "android-7", "androidN" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "issuelinks": [ { "id": "56021", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "169947", "key": "TIMOB-25363", "fields": { "summary": "Android: Intents should use ContentProvider", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-10-05T04:47:44.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" } ], "description": "Android N introduces more restrictions to file system permissions. Some of these are breaking changes. We need to test it on our current implementation and modify if needed. Please refer to this for more info: https://developer.android.com/preview/behavior-changes.html", "attachment": [], "flagged": false, "summary": "Android N: File Permissions", "creator": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 796, "state": "closed", "name": "2017 Sprint 02 SDK", "startDate": "2017-01-15T00:00:41.845Z", "endDate": "2017-01-29T00:00:00.000Z", "completeDate": "2017-01-30T21:10:44.640Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "388909", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "The concern here would be \"Passing file:// URIs outside the package domain may leave the receiver with an unaccessible path. Therefore, attempts to pass a file:// URI trigger a FileUriExposedException.\"\"\r\n\r\nAnd to solve it is \"The recommended way to share the content of a private file is using the FileProvider.\"\r\n\r\nThis would only affect apps that are passing a reference to a file to another app. If it's within the app, there would be no issues.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-06-23T03:42:16.000+0000", "updated": "2016-06-23T03:42:16.000+0000" }, { "id": "403584", "author": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "body": "This is once again a huge reason to be ashamed of yourselves.\r\nAndroid 7 has been in the market since 6+ months. Yet, you still release new iOS versions features within 1 week of its launch. What's the problem with you guys?\r\n\r\nI'm getting this exception when trying to call the *Ti.Media.showCamera* on a Android phone with the API 24 installed:\r\n\r\n{code:java}\r\nandroid.os.FileUriExposedException: file:///storage/emulated/0/Android/data/au.com.ethosorthodontics.smileseeker/files/Pictures/Smile%20Seeker/tia75788\r\n5560.jpg exposed beyond app through ClipData.Item.getUri()\r\n{code}\r\n\r\nFrom everything I've read on the internet this issue happens because of what @Ashraf Abu said above.\r\nAre you guys planning to support Android as much as you support iOS some day in the future ?\r\n\r\nThis is just sad.\r\n\r\n", "updateAuthor": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2016-12-19T05:27:01.000+0000", "updated": "2016-12-19T05:27:01.000+0000" }, { "id": "403603", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "+1 - Android is always too far. Is still missing basic Material Design implementations =/", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-19T10:23:41.000+0000", "updated": "2016-12-19T10:23:41.000+0000" }, { "id": "419409", "author": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8706\r\n6_1_0: https://github.com/appcelerator/titanium_mobile/pull/9041", "updateAuthor": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-09T20:47:21.000+0000", "updated": "2017-05-09T20:47:21.000+0000" }, { "id": "420061", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Backport & master PR merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-19T20:10:04.000+0000", "updated": "2017-05-19T21:07:20.000+0000" }, { "id": "420068", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the implementation for the new permissions model for android N & did not find any issues.\r\n\r\nClosing.\r\n\r\nStudio Ver: 4.9.0.201705170123\r\nSDK Ver: 6.1.0.v20170519131839\r\nOS Ver: 10.12.3\r\nXcode Ver: Xcode 8.3.2\r\nAppc NPM: 4.2.9\r\nAppc CLI: 6.2.1\r\nTi CLI Ver: 5.0.13\r\nAlloy Ver: 1.9.11\r\nNode Ver: 6.10.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Nexus 6 --- Android 6.0.1\r\n ⇨ google Pixel XL --- Android 7.1.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-19T21:08:26.000+0000", "updated": "2017-05-19T21:08:26.000+0000" }, { "id": "428516", "author": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "body": "Issue is fixed form showCamera but not when you want to create an intent to open another file e.g. a pdf. I think a ContentProvider is required for that. Is there any guide for that on Titanium?", "updateAuthor": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-09-27T09:44:01.000+0000", "updated": "2017-09-27T09:44:01.000+0000" }, { "id": "428517", "author": { "name": "gfigueras", "key": "gfigueras", "displayName": "Guillermo Figueras", "active": true, "timeZone": "Europe/Madrid" }, "body": "Nikos Poulis, if you want to open a pdf in Android you have to do this:\r\n\r\n\r\n{code:javascript}\r\nvar appFile = Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory, \"yourfile.pdf\");\r\nvar appfilepath = appFile.nativePath;\r\nTi.Android.currentActivity.startActivity(Ti.Android.createIntent({\r\n\taction : Ti.Android.ACTION_VIEW,\r\n\ttype : 'application/pdf',\r\n\tdata : appfilepath\r\n}));\r\n{code}\r\n", "updateAuthor": { "name": "gfigueras", "key": "gfigueras", "displayName": "Guillermo Figueras", "active": true, "timeZone": "Europe/Madrid" }, "created": "2017-09-27T10:34:29.000+0000", "updated": "2017-09-27T10:34:29.000+0000" }, { "id": "428518", "author": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "body": "This does not work anymore if you target android 24 and above, throwing the file:// URI trigger a FileUriExposedException no matter what Ti SDK you use", "updateAuthor": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-09-27T10:47:53.000+0000", "updated": "2017-09-27T10:47:53.000+0000" }, { "id": "428520", "author": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "body": "https://stackoverflow.com/questions/45190786/titanium-appcelerator-fileuriexposedexception-how-to-use-content-provider\r\n\r\nfixes the issue for API 24 but not 25", "updateAuthor": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-09-27T10:52:52.000+0000", "updated": "2017-09-27T10:52:52.000+0000" }, { "id": "428522", "author": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "body": "See https://medium.com/@ali.muzaffar/what-is-android-os-fileuriexposedexception-and-what-you-can-do-about-it-70b9eb17c6d0", "updateAuthor": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-09-27T13:55:39.000+0000", "updated": "2017-09-27T13:55:39.000+0000" }, { "id": "428560", "author": { "name": "phorner72", "key": "phorner72", "displayName": "Peter Horner", "active": true, "timeZone": "Europe/Berlin" }, "body": "I am having the same problem as Nikos Poulios. Ti SDK 6.2.2 targeting Android 25. Getting the FileUriExposedException when trying to create an intent to open a PDF in another app like Adobe Acrobat Reader. This is a critical bug and needs to be fixed ASAP. Thanks!!", "updateAuthor": { "name": "phorner72", "key": "phorner72", "displayName": "Peter Horner", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-09-28T07:08:11.000+0000", "updated": "2017-09-28T07:08:11.000+0000" }, { "id": "428722", "author": { "name": "raefa", "key": "raefa", "displayName": "Raef Akehurst", "active": true, "timeZone": "Australia/Sydney" }, "body": "I am also facing the same issue. Ti SDK 6.2.2 targeting Android 25. Anyone come up with a solution or workaround?\r\n\r\nNote. I am experiencing some weird results when testing this. On Android 7 I can't open a PDF (I get the FileUriExposedException error) but I can attach a file to an email. On Android 8 I can open a PDF bit I can't attach a file to an email (I get the FileUriExposedException error). I will post more if I find out a solution.", "updateAuthor": { "name": "raefa", "key": "raefa", "displayName": "Raef Akehurst", "active": true, "timeZone": "Australia/Sydney" }, "created": "2017-10-05T04:47:44.000+0000", "updated": "2017-10-05T04:47:44.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }