When trying to upload team media on API 24+, the app crashes.
The fix isn't anything too crazy, we just need to set up a FileProvider
Stacktrace
android.os.FileUriExposedException: file:///storage/emulated/0/Pictures/The%20Blue%20Alliance/JPEG_20190228_123520_4360370020344827292.jpg exposed beyond app through ClipData.Item.getUri()
at android.os.StrictMode.onFileUriExposed(StrictMode.java:1978)
at android.net.Uri.checkFileUriExposed(Uri.java:2371)
at android.content.ClipData.prepareToLeaveProcess(ClipData.java:963)
at android.content.Intent.prepareToLeaveProcess(Intent.java:10216)
at android.content.Intent.prepareToLeaveProcess(Intent.java:10201)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1667)
at android.app.Activity.startActivityForResult(Activity.java:4587)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:767)
at android.app.Activity.startActivityForResult(Activity.java:4545)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:754)
at com.thebluealliance.androidclient.activities.ViewTeamActivity.takePicture(ViewTeamActivity.java:445)
at com.thebluealliance.androidclient.activities.ViewTeamActivityPermissionsDispatcher.takePictureWithCheck(ViewTeamActivityPermissionsDispatcher.java:21)
at com.thebluealliance.androidclient.activities.ViewTeamActivity.lambda$onFabClick$3(ViewTeamActivity.java:389)
at com.thebluealliance.androidclient.activities.-$$Lambda$ViewTeamActivity$A5KbnWEsRoc4vAPHR9o4R7x5WmY.onClick(Unknown Source:2)
at android.support.v7.app.AlertController$AlertParams$3.onItemClick(AlertController.java:1068)
at android.widget.AdapterView.performItemClick(AdapterView.java:318)
at android.widget.AbsListView.performItemClick(AbsListView.java:1159)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3136)
at android.widget.AbsListView$3.run(AbsListView.java:4052)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
When trying to upload team media on API 24+, the app crashes.
The fix isn't anything too crazy, we just need to set up a
FileProvider
Stacktrace