Skip to content

Commit

Permalink
android less than 11
Browse files Browse the repository at this point in the history
  • Loading branch information
dinitri committed May 9, 2024
1 parent 32def42 commit 4cf88d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/android/SpectrumManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
PluginResult pluginResult = new PluginResult(PluginResult.Status.OK);
pluginResult.setKeepCallback(true);
callbackContext.sendPluginResult(pluginResult);
return;
}
} catch (Exception e) {
callbackContext.error("Failed to save compressed image: " + e.getMessage());
Expand Down

0 comments on commit 4cf88d1

Please sign in to comment.