Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hms-core/hms-awareness-demo
HUAWEI Awareness Kit provides your app with the ability to obtain contextual information including users' current time, location, behavior, audio device status, ambient light, weather, and nearby beacons. Your app can gain insight into a user's current situation more efficiently, making it possible to deliver a smarter, more considerate user experience.
https://github.com/hms-core/hms-awareness-demo
android awareness consciousness geofence hms java
Last synced: about 2 months ago
JSON representation
HUAWEI Awareness Kit provides your app with the ability to obtain contextual information including users' current time, location, behavior, audio device status, ambient light, weather, and nearby beacons. Your app can gain insight into a user's current situation more efficiently, making it possible to deliver a smarter, more considerate user experience.
- Host: GitHub
- URL: https://github.com/hms-core/hms-awareness-demo
- Owner: HMS-Core
- License: apache-2.0
- Created: 2020-05-18T03:19:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-02T08:17:31.000Z (almost 3 years ago)
- Last Synced: 2024-04-16T12:54:17.065Z (10 months ago)
- Topics: android, awareness, consciousness, geofence, hms, java
- Language: Java
- Homepage: https://developer.huawei.com/consumer/en/hms/huawei-awarenesskit?ha_source=hms1
- Size: 771 KB
- Stars: 13
- Watchers: 12
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HMS AwarenessKit Demo
## Contents
- [Overview](#overview)
- [Getting Started](#getting-started)
- [Running Environment](#running-environment)
- [Sample Code](#sample-code)
- [Result](#result)
- [License](#license)## Overview
The sample code shows how to use the Capture API and Barrier API of HUAWEI Awareness Kit for quick integration.
[Introduction of HMS Awareness Kit.](https://developer.huawei.com/consumer/en/hms/huawei-awarenesskit)
## Getting Started
This sample uses the Gradle build system.
First download the demo by cloning this repository or downloading an archived snapshot.
Check whether the Android studio development environment is ready. Open the sample code project directory with file "build.gradle" in Android Studio.
To compile and run sample code , you should create an app in AppGallery Connect, change the sample package name to your app package name, and place the agconnect-services.json file and signing certificate under the app directory. For details, please refer to [Preparations](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/config-agc-0000001050033101).
## Running Environment
Android Studio and JDK 1.8 are used for coding.
Run the app generated by the sample code on the device which have installed Huawei Mobile Service(HMS).
## Sample Code
The HUAWEI Awareness Kit sample code includes Capture and Barrier API sample code.
Capture APIs can be called to obtain the time, headset, location, activity, ambient light, weather, bluetooth car stereo, and beacon status.
Capture APIs allow your app to request the status of a user. For example, the getHeadsetStatus() API can be used to obtain connection status of the headset.For details about Capture APIs, please visit the [References of the Capture APIs.](https://developer.huawei.com/consumer/en/doc/development/HMSCore-References/awareness-captureclient-0000001050164395)
Barrier APIs can be called to implement awareness of the time, headset, location, activity, ambient light, Bluetooth car stereo, and beacon status.
Barrier APIs allow your app to set a series of awareness states. When a user enters a set state, Awareness Kit triggers the corresponding callback to notify the app. For example, the LocationBarrier.enter() API can be used to create a geo-fence.When the user enters the area specified by the geo-fence, Awareness Kit triggers the corresponding callback to notify the app.For details about Barrier APIs, please visit the [References of the Barrier APIs.](https://developer.huawei.com/consumer/en/doc/development/HMSCore-References/awareness-barrierclient-0000001050162440)
[Other Awareness Kit API References.](https://developer.huawei.com/consumer/en/doc/development/HMSCore-References/awareness-overview-0000001050162436)
## Result
## Question or issues
If you want to evaluate more about HMS Core, [r/HMSCore on Reddit](https://www.reddit.com/r/HuaweiDevelopers/) is for you to keep up with latest news about HMS Core, and to exchange insights with other developers.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`.
- [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.If you run into a bug in our samples, please submit an [issue](https://github.com/HMS-Core/hms-awareness-demo/issues) to the Repository. Even better you can submit a [Pull Request](https://github.com/HMS-Core/hms-awareness-demo/pulls) with a fix.
## License
HUAWEI Awareness Kit sample is licensed under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0).