Skip to content

Instantly share code, notes, and snippets.

"module": { "reqPermissions": [
{
"name": "ohos.permission.LOCATION"
},
{
"name": "ohos.permission.GET_WIFI_INFO"
},
{
"name": "ohos.permission.SET_WIFI_INFO"
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:shape="rectangle">
<corners
ohos:radius="20"/>
<solid
ohos:color="#1E7D13"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<DirectionalLayout
xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:height="match_parent"
ohos:width="match_parent"
ohos:alignment="center"
ohos:orientation="vertical">
<Text
ohos:id="$+id:deepLink"
package com.hms.applinkingharmonydemo.slice;
import com.hms.applinkingharmonydemo.ResourceTable;
import com.huawei.agconnect.applinking.AppLinking;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.aafwk.content.Operation;
import ohos.agp.components.Button;
import ohos.agp.components.Text;
import ohos.agp.window.dialog.ToastDialog;
apply plugin: 'com.huawei.agconnect'
implementation 'com.huawei.agconnect:agconnect-applinking:1.4.2.301'
classpath 'com.huawei.agconnect:agcp-harmony:1.1.0.200'
maven {
url 'https://developer.huawei.com/repo/'
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:shape="rectangle">
<corners
ohos:radius="20"/>
<solid
ohos:color="#1E7D13"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<DirectionalLayout
xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:height="match_parent"
ohos:width="match_parent"
ohos:alignment="center"
ohos:margin="20vp"
ohos:orientation="vertical">
<Button
package com.hms.crashkitharmony.slice;
import com.hms.crashkitharmony.ResourceTable;
import com.huawei.agconnect.crash.AGConnectCrash;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Button;
import ohos.agp.components.Component;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;
apply plugin: 'com.huawei.agconnect'
implementation 'com.huawei.agconnect:agconnect-crash-harmony:1.1.0.200'