Skip to content

Commit d7b47ba

Browse files
authored
UPDATE flutter-hms-nearbyservice 6.4.0+300
1 parent 8a949e0 commit d7b47ba

File tree

92 files changed

+1911
-1914
lines changed

Some content is hidden

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

92 files changed

+1911
-1914
lines changed
+18-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
1+
## 6.4.0+300
2+
3+
- **Breaking Change:** With this release, `NearbyPermissionHandler` has been removed. You are expected to handle required permissions on your own. You can learn more about the required permissions from our [official documentations](https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/dev-process-0000001073825475?ha_source=hms1)
4+
- Deleted the capability of prompting users to install HMS Core (APK).
5+
- Supported the new Bluetooth permissions in Android 12.
6+
17
## 6.1.0+300
2-
* Added the requestConnectEx(String name, String endpointId, ConnectOption) method to the HMSDiscoveryEngine class.
3-
* Added the getChannelPolicy() method to the ConnectResult class.
4-
* Added the ConnectOption and ChannelPolicy classes.
5-
* Added the STATUS_WIFI_NOT_SUPPORT_SHARE, STATUS_WIFI_MUST_BE_ENABLED, and STATUS_ANDROID_HMS_RESTRICTED error codes.
6-
* Modified the ConnectResult(Status) build method in the ConnectResult class to ConnectResult(Status, ChannelPolicy).
7-
* Deprecated the requestConnect(String name, String endpointId) method in the HMSDiscoveryEngine class.
8-
* Migrated to null-safety.
8+
9+
- Added the requestConnectEx(String name, String endpointId, ConnectOption) method to the HMSDiscoveryEngine class.
10+
- Added the getChannelPolicy() method to the ConnectResult class.
11+
- Added the ConnectOption and ChannelPolicy classes.
12+
- Added the STATUS_WIFI_NOT_SUPPORT_SHARE, STATUS_WIFI_MUST_BE_ENABLED, and STATUS_ANDROID_HMS_RESTRICTED error codes.
13+
- Modified the ConnectResult(Status) build method in the ConnectResult class to ConnectResult(Status, ChannelPolicy).
14+
- Deprecated the requestConnect(String name, String endpointId) method in the HMSDiscoveryEngine class.
15+
- Migrated to null-safety.
916

1017
## 5.0.4+303
11-
* Updated HMSLogger.
18+
19+
- Updated HMSLogger.
1220

1321
## 5.0.4+302
14-
* Initial release.
22+
23+
- Initial release.

flutter-hms-nearbyservice/README.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
# Huawei Nearby Service Flutter Plugin
1+
<p align="center">
2+
<h1 align="center">Huawei Nearby Service Flutter Plugin</h1>
3+
</p>
4+
5+
<p align="center">
6+
<a href="https://pub.dev/packages/huawei_nearbyservice"><img src="https://img.shields.io/pub/v/huawei_nearbyservice?style=for-the-badge" alt="pub.dev version"></a>
7+
</p>
8+
9+
---
210

311
## Introduction
412

@@ -15,20 +23,20 @@ Nearby Data Communication allows devices to easily discover nearby devices and s
1523
- Nearby Wi-Fi Sharing
1624

1725
Provides the Wi-Fi configuration sharing function to help users connect their own or friends' smart devices to the Wi-Fi network in one-click mode.
18-
[Learn More](https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides-V1/introduction-0000001074107546-V1)
26+
[Learn More](https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides-V1/introduction-0000001074107546-V1?ha_source=hms1)
1927

2028
## Installing the Plugin
2129

2230
Add dependencies to the pubspec.yaml file of the Flutter project.
23-
huawei_nearbyservice: ^6.1.0+300
31+
huawei_nearbyservice:
2432
Run the following command on the Terminal page or click Pub get in Android Studio to add dependencies.
2533
flutter pub get
26-
For more details, please refer to [Getting Started with Flutter](https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides-V1/prepare-dev-env-0000001074265856-V1)
34+
For more details, please refer to [Getting Started with Flutter](https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides-V1/prepare-dev-env-0000001074265856-V1?ha_source=hms1)
2735

2836
## Development Guide
2937

30-
- [Guides](https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/dev-process-0000001073825475)
31-
- [Reference](https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-References/overview-0000001074428872)
38+
- [Guides](https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/dev-process-0000001073825475?ha_source=hms1)
39+
- [Reference](https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-References/overview-0000001074428872?ha_source=hms1)
3240

3341
## License
3442

flutter-hms-nearbyservice/android/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
.DS_Store
77
/build
88
/captures
9+
.cxx

flutter-hms-nearbyservice/android/build.gradle

+14-11
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version '1.0'
44
buildscript {
55
repositories {
66
google()
7-
jcenter()
7+
mavenCentral()
88
maven { url 'https://developer.huawei.com/repo/' }
99
}
1010

@@ -16,29 +16,32 @@ buildscript {
1616
rootProject.allprojects {
1717
repositories {
1818
google()
19-
jcenter()
19+
mavenCentral()
2020
maven { url 'https://developer.huawei.com/repo/' }
2121
}
2222
}
2323

2424
apply plugin: 'com.android.library'
2525

2626
android {
27-
compileSdkVersion 29
28-
buildToolsVersion "29.0.3"
27+
compileSdkVersion 30
28+
buildToolsVersion "30.0.3"
29+
30+
compileOptions {
31+
sourceCompatibility JavaVersion.VERSION_1_8
32+
targetCompatibility JavaVersion.VERSION_1_8
33+
}
34+
2935
defaultConfig {
3036
minSdkVersion 21
31-
targetSdkVersion 29
37+
targetSdkVersion 30
3238
}
39+
3340
lintOptions {
3441
disable 'InvalidPackage'
3542
}
36-
compileOptions {
37-
sourceCompatibility JavaVersion.VERSION_1_8
38-
targetCompatibility JavaVersion.VERSION_1_8
39-
}
4043
}
4144

4245
dependencies {
43-
implementation 'com.huawei.hms:nearby:6.1.0.300'
44-
}
46+
implementation 'com.huawei.hms:nearby:6.4.0.300'
47+
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536M
2-
android.enableR8=true
32
android.useAndroidX=true
43
android.enableJetifier=true
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,41 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.huawei.hms.flutter.nearbyservice">
3-
<!-- Permission fo HMS Logger -->
2+
xmlns:tools="http://schemas.android.com/tools"
3+
package="com.huawei.hms.flutter.nearbyservice">
4+
5+
<!-- Permission to access the Internet -->
6+
<uses-permission android:name="android.permission.INTERNET " />
7+
<!-- Permission for HMS Logger -->
48
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
5-
<!-- Mandatory permissions for Nearby Connection -->
6-
<uses-permission android:name="android.permission.BLUETOOTH" />
7-
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
9+
10+
<!-- Permission to check Wi-Fi status -->
811
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
12+
<!-- Permission to change Wi-Fi status -->
913
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
14+
15+
<!-- Permission to obtain a coarse device location -->
1016
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
17+
<!-- Permission to obtain the accurate device location -->
1118
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
12-
<!-- Read permission, which is mandatory for sending files -->
19+
20+
<!-- Permission to read external storage -->
1321
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
14-
<!--Write permission-->
15-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
22+
<!-- Permission to write data to external storage -->
23+
<uses-permission
24+
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
25+
tools:ignore="ScopedStorage" />
26+
27+
<!-- Bluetooth permissions -->
28+
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
29+
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
30+
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
31+
<!-- Request legacy Bluetooth permissions on older devices -->
32+
<uses-permission
33+
android:name="android.permission.BLUETOOTH"
34+
android:maxSdkVersion="30" />
35+
<uses-permission
36+
android:name="android.permission.BLUETOOTH_ADMIN"
37+
android:maxSdkVersion="30" />
1638

17-
<!--For Android 10-->
18-
<application android:requestLegacyExternalStorage="true"></application>
39+
<!-- For Android 10 -->
40+
<application android:requestLegacyExternalStorage="true" />
1941
</manifest>

0 commit comments

Comments
 (0)