-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android less than 11 compression bitmap #17
Conversation
src/android/SpectrumManager.java
Outdated
@@ -80,6 +80,12 @@ private void transcodeImage(String path, int size, CallbackContext callbackConte | |||
callbackContext.error("Failed to compress image"); | |||
return; | |||
} | |||
} else { | |||
Log.d("Warning","Cannot compress image on Android version < 11"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log.d("Warning","Cannot compress image on Android version < 11"); | |
Log.d("Warning","Cannot compress image on Android version < 11"); |
can we use callbackContext.error
here
src/android/SpectrumManager.java
Outdated
@@ -80,6 +80,12 @@ private void transcodeImage(String path, int size, CallbackContext callbackConte | |||
callbackContext.error("Failed to compress image"); | |||
return; | |||
} | |||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be outside the try block?
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R)
// error handling or logging
// return or equivalent
try (...)
// compress
src/android/SpectrumManager.java
Outdated
@@ -80,6 +80,12 @@ private void transcodeImage(String path, int size, CallbackContext callbackConte | |||
callbackContext.error("Failed to compress image"); | |||
return; | |||
} | |||
} else { | |||
Log.d("Warning","Cannot compress image on Android version < 11"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put < Build.VERSION_CODES.R
instead of < 11
directly?
No description provided.