Release Notes, 6.16.4

Deprecation Warning

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:

Assign 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
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

Android 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