Skip to content

A sample news app shows how to integrate the capabilities of HMS Core into news & reading apps.

License

Notifications You must be signed in to change notification settings

HMS-Core/hms-news-demo

Repository files navigation

HMS Core News Demo App

中文|English| Overview | Download | Features | Application Generation | Service Introduction | Technical Support | Licensing and Terms

Overview

The HMS Core news demo app demonstrates the process from releasing news through to display and consumption. This demo will help you learn how to integrate the capabilities of HMS Core into news apps and in which scenarios can these capabilities, like ML Kit, Push Kit, and Account Kit, play a part.

HMS Core provides an innovative solution for news apps to improve user experience, boost user engagement, and achieve sustainable business growth.

Download

Firstly choose the area you are in, then you can use a browser to scan the QR code and download a local version of the demo app.

China

Asia, Africa, and Latin America

Europe

Russia

Features

The HMS Core news demo app includes the major functions of news apps, such as:

  • Recommended news articles

  • News by category

  • Video

  • Audio narration

  • Editing and publishing news

  • Voice Search

  • Saving news to favorites and sharing them

  • Reading history

  • News push

  • One-tap sign-in and sign-out

  • Membership purchase

  • Ads display

Application Generation

Environment Requirement

  • Android Studio: 4.1
  • Android SDK: 26
  • Gradle: 6.3

Run locally

  1. Clone the repository:

     git clone https://github.com/HMS-Core/hms-news-demo.git
    

You can also download the ZIP package that contains the project.

  1. Copy JKS file and agconnect-services.json to the app directory. For details about how to generate the files, please refer to Configuring App Information in AppGallery Connect.

  2. Update JKS file information and app ID in app/build.gradle file.

  3. Cloud Storage is used in the demo. As Cloud Storage is still in beta, you need to send an email to agconnect@huawei.com to reqeust to enable this service.

  4. Build the application from the command line:

     cd hms-news-demo
     gradle clean
     gradle build
    

Service Introduction

  • Account Kit allows your users to quickly sign in to your app with their HUAWEI IDs. These IDs will be used for as long as the users use your app.

    AccountKit

  • Ads Kit enables ads display. When your app is launched, this kit is called and the app will display a splash ad. When a user browses news on your app, the native ad is displayed in the feed, and before videos are played, a pre-roll ad will appear.

    AdsKitAdsKit

    AdsKit

  • When a user follows an account on your app, Push Kit is called to push another news story published by the same account.

  • Video Kit provides video-related functions, including video playback/pause, progress bar dragging, and full-screen playback.

    VideoKit

  • Location Kit helps you obtain user location to display local news.

  • ML Kit supports image super-resolution, text translation, and audio narration.

    MLKitMLKitMLKit

  • Image Kit can be used to edit images in the news editing scenarios, including image cropping and adding filters and stickers.

    ImageKit

  • App Linking allows your users to share news with their friends.

    AppLinking

  • In-App Purchases allows your users to purchase membership services and provides them with membership rights.

    IAPKit

  • Analytics Kit can obtain statistics about news consumption (loading and reading) so that you can analyze the app usage data and optimize the app accordingly.

Precautions

  • Purchasing subscriptions in the app will deduct money from the user's account. But the deduction will be refunded immediately.
  • This app allows users to sign in using their HUAWEI IDs and obtains the profiles and names of their accounts for in-app display.
  • All ads in the app are test ads.

Technical Support

If you want to evaluate more about HMS Core, HMS Core 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 the sample project, 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 sample project, please submit an issue to the Repository. Even better you can submit a Pull Request with a fix.

Licensing and Terms

The HMS Core News Demo App is licensed under the Apache 2.0 license.

About

A sample news app shows how to integrate the capabilities of HMS Core into news & reading apps.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages