Skip to content

Commit

Permalink
- Add support for Android Q
Browse files Browse the repository at this point in the history
- Fix Camera on newer Android versions
  • Loading branch information
PLPellegrini committed Sep 5, 2019
1 parent 7a764d7 commit e51aad9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ apply plugin: 'com.github.dcendents.android-maven'
group = 'com.github.jrvansuita'

android {
compileSdkVersion 28
buildToolsVersion "28.0.2"
compileSdkVersion 29
buildToolsVersion "28.0.3"

defaultConfig {
minSdkVersion 9
targetSdkVersion 28
targetSdkVersion 29
versionCode 1
versionName "1.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private File cameraFile() {
ApplicationInfo applicationInfo = activity.getApplicationInfo();
int stringId = applicationInfo.labelRes;
String appName = stringId == 0 ? applicationInfo.nonLocalizedLabel.toString() : activity.getString(stringId);
directory = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), appName);
directory = new File(activity.getExternalFilesDir(Environment.DIRECTORY_PICTURES), appName);
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
if (setup.isVideo()) {
fileName = timeStamp + ".mp4";
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/res/xml/picker_provider_paths.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<paths>
<files-path name="image_picked" path="picked/"/>
<external-path name="to_be_replaced" path="Pictures/"/>
<external-files-path name="to_be_replaced" path="Pictures/"/>
</paths>

0 comments on commit e51aad9

Please sign in to comment.