Giter Site home page Giter Site logo

mike-mei / hms-analytics-demo-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hms-core/hms-analytics-demo-android

0.0 0.0 0.0 209 KB

HmsAnalyticsKitDemo is a app that applying HUAWEI Hianalytics SDK used for showing how to collect user engagement and user preference.

Home Page: https://developer.huawei.com/consumer/en/hms/huawei-analyticskit?ha_source=hms1

License: Apache License 2.0

Java 57.66% Kotlin 42.34%

hms-analytics-demo-android's Introduction

HMS AnalyticsKit Demo for Android

hms

English | δΈ­ζ–‡

Table of Contents

Introduction

Hmsanalyticskitdemo provides an example of integrating HUAWEI Analytics Kit with an app. It illustrates how to collect predefined events and custom events to improve user engagement and user preference. Read more about Hianalytics.

Getting Started

For more development guidance, please refer to the links below:

Development Guide.

API References.

In this example, we demonstrate how to use the analytics SDK for Android by using the Gradle build system.

First download Hmsanalyticskitdemo by cloning this repository or downloading an archived snapshot.

In Android Studio, click Open an existing Android Studio project, and select analytics-sample.

You can use the gradlew build command to build the project directly.

You should create an app in AppGallery Connect, and obtain the agconnect-services.json file and add it to the project. You should also generate a signing certificate fingerprint and add the certificate file to the project, and add configuration to the build.gradle file. More to Development Process.

Installation

Use Android Studio to open the decompressed project.

Configuration

  1. Create an app in AppGallery Connect and obtain the project configuration file agconnect-services.json. In Android Studio, switch to the Project view and move the agconnect-services.json file to the root directory of the app.
  2. Change the value of applicationId in the build.gradle file of the app to the name of the app package applied for in the preceding step.

Environment requirements

Hardware requirements:

  1. A computer (desktop or laptop)
  2. A Huawei phone, which is used to debug the developed app

Software requirements:

  1. HUAWEI Analytics Kit 5.1.0
  2. Android SDK applicable to devices using Android 4.4 KitKat (API level 19) and later versions
  3. Android Studio
  4. Java JDK 1.7 (JDK 1.8 is recommended.)

Result

After running the app you should see a screen like this:

Click TRUE or FALSE to answer the question; Click NEXT to show the next question; Click POST SCORE, log the score user got. All the information will be uploaded to the Hianalytics Console, and you can see these information in real time using Debug View.

Click button SETTINGS:

When you click SETTINGS, you will be asked for your favorite sport. Your choice will be logged by Hianalytics as a user attribute.

Question or issues

If you want to evaluate more about HMS Core, r/HMSCore on Reddit 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 is the best place for any programming questions. Be sure to tag your question with huawei-mobile-services.
  • Huawei Developer Forum 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 to the Repository. Even better you can submit a Pull Request with a fix.

License

HmsAnalyticsKitDemo is licensed under the Apache License, version 2.0.

hms-analytics-demo-android's People

Contributors

iris156 avatar mike-mei avatar ywx994945 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.