kopia lustrzana https://github.com/olgamiller/SSTVEncoder2
minimal changes to get camera intent working for Android 10 users
This is only a temporary workaround for Android 10 users: - Enable permission request to write to external storage for Android 10 - Enable old behaviour prior Android 10 for external storagepull/3/head
rodzic
13880130f2
commit
8119c5bd91
|
@ -4,11 +4,12 @@
|
|||
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="28"/>
|
||||
android:maxSdkVersion="29"/>
|
||||
<uses-feature
|
||||
android:name="android.hardware.camera"
|
||||
android:required="false"/>
|
||||
<application
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:allowBackup="false"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
|
|
|
@ -191,7 +191,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
|
||||
private boolean needsRequestWritePermission() {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M ||
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||
Build.VERSION.SDK_INT > Build.VERSION_CODES.Q)
|
||||
return false;
|
||||
String permission = Manifest.permission.WRITE_EXTERNAL_STORAGE;
|
||||
int state = ContextCompat.checkSelfPermission(this, permission);
|
||||
|
|
Ładowanie…
Reference in New Issue