Release Notes, 6.16.4
Starting from Smartface 6.16.5 ( next release ), support for Android 7 and below will be removed. Due to lack of usage, we will be focusing on to improve the experience on newer versions.
This release contains additional VideoView features and improvements.
π§ Minimum required:β
sf-core v4.3.1 π
Android :v6.16.4 π
iOS: v6.16.5 π
UI Editor: v6.15.1
Context: v2.2.10
CLI: v6.15.7 π
IDE: v7.6.1
BlurViewβ
BlurView blurs its underlying content and draws it as a background for its children. You can access the guide with sample under this page:
BlurViewAssign rootView property to start blur (Android only).
Original Android Library: https://github.com/Dimezis/BlurView
import BlurView from "sf-core/ui/blurview";
const blurView = new BlurView({
top: 0,
left: 0,
bottom: 0,
right: 0,
});
blurView.positionType = FlexLayout.PositionType.ABSOLUTE;
blurView.android.rootView = page.layout;
blurView.ios.effectStyle = BlurView.iOS.EffectStyle.LIGHT;
page.layout.addChild(blurView);
VideoViewβ
Android
Android's VideoView component re-developed by using ExoPlayer. ExoPlayer is an application level media player for Android. It provides an alternative to Androidβs MediaPlayer API for playing audio and video both locally and over the Internet. ExoPlayer supports features not currently supported by Androidβs MediaPlayer API, including DASH and SmoothStreaming adaptive playbacks.
It also now support background mode and keeps the state of video depends on your application requirements. By using background mode, you can continue running the videos in background state.
- Typescript
this.myViewView = new VideoView({
backgroundModeEnabled: true,
onReady: () => {
this.myViewView.play();
},
onFinish: () => {
console.log(" onFinish ");
},
});
this.myViewView.android.stateSavingEnabled = false;
this.myViewView.android.customErrorMessage = "This is error message!!";
this.myViewView.android.backgroundColor = Color.RED;
this.myViewView.android.loadingIndicatorEnabled = true;
this.myViewView.android.nextButtonEnabled = false;
this.myViewView.android.fastForwardButtonEnabled = false;
this.myViewView.android.rewindButtonEnabled = false;
this.myViewView.android.previousButtonEnabled = false;
this.myViewView.android.controllerShowTimeoutMs = 1000;
this.myViewView.android.onFullScreenModeChanged = (isFullScreen) => {
console.log("onFullScreenModeChanged " + isFullScreen);
};
this.myViewView.android.onControllerVisibilityChange = (visible) => {
console.log("onControllerVisibilityChange " + visible);
};
this.myViewView.page = this;
this.myViewView.loadURL("video-url");
Cryptoβ
Client side RSA encryption is now possible with Crypto. Now, developers can implement two-way encryption by using this library.
Refer here for detailed information
Encryption & CryptographyAndroid API Level 29 Upgradeβ
Smartface's base Android framework has been upgraded to API level 29 (Android 10). There are behavioral and policy changes that should be considered when using this version.
Android 10 Behavior/Policy Changes;
- To request location in Background mode, ACCESS_BACKGROUND_LOCATION permission must be obtained.
- Starting in Android 10, apps must have the READ_PRIVILEGED_PHONE_STATE privileged permission in order to access the device's non-resettable identifiers, which include both IMEI and serial number. Below properties. (Otherwise, a SecurityException occurs)
- App cannot access
clipboard
datas anymore. In order to get the network class connectionIP & wirelessMacAddress, the permission of the user 'ACCESS_FINE_LOCATION' is required.
Image Orientation Issueβ
In Android, due to the many manufacturer, device's camera apps will behave inconsistent. Thus, the output image may result in the landscape orientation which makes it appears horizontally rotated in the ImageView. Fortunately, there are many approaches that fixes this inconsistency.
We have added two new properties; fixOrientation & maxImageSize to pickFromGallery & capturePhoto. Unfortunately, fixing the orientation takes time up to the 5 second if the developer don't limit the image size. As we recommend, set maxImageSize property if you want to use fixOrientation.
Example code:
Multimedia.capturePhoto({
onSuccess: ({ image }) => {
this.imageView1.image = image;
},
page: this,
android: {
cropShape: Multimedia.Android.CropShape.RECTANGLE,
/**
Uncomment below code and tweak with the number
if you are experiencing performance issues.
*/
// maxImageSize: 2048,
fixOrientation: true,
},
allowsEditing: true,
action: Multimedia.ActionType.IMAGE_CAPTURE,
type: Multimedia.Type.IMAGE,
ios: {
cameraDevice: Multimedia.iOS.CameraDevice.REAR,
},
});
What's new?β
[Framework] Android's VideoView component re-developed by Google's ExoPlayer.
[Framework] Added BlurView.
[Framework] Added keepScreenAwake property.
[Framework] Added headers property to WebSocket.
[Framework] Fixed hintTextColor issue on Android.
[Framework] Added CallDetection.
[Framework] Added Crypto.
[Framework] Added several new features to VideoView.
[Framework] Android targetSdk & compileSdk upgraded to API level 29\
[Framework] Added fixOrientation & maxImageSize properties to pickFromGallery & capturePhoto
[Project] Now MaterialTextBox and KeyboardLayout libraries are included by default
[Project] Now MaterialTextBox component can be used as library component
[Doc] Added BlurView guide
[Doc] Added guide for class & style usage
[Doc] Added guide to implement Dark Theme
[Doc] Added guide to handle keyboards
[Doc] Added guide for RSA Encryption
[Doc] Added tips\&tricks for battery optimization
[Doc] Added guide to use MaterialTextBox
[Doc] Added guide to know when to use applyLayout method