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 {
google()
jcenter()
maven { url 'http://developer.huawei.com/repo/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
classpath 'com.huawei.agconnect:agcp:1.3.1.300'

}
}

allprojects {
repositories {
google()
jcenter()
maven { url 'http://developer.huawei.com/repo/' }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'com.android.application'
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'), 'proguard-rules.pro'
}
}
}

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:1.0.11.302'
implementation 'com.huawei.agconnect:agconnect-auth:1.4.1.300'
implementation 'com.huawei.hms:hwid:5.3.0.302'
implementation 'com.huawei.hms:ads-lite:13.4.30.307'
implementation 'com.huawei.agconnect:agconnect-remoteconfig:1.6.0.300'
implementation 'com.huawei.hms:hianalytics:5.0.3.300'
implementation 'com.huawei.agconnect:agconnect-crash:1.4.1.300'



}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hms.alarmapp">

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

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name=".MyAlarm"
android:enabled="true"
android:exported="true" />
</application>

</manifest>

--

--

--

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