# hms-network-demo **Repository Path**: hms-core/hms-network-demo ## Basic Information - **Project Name**: hms-network-demo - **Description**: Network Kit示例代码,通过Demo可以体验到如何集成Network Kit,并通过两种不同的方式(HttpClient和RestClient方式 )完成同步和异步网络请求;以及如何通过集成Network Kit实现文件的上传/下载功能。 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 10 - **Forks**: 4 - **Created**: 2021-02-19 - **Last Updated**: 2025-02-12 ## Categories & Tags **Categories**: harmonyos-network **Tags**: None ## README # HUAWEI Network Kit Sample English | [中文](./README-zh.md) ## Introduction This project contains the sample code for network-url and network-filemanager of HUAWEI Network Kit. The project directory is as follows: |-- [network-url-sample](https://gitee.com/hms-core/hms-network-demo/tree/main/network-url-sample) URL network request sample |-- [network-filemanager-sample](https://gitee.com/hms-core/hms-network-demo/tree/main/network-filemanager-sample) File upload and download request sample ## Precautions 1. It is recommended that the Android SDK version be 19 or later, and the JDK version be 1.8 or later. 2. This version uses new features of Java 8, such as Lambda expressions and static API methods.In this version and later versions, the Java 8 compilation options must be added for the Gradle. Otherwise, UrlConnection will be used to send requests, causing limitations on many request capabilities. The code for adding Java 8 compilation options for Gradle is as follows: ``` compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } ``` ## Technical Support You can visit the [Reddit community](https://www.reddit.com/r/HuaweiDevelopers/) to learn latest information about HMS Core and communicate with other developers. If you have any questions about the sample code, try the following: - Visit [Stack Overflow](https://stackoverflow.com/questions/tagged/huawei-mobile-services) and submit your development problem under the `huawei-mobile-services` tag. Huawei experts will help you solve the problem in one-to-one mode. - Visit the HMS Core section in the [Huawei Developer Forum](https://forums.developer.huawei.com/forumPortal/en/forum/hms-core) and communicate with other developers. If you encounter any issues when using the sample code, submit your [issues](https://gitee.com/hms-core/hms-network-demo/issues) or submit a [pull request](https://gitee.com/hms-core/hms-network-demo/pulls).