Skip to content

Commit

Permalink
UPDATE cordova-plugin-hms-ml 2.0.5-301 (#45)
Browse files Browse the repository at this point in the history
* UPDATE cordova-plugin-hms-ml 2.0.5-301
  • Loading branch information
aktug authored Apr 30, 2021
1 parent fbab887 commit 6f1f39a
Show file tree
Hide file tree
Showing 447 changed files with 9,793 additions and 5,967 deletions.
5,032 changes: 35 additions & 4,997 deletions cordova-plugin-hms-ml/README.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions cordova-plugin-hms-ml/example/cordova/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ This demo application demonstrates the usage of the HMS ML Kit Cordova plugin.

## 2. Installation Guide

Before you get started, you must register as a HUAWEI Developer and complete identity verification on the [HUAWEI Developer](https://developer.huawei.com/consumer/en/) website. For details, please refer to [Register a HUAWEI ID](https://developer.huawei.com/consumer/en/doc/10104).
Before you get started, you must register as a HUAWEI Developer and complete identity verification on the [HUAWEI Developer](https://developer.huawei.com/consumer/en/?ha_source=hms1) website. For details, please refer to [Register a HUAWEI ID](https://developer.huawei.com/consumer/en/doc/10104?ha_source=hms1).

### 2.1. Creating a Project in AppGallery Connect

Creating an app in AppGallery Connect is required in order to communicate with the Huawei services. To create an app, perform the following steps:

1. Sign in to [AppGallery Connect](https://developer.huawei.com/consumer/en/service/josp/agc/index.html) and select **My projects**.
1. Sign in to [AppGallery Connect](https://developer.huawei.com/consumer/en/service/josp/agc/index.html?ha_source=hms1) and select **My projects**.
2. Select your project from the project list or create a new one by clicking the **Add Project** button.
3. Go to **Project Setting** > **General information**, and click **Add app**.
- If an app exists in the project and you need to add a new one, expand the app selection area on the top of the page and click **Add app**.
4. On the **Add app** page, enter the app information, and click **OK**.

### 2.2. Configuring the Signing Certificate Fingerprint and Obtaining agconnect-services.json

A signing certificate fingerprint is used to verify the authenticity of an app when it attempts to access an HMS Core (APK) through the HMS SDK. Before using the HMS Core (APK), you must locally generate a signing certificate fingerprint and configure it in the **AppGallery Connect**. You can refer to 3rd and 4th steps of [Generating a Signing Certificate](https://developer.huawei.com/consumer/en/codelab/HMSPreparation/index.html#2) Codelab tutorial for the certificate generation. Perform the following steps after you have generated the certificate.
A signing certificate fingerprint is used to verify the authenticity of an app when it attempts to access an HMS Core (APK) through the HMS SDK. Before using the HMS Core (APK), you must locally generate a signing certificate fingerprint and configure it in the **AppGallery Connect**. You can refer to 3rd and 4th steps of [Generating a Signing Certificate](https://developer.huawei.com/consumer/en/codelab/HMSPreparation/index.html?ha_source=hms1#2) Codelab tutorial for the certificate generation. Perform the following steps after you have generated the certificate.

1. Sign in to [AppGallery Connect](https://developer.huawei.com/consumer/en/service/josp/agc/index.html) and select your project from **My Projects**. Then go to **Project Setting** > **General information**. In the **App information** field, click the icon next to SHA-256 certificate fingerprint, and enter the obtained **SHA-256 certificate fingerprint**.
1. Sign in to [AppGallery Connect](https://developer.huawei.com/consumer/en/service/josp/agc/index.html?ha_source=hms1) and select your project from **My Projects**. Then go to **Project Setting** > **General information**. In the **App information** field, click the icon next to SHA-256 certificate fingerprint, and enter the obtained **SHA-256 certificate fingerprint**.
2. After completing the configuration, click **OK** to save the changes. (Check mark icon)
3. In the same page, click **agconnect-services.json** button to download the configuration file.

Expand Down Expand Up @@ -69,7 +69,7 @@ A signing certificate fingerprint is used to verify the authenticity of an app w
7. Add **`keystore(.jks)`** and **`build.json`** files to your project's root directory.

- You can refer to 3rd and 4th steps of [Generating a Signing Certificate](https://developer.huawei.com/consumer/en/codelab/HMSPreparation/index.html#2) Codelab tutorial page for generating keystore file.
- You can refer to 3rd and 4th steps of [Generating a Signing Certificate](https://developer.huawei.com/consumer/en/codelab/HMSPreparation/index.html?ha_source=hms1#2) Codelab tutorial page for generating keystore file.

- Fill **`build.json`** file according to your keystore. For example:

Expand Down Expand Up @@ -142,8 +142,8 @@ If you have questions about how to use HMS samples, try the following options:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/huawei-mobile-services) is the best place for any programming questions. Be sure to tag your question with **`huawei-mobile-services`**.
- [GitHub](https://github.com/HMS-Core/hms-cordova-plugin) is the official repository for these plugins, You can open an issue or submit your ideas.
- [Huawei Developer Forum](https://forums.developer.huawei.com/forumPortal/en/home?fid=0101187876626530001) HMS Core Module is great for general questions, or seeking recommendations and opinions.
- [Huawei Developer Docs](https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin) is place to official documentation for all HMS Core Kits, you can find detailed documentations in there.
- [Huawei Developer Forum](https://forums.developer.huawei.com/forumPortal/en/home?fid=0101187876626530001&ha_source=hms1) HMS Core Module is great for general questions, or seeking recommendations and opinions.
- [Huawei Developer Docs](https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin?ha_source=hms1) is place to official documentation for all HMS Core Kits, you can find detailed documentations in there.
If you run into a bug in our samples, please submit an issue to the [GitHub repository](https://github.com/HMS-Core/hms-cordova-plugin).
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-ml/example/cordova/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="<package_name>" version="2.0.5-300" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="<package_name>" version="2.0.5-301" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>cordova-hms-mlkit-demo</name>
<description>
A sample Apache Cordova application that demonstarates the usage of cordova-plugin-hms-mlkit.
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-ml/example/cordova/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cordova-hms-ml-demo",
"displayName": "HMSMLDemo",
"version": "2.0.5-300",
"version": "2.0.5-301",
"description": "A sample Apache Cordova application that demonstrates the usage of cordova-plugin-hms-ml",
"license": "Apache-2.0",
"licenseFilename": "LICENCE",
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-ml/example/cordova/www/aft.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Expand Down
11 changes: 5 additions & 6 deletions cordova-plugin-hms-ml/example/cordova/www/asr.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -57,14 +57,13 @@
</p>
</div>

<button style="margin-left: 200px; margin-top: 50px;" id="asrAnalyserStart">
<div class="servicesDiv" id="servicesDiv">

<button style="margin-top: 30px;" id="asrAnalyserStart">
<div style="background-color: #f9e8ea;"class="servicesDiv" id="servicesDiv">
<div>
<img class="servicesImg" src="img/icon_record.png" alt="">
</div>
<div style="margin-top: 15px;">
<label style="left: 20px;" class="servicesImgText" for="text">Speak</label>
<div style="margin-top: 20px;">
<label style=" margin-top: 55px; left: 15px;" class="servicesImgText" for="text">Speak</label>
</div>
</div>
</button>
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-ml/example/cordova/www/bcr.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-ml/example/cordova/www/classify.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Expand Down
29 changes: 19 additions & 10 deletions cordova-plugin-hms-ml/example/cordova/www/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ body {
-webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
-webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
-webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
background-color:#E4E4E4;
background-color:#ffffff;
background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
font-family: system-ui, -apple-system, -apple-system-font, 'Segoe UI', 'Roboto', sans-serif;
font-size:12px;
Expand Down Expand Up @@ -85,7 +85,7 @@ h1 {
}

.event.received {
background-color:#4B946A;
background-color:#f7ded8;
display:none;
}

Expand Down Expand Up @@ -143,8 +143,10 @@ h1 {
.btn {
margin-top: 5px;
display: block;
background-color: cornflowerblue;
color: white;
border: 1px;
border-color: #b01228;
background-color: whitesmoke;
color: #c4142c;
width: 100%;
height: 50px;
border: none;
Expand All @@ -157,8 +159,8 @@ h1 {

.mllogo {
text-align: center;
margin-top: 20px;
margin-bottom: 30px;
margin-top: 10px;
margin-bottom: 15px;
}

.imgDiv {
Expand All @@ -177,7 +179,7 @@ h1 {
border: 1px solid gray;
border-radius: 5px;
position: relative;
background-color: honeydew;
background-color: #f9e8ea;
}

.servicesImg {
Expand All @@ -191,9 +193,14 @@ h1 {
}

.servicesImgText {
height: 50px;
width: 70px;
position: absolute;
left: 30px;
bottom: 1px;
left: 10px;
top: 5px;
margin: auto;
text-align: center;
color:black;
}

.newPageHref {
Expand All @@ -204,6 +211,7 @@ h1 {
.divText {
border: 2px solid black;
padding: 5px;
margin: 5px;
}

input[type=text] {
Expand All @@ -216,6 +224,7 @@ input[type=text] {
display: inline-block;
width: 60px;
height: 34px;
color:#b01228;
}

.switch input {
Expand Down Expand Up @@ -249,7 +258,7 @@ input[type=text] {
}

input:checked+.slider {
background-color: #2196F3;
background-color: #c4142c;
}

input:focus+.slider {
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-ml/example/cordova/www/custommodel.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-ml/example/cordova/www/doc.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-ml/example/cordova/www/face.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-ml/example/cordova/www/formrecog.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-ml/example/cordova/www/gcr.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified cordova-plugin-hms-ml/example/cordova/www/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed cordova-plugin-hms-ml/example/cordova/www/img/ml.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
2 changes: 1 addition & 1 deletion cordova-plugin-hms-ml/example/cordova/www/imgseg.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-ml/example/cordova/www/imgseglive.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 6f1f39a

Please sign in to comment.