feat(android): update packages

use androidx exifinterface, use viewpager2,  update sdk , build tools, target sdk ,update fragment & transition versions
This commit is contained in:
triniwiz
2020-07-28 08:26:59 -04:00
parent 0dce8be03c
commit 08cc81616f
30 changed files with 64036 additions and 341 deletions

View File

@@ -354,17 +354,18 @@ function getTargetFormat(format: 'png' | 'jpeg' | 'jpg'): android.graphics.Bitma
function getRotationAngleFromFile(filename: string): number {
let result = 0;
const ei = new android.media.ExifInterface(filename);
const orientation = ei.getAttributeInt(android.media.ExifInterface.TAG_ORIENTATION, android.media.ExifInterface.ORIENTATION_NORMAL);
const ExifInterface = (androidx as any).exifinterface.media.ExifInterface;
const ei = new ExifInterface(filename);
const orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
switch (orientation) {
case android.media.ExifInterface.ORIENTATION_ROTATE_90:
case ExifInterface.ORIENTATION_ROTATE_90:
result = 90;
break;
case android.media.ExifInterface.ORIENTATION_ROTATE_180:
case ExifInterface.ORIENTATION_ROTATE_180:
result = 180;
break;
case android.media.ExifInterface.ORIENTATION_ROTATE_270:
case ExifInterface.ORIENTATION_ROTATE_270:
result = 270;
break;
}