Intermediate: ToDo Task Scheduler in Huawei Mobile Service Based Android App

  1. Sign In and Create or Choose a project on AppGallery Connect portal.
  1. Create A New Project.
buildscript {

repositories {
maven { url '' }
dependencies {
classpath ''
classpath 'com.huawei.agconnect:agcp:'


allprojects {
repositories {
maven { url '' }

task clean(type: Delete) {
delete rootProject.buildDir
apply plugin: ''
apply plugin: 'com.huawei.agconnect'

android {
compileSdkVersion 30
buildToolsVersion "29.0.3"

defaultConfig {
applicationId "com.hms.alarmapp"
minSdkVersion 27
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), ''

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

//HMS Kits
api 'com.huawei.hms:dynamicability:'
implementation 'com.huawei.agconnect:agconnect-auth:'
implementation 'com.huawei.hms:hwid:'
implementation 'com.huawei.hms:ads-lite:'
implementation 'com.huawei.agconnect:agconnect-remoteconfig:'
implementation 'com.huawei.hms:hianalytics:'
implementation 'com.huawei.agconnect:agconnect-crash:'

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""

<uses-permission android:name="android.permission.WAKE_LOCK" />

<activity android:name=".MainActivity">
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
android:exported="true" />





Android Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Building My First MVVM With Kotlin Coroutines

React-Native Generate a release mode APK to publish on Play Store.

How to install Android App over wifi in Android Studio?

How to Reduce your Android release App size, up to 47% or even more — React Native

Material Component- Text Fields

How to zoom in or zoom out MatLab editor in MatLab via editor or script ?

How to create a rolling dice animation in Android using MotionLayout

Kotlin Dependency Injection with Hilt

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Manoj Kumar

Manoj Kumar

Android Developer

More from Medium

Intermediate: Know Your Doctor using Huawei Kits (Account, Crash and Analytics) in Android App.

How to Implement a Voice Changer Capability

Secure Data in Android Room DataBase

Lenskart Stories: Firebase and Custom Traces