Skip to content

Instantly share code, notes, and snippets.

package com.huawei.films.model;
import com.huawei.agconnect.cloud.database.AGConnectCloudDB;
import com.huawei.agconnect.cloud.database.CloudDBZone;
import com.huawei.agconnect.cloud.database.CloudDBZoneConfig;
import com.huawei.agconnect.cloud.database.CloudDBZoneObjectList;
import com.huawei.agconnect.cloud.database.CloudDBZoneQuery;
import com.huawei.agconnect.cloud.database.CloudDBZoneSnapshot;
import com.huawei.agconnect.cloud.database.CloudDBZoneTask;
import com.huawei.agconnect.cloud.database.ListenerHandler;
apply plugin: 'com.android.application'
apply plugin: 'com.huawei.agconnect'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
// Top-level build file where you can add configuration options common to all sub-projects/modules.
allprojects {
repositories {
google()
jcenter()
maven {url 'https://developer.huawei.com/repo/'}
}
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2019-2019. All rights reserved.
* Generated by the CloudDB ObjectType compiler. DO NOT EDIT!
*/
package com.huawei.films.model;
import com.huawei.agconnect.cloud.database.CloudDBZoneObject;
import com.huawei.agconnect.cloud.database.annotations.PrimaryKey;
/**
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2019-2019. All rights reserved.
* Generated by the CloudDB ObjectType compiler. DO NOT EDIT!
*/
package com.huawei.films.model;
import com.huawei.agconnect.cloud.database.ObjectTypeInfo;
import java.util.Arrays;
public class ObjectTypeInfoHelper {
package com.huawei.films.view;
import android.app.Application;
import com.huawei.films.model.CloudDBZoneWrapper;
public class CloudDBQuickStartApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
CloudDBZoneWrapper.initAGConnectCloudDB(this);
package com.huawei.films.view;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.huawei.films.R;
public class DetailActivity extends AppCompatActivity {
package com.huawei.films.view;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
package com.huawei.films.view;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.huawei.films.R;