Skip to content

Commit 4545776

Browse files
authored
UPDATE react-native-hms-ar 2.15.0-4 (#106)
* UPDATE react-native-hms-ar 2.15.0-4
1 parent 8f9bd2c commit 4545776

71 files changed

Lines changed: 8425 additions & 6299 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

react-native-hms-ar/README.md

Lines changed: 24 additions & 706 deletions
Large diffs are not rendered by default.

react-native-hms-ar/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ repositories {
4848
dependencies {
4949
//noinspection GradleDynamicVersion
5050
implementation 'com.facebook.react:react-native:+' // From node_modules
51-
implementation 'com.huawei.hms:arenginesdk:2.13.0.4' // Hms AREngine
52-
implementation 'com.huawei.agconnect:agconnect-core:1.4.1.300'
51+
implementation 'com.huawei.hms:arenginesdk:2.15.0.4' // Hms AREngine
52+
implementation 'com.huawei.agconnect:agconnect-core:1.4.2.301'
5353
implementation 'com.huawei.hms:stats:5.0.3.301'
5454
implementation 'de.javagl:obj:0.3.0'
5555
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

react-native-hms-ar/android/gradlew

Lines changed: 33 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react-native-hms-ar/android/gradlew.bat

Lines changed: 24 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react-native-hms-ar/android/src/main/java/com/huawei/hms/plugin/ar/core/ARSetupFacade.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
2+
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
33
44
Licensed under the Apache License, Version 2.0 (the "License")
55
you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@
2828
import com.huawei.hms.plugin.ar.core.config.ARPluginConfigHand;
2929
import com.huawei.hms.plugin.ar.core.config.ARPluginConfigWorld;
3030
import com.huawei.hms.plugin.ar.core.helper.DisplayRotationManager;
31+
import com.huawei.hms.plugin.ar.core.helper.FaceListener;
3132
import com.huawei.hms.plugin.ar.core.helper.GestureEvent;
3233
import com.huawei.hms.plugin.ar.core.helper.PluginCallbackHelper;
3334
import com.huawei.hms.plugin.ar.core.helper.TextureDisplay;
@@ -99,6 +100,23 @@ public void startFace(ARPluginConfigFace config) {
99100
surfaceView.onResume();
100101
}
101102

103+
public void setEnableItem(long enableItem) {
104+
if (arConfigBase != null) {
105+
arSession.stop();
106+
arConfigBase.setEnableItem(enableItem);
107+
arSession.configure(arConfigBase);
108+
arSession.resume();
109+
}
110+
}
111+
112+
public void setFaceHealthListener (FaceListener faceHealthListener) {
113+
if (renderer instanceof ARFaceRenderer) {
114+
ARFaceRenderer faceRenderer = (ARFaceRenderer)renderer;
115+
faceRenderer.setFaceListener(faceHealthListener);
116+
arSession.addServiceListener(faceRenderer);
117+
}
118+
}
119+
102120
public void startBody(ARPluginConfigBody config) {
103121
renderer = new ARBodyRenderer(arSession, displayRotationManager, textureDisplay, config);
104122
surfaceView.setRenderer(renderer);

react-native-hms-ar/android/src/main/java/com/huawei/hms/plugin/ar/core/config/ARPluginConfigBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
2+
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
33
44
Licensed under the Apache License, Version 2.0 (the "License")
55
you may not use this file except in compliance with the License.

react-native-hms-ar/android/src/main/java/com/huawei/hms/plugin/ar/core/config/ARPluginConfigBody.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
2+
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
33
44
Licensed under the Apache License, Version 2.0 (the "License")
55
you may not use this file except in compliance with the License.

react-native-hms-ar/android/src/main/java/com/huawei/hms/plugin/ar/core/config/ARPluginConfigFace.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
2+
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
33
44
Licensed under the Apache License, Version 2.0 (the "License")
55
you may not use this file except in compliance with the License.

react-native-hms-ar/android/src/main/java/com/huawei/hms/plugin/ar/core/config/ARPluginConfigHand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
2+
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
33
44
Licensed under the Apache License, Version 2.0 (the "License")
55
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)