# Android File Storage App -------------------------------------------------------------------------------- title: "Introduction" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.695Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/introduction/" service: "All Services" related: - Android SDK (/en/sdk/android/v2/overview/) - Android Kotlin (https://kotlinlang.org/) -------------------------------------------------------------------------------- # Android File Storage App ### Introduction This tutorial will help you build an Android file storage application called **ZCDrive**, which stores files securely. You will be able to upload files in the app, and view, delete, or download them from the app's interface. The Android app will be associated with a Catalyst project that will enable you to use of our secure cloud storage component, {{%link href="/en/cloud-scale/help/stratus/introduction/" %}}Catalyst Cloud Scale Stratus{{%/link%}} and a few other components. When you upload or delete a file from the app, the actions will be synchronized in the {{%link href="/en/cloud-scale/help/stratus/buckets/name-bucket/" %}}Stratus bucket{{%/link%}} in your Catalyst project. This association will be handled by {{%link href="/en/sdk/android/v2/overview/" %}}Catalyst's Android SDK{{%/link%}}. We will register the Android package with the Catalyst project and include the SDK in the app's source code. The ZCDrive app will be built on the {{%link href="https://kotlinlang.org/" %}}Kotlin development platform{{%/link%}}. Kotlin is a cross-platform, lightweight, concise programming language that is fully interoperable with Java in Android application building. Catalyst Android SDK offers support for both Java and Kotlin, and enables you to build robust apps on either platform. We will work with Android Studio to build the app, and perform a manual test on it using an emulated device in the IDE. The final application will look like this: <br /> You can access a working application's final source code from {{%link href="https://github.com/catalystbyzoho/tutorial-zcdrive-android" %}}**this GitHub repository**{{%/link%}}. {{%note%}}{{%bold%}}Note:{{%/bold%}} You can learn about the fundamentals of Android application building and developing Android apps with Kotlin from the {{%link href="https://developer.android.com/docs" %}}official Android documentation{{%/link%}} and {{%link href="https://developer.android.com/kotlin" %}}Android's Kotlin documentation{{%/link%}}.{{%/note%}} The ZCDrive app uses the following Catalyst components and the features they provide: 1. {{%link href="/en/cloud-scale/getting-started/introduction/" %}}**Catalyst Cloud Scale**{{%/link%}}: - {{%link href="/en/cloud-scale/help/data-store/introduction" %}}Data Store{{%/link%}}: We will create a table to store the metadata of the files that are stored in the app, such as the file name, uploaded time, file type, etc. - {{%link href="/en/cloud-scale/help/stratus/introduction/" %}}Stratus{{%/link%}}: We will create a folder in the File Store to store the files uploaded through the mobile app. - {{%link href="/en/cloud-scale/help/authentication/introduction/" %}}Authentication{{%/link%}}: The app enables you to sign up for an account and log in to it to store your files securely. ZCDrive will not include any Catalyst fundamental components such as the {{%link href="/en/serverless/help/functions/introduction/" %}}Catalyst Serverless Functions{{%/link%}} or the {{%link href="/en/cloud-scale/help/web-client-hosting/introduction/" %}}Catalyst Cloud Scale Web Client Hosting{{%/link%}}. You will be given the files to be included in your app's source, with their code configured. You will just have to replace the given files with the existing files present in your app's directory, as directed. -------------------------------------------------------------------------------- title: "Prerequisites" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.695Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/prerequisites/" service: "All Services" related: - Android SDK (/en/sdk/android/v2/introduction) -------------------------------------------------------------------------------- # Prerequisites Before you begin building the application, you must have the following prerequisite installed on your system: #### Android Studio Android Studio is the official IDE for Android application development, as recognized by Google. We will create a project in Android Studio and code the app. The Android project and the IDE must meet these minimum supported environments: * Android Studio- 3.1.1 or later * Minimum SDK - API 26: Android 5.0 (Lollipop) * Language : Kotlin DSL * Gradle- 3.4.0 You can {{%link href="https://developer.android.com/studio" %}}download the latest version of Android Studio{{%/link%}} for your environment and {{%link href="https://developer.android.com/studio/install" %}}install it{{%/link%}}, if you don't have it installed on your system. You need not perform any additional configurations to set up your workspace for this app. -------------------------------------------------------------------------------- title: "Create a project" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.695Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/create-project/" service: "All Services" related: - Project Directory (/en/cli/v1/project-directory-structure/introduction) - Set up Catalyst Projects (/en/getting-started/catalyst-projects) -------------------------------------------------------------------------------- # Create a Project Let's {{%link href="/en/getting-started/catalyst-projects/#create-a-catalyst-project" %}}create a Catalyst project{{%/link%}} from the Catalyst console. 1. Log in to the {{%link href="https://console.catalyst.zoho.com/baas/index" %}}Catalyst console{{%/link%}} and click {{%bold%}}Create New Project{{%/bold%}}.<br /> <br /> 2. Enter the project's name as "{{%bold%}}ZCDrive{{%/bold%}}" in the pop-up window. <br /> <br /> 3. Click {{%bold%}}Create{{%/bold%}}. Your project will be created and opened in the console. -------------------------------------------------------------------------------- title: "Create a table" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.695Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/create-table/" service: "All Services" related: - Data Store (/en/cloud-scale/help/data-store/introduction/) -------------------------------------------------------------------------------- # Create a Table in the Data Store Next, let's create a table in the Data Store in the _ZCDrive_ project. This table stores the metadata of the files that are uploaded in the Android app. To create a table: 1. Navigate to the **Catalyst Cloud Scale** service in the {{%link href="https://console.catalyst.zoho.com/" %}}Catalyst console{{%/link%}} and click **Start Exploring**. <br /> 2. Click **Data Store** under Storage. Click **Create a New Table**. <br /> 3. Enter the table's name as "{{%bold%}}Files{{%/bold%}}" and click {{%bold%}}Create{{%/bold%}}.<br /> <br /> {{%note%}}{{%bold%}}Note:{{%/bold%}} Ensure that you enter the name exactly as instructed, because the application's code contains the same name.{{%/note%}} ### Create Columns We will create {{%bold%}}five columns{{%/bold%}} in this table to store the file ID, name, type, and the uploaded time of the file. 1. Click **+ New Column** in the **Schema View** section for the table. <br /> 2. Enter the column's name as "{{%bold%}}file\_id{{%/bold%}}". Select the data type as {{%bold%}}Var Char{{%/bold%}} and enter the max length as {{%bold%}}100{{%/bold%}}. You must enable the {{%bold%}}Is Mandatory{{%/bold%}} toggle. You can learn about the various data types supported by Catalyst and the other properties of a column from the {{%link href="/en/cloud-scale/help/data-store/columns" %}}Data Store help page{{%/link%}}.<br /> {{%note%}}{{%bold%}}Note:{{%/bold%}} Ensure that you enter the name exactly as instructed, because the application's code contains the same name.{{%/note%}} 3. Click {{%bold%}}Create{{%/bold%}}. Create the other columns in the same way with the values shown in the images: #### uploaded\_time: #### file\_type: #### bucket\_name: #### version\_id: All columns will be created and listed in the _Schema View_ section. The Data Store is now configured for the app. Each time you upload a file in the app, a row will get created for it in the _Files_ table. When you delete a file, its data row will also be deleted from the table automatically. -------------------------------------------------------------------------------- title: "Create a Bucket in Stratus" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.696Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/create-bucket/" service: "All Services" related: - Stratus (/en/cloud-scale/help/stratus/introduction/) -------------------------------------------------------------------------------- # Create a Bucket in Stratus Next, let's create a bucket in the {{%link href="/en/cloud-scale/help/stratus/introduction/" %}}Catalyst Cloud Scale Stratus{{%/link%}} component of the Catalyst project. This bucket stores the files that you upload in the mobile app. To create a bucket in the Stratus component: 1. Navigate to **Stratus** under **Storage** and click **Create Bucket**. <br /> 2. Enter a globally unique bucket's name. Choose **Authenticated** as the **Permission Template**, enable **Versioning**, and click **Create**. <br /> 3. The bucket will be created and displayed in the Stratus component. A unique Folder ID will be created for it, which we will include in the app's code later. <br /> The Stratus bucket is now configured for the application. -------------------------------------------------------------------------------- title: "Configure Authentication" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.696Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/configure-authentication/" service: "All Services" related: - Configure Authentication (/en/cloud-scale/help/authentication/introduction/) -------------------------------------------------------------------------------- # Configure Authentication Let's now setup the authentication of the Android application in Catalyst. Follow the below listed steps to configure the Authentication component: 1. Navigate to the **Catalyst Cloud Scale** service in the Catalyst console and click **Authentication** component from SECURITY & IDENTITY. <!-- <br /> --> 2. In the Native Authentication section, select **Set Up**. <br /> {{%link href="/en/cloud-scale/help/authentication/native-catalyst-authentication/introduction/" %}}Learn more about Native Catalyst Authentication{{%/link%}}. 3. Choose **Hosted Authentication** and click **Next**. Provide the company name as **ZCDrive**, enable public signup and select **Zoho** for Social Login. Click **Next**. <br /> {{%link href="/en/cloud-scale/help/authentication/public-signup/" %}}Learn more about Public Signup{{%/link%}}. {{%link href="/en/cloud-scale/help/authentication/social-logins/introduction/" %}}Learn more about Social Logins{{%/link%}}. You can skip the Additional Settings step. 4. The authentication component is now configured. <br /> -------------------------------------------------------------------------------- title: "Create a project in Android Studio" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.696Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/create-android-studio-project/" service: "All Services" related: - Android SDK (/en/sdk/android/v2/overview) -------------------------------------------------------------------------------- # Create a Project in Android Studio Let's now create a project in Android Studio. The project you create will contain the source code and the resource files of the app in a specific structure, based on the type of activity, language, and other configurations you initialize it with. You can learn more about an Android's project structure, Android Studio's UI and tools, the build system, and more from the {{%link href="https://developer.android.com/studio/intro" %}}Android Studio User Guide{{%/link%}}. {{%note%}}{{%bold%}}Note:{{%/bold%}} The screen samples shown in this tutorial are from the {{%bold%}}Android Studio version Narwhal | 2025.1.1{{%/bold%}}. Depending on the version you have installed, there might be differences in the user interface or navigation in the IDE.{{%/note%}} 1. Open the Android Studio installed on your system and find the option to create a new project. Click **New Project**. <br /> 2. Select the type of the project as {{%bold%}}Empty Activity{{%/bold%}}, then click {{%bold%}}Next{{%/bold%}}.<br /> <br /> 3. Configure the project with these values:<br /> * Project name: "{{%bold%}}ZCDrive{{%/bold%}}"<br> * Package name: "{{%bold%}}com.catalyst.zcdrive{{%/bold%}}"<br> * Minimum SDK: {{%bold%}}API 21: Android 5.0 (Lollipop){{%/bold%}}<br> * Language: {{%bold%}}Kotlin DSL{{%/bold%}}<br> This will populate the app with the Kotlin sample code for that API level.<br /> <br /> 4. Click {{%bold%}}Finish{{%/bold%}}. Android Studio will finish creating your project, and Gradle will synchronize the build. After the project is synchronized, you will be able to see the boilerplate code and resources created for it from the directory on the left. However, before we code the ZCDrive application, we must set up and integrate the Catalyst Android SDK package with the app. -------------------------------------------------------------------------------- title: "Register app with Catalyst" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.696Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/register-app/" service: "All Services" related: - Developer Tools (/en/getting-started/set-up-a-catalyst-project/developer-tools) - Android SDK (/en/sdk/android/v2/overview) -------------------------------------------------------------------------------- # Register the Android App with Catalyst After you create the Catalyst project and the Android project, you must create a package for the Android app in Catalyst to register it, and download its unique configuration file. This configuration file, {{%badge%}}{{%bold%}}app\_configuration\_development.properties{{%/bold%}}{{%/badge%}}, contains the definitions of the Catalyst project, the app client, and other OAuth authentication properties, that are auto-populated in it. You can view a complete list of the properties that this file defines from {{%link href="/en/sdk/android/v2/setup/#step-2-import-the-configuration-file-in-your-android-project" %}}this help section{{%/link%}}. {{%note%}}{{%bold%}}Note:{{%/bold%}} Because we are working in the development sandbox with the Catalyst project, we will only be able to download the configuration file for the {{%link href="/en/deployment-and-billing/environments/introduction" %}}development environment{{%/link%}}. If you have a project deployed to production, you will be able to access the same file with the production environment variables populated in it.{{%/note%}} 1. Click the Settings icon from your Catalyst console in your project and navigate to Developer Tools under Project Settings. Click the Android Tile. 2. You must enter the same package name that you entered in Android Studio while creating the project. Enter the following values and click **Create**. Package name: **"com.catalyst.zcdrive"**<br/> Redirect URL: **"home"** The redirect URL defines the URL the user will be redirected to, after they login to the app. The package will be created successfully. You can click **Download** to download the configuration file to your local system. The configuration file will be downloaded to your system with all the property definitions mentioned earlier. The _Mobile SDK_ section in _Developer Tools_ will display the details of the Android SDK package configured with this project. -------------------------------------------------------------------------------- title: "Import configuration file" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.697Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/import-config-file/" service: "All Services" related: - Developer Tools (/en/getting-started/set-up-a-catalyst-project/developer-tools) - Android SDK (/en/sdk/android/v2/overview) -------------------------------------------------------------------------------- # Import the Configuration file into your Android Project You must now add the configuration file you downloaded from the console to the app's source code. You must create a new directory called {{%badge%}}{{%bold%}}assets{{%/bold%}}{{%/badge%}} in the {{%badge%}}app{{%/badge%}} module in the ZCDrive project's structure, and add the file in it as described below: 1. Navigate to the ZCDrive project in the Android Studio. Select {{%badge%}}{{%bold%}}app{{%/bold%}}{{%/badge%}} from the directory, then right-click it. Select {{%bold%}}New{{%/bold%}} \> {{%bold%}}Directory{{%/bold%}}. <br /> 2. Type "{{%bold%}}src/main/assets{{%/bold%}}", then press {{%bold%}}Enter{{%/bold%}}. <br /> Alternatively, you can create this directory in the specified path through your system's file manager directly. 3. Copy the {{%badge%}}{{%bold%}}app\_configuration\_development.properties{{%/bold%}}{{%/badge%}} file that was downloaded. Now, right-click the {{%badge%}}{{%bold%}}assets{{%/bold%}}{{%/badge%}} directory that was created in Android Studio, then click {{%bold%}}Paste{{%/bold%}} to paste the file. Confirm the action, if prompted. <br /> You can also locate the Android project in your system's storage, then navigate to {{%badge%}}{{%bold%}}ZCDrive > app > src > main > assets{{%/bold%}}{{%/badge%}}, and paste the file there directly. -------------------------------------------------------------------------------- title: "Replace source code" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.697Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/replace-source-code/" service: "All Services" related: - Android SDK (/en/sdk/android/v2/overview) -------------------------------------------------------------------------------- # Replace the Source Code and Resource Files Next, let's update the source code of the ZCDrive app and its resource files. To make this easy, we have given you a link to the Git repository that contains the code for the necessary modules. You will simply have to replace your files with the given files. 1. Navigate to {{%badge%}}{{%bold%}}ZCDrive > app > src > main{{%/bold%}}{{%/badge%}} in your Android project directory from your system. 2. Delete the following directories and file in the main folder:<br /> * {{%badge%}}{{%bold%}}java/{{%/bold%}}{{%/badge%}} * {{%badge%}}{{%bold%}}res/{{%/bold%}}{{%/badge%}} * {{%badge%}}{{%bold%}}AndroidManifest.xml{{%/bold%}}{{%/badge%}} 3. Download the {{%badge%}}java/{{%/badge%}} and {{%badge%}}res/{{%/badge%}} directories, and the {{%badge%}}AndroidManifest.xml{{%/badge%}} file from {{%bold%}}{{%link href="https://github.com/catalystbyzoho/tutorial-zcdrive-android" %}}this Git repo{{%/link%}}{{%/bold%}}. 4. Paste the downloaded files in the {{%badge%}}main{{%/badge%}} folder. The source code and resources for the app are now updated. Let's take a quick look at the code of the ZCDrive app. {{%note%}}{{%bold%}}Note:{{%/bold%}} Please go through the source code and the comments as you read through these points to make sure you fully understand them. {{%/note%}} * The {{%badge%}}res{{%/badge%}} folder contains the {{%link href="https://developer.android.com/guide/topics/resources/providing-resources" %}}app's standard resources{{%/link%}} optimized for different device configurations in type-specific individual directories. These resources include various XML files that define the layouts, views, bitmaps, and more. * The {{%badge%}}{{%link href="https://developer.android.com/guide/topics/manifest/manifest-intro" %}}AndroidManifest.xml{{%/link%}}{{%/badge%}} file contains crucial information about the app that is communicated to the build tools, the Android OS, and Google play. For example, it declares the app's components, permissions, and the hardware and software requirements of the target device for the app to run on. * The {{%badge%}}assets{{%/badge%}} directory we created contains the {{%badge%}}app\_configuration\_development.properties{{%/badge%}} file that was downloaded after registering the app in Catalyst. * The {{%badge%}}java{{%/badge%}} directory contains the actual source code of the app in the form of various Kotlin files:<br /> * {{%badge%}}{{%bold%}}Initialization.kt{{%/bold%}}{{%/badge%}}: Contains the startup logic for the creation of the main activity. * {{%badge%}}{{%bold%}}Signup.kt{{%/bold%}}{{%/badge%}}: Defines the logic and the layout for the signup and login activities in the app. The {{%badge%}}registerUser(){{%/badge%}} method fetches the details of a new user, such as their name and email address, during the signup and creates a new user instance through {{%link href="/en/sdk/android/v2/cloud-scale/authentication/create-user-instance/" %}}Catalyst Authentication{{%/link%}}. * {{%badge%}}{{%bold%}}MainActivity.kt{{%/bold%}}{{%/badge%}}: The {{%badge%}}{{%link href="https://developer.android.com/guide/components/activities/intro-activities" %}}Activity{{%/link%}}{{%/badge%}} class informs the Android system to invoke specific callback methods in the {{%badge%}}Activity{{%/badge%}} instance for the various stages of the app's lifecycle. {{%badge%}}MainActivity{{%/badge%}} defines methods to initiate login and signup in the app. When you build and run your app, the system launches an instance of this {{%badge%}}Activity{{%/badge%}} and loads its layout. * {{%badge%}}{{%bold%}}HomeActivity.kt{{%/bold%}}{{%/badge%}}: Contains methods involved in defining the app's home activity, such as for loading the home page after the authentication check, setting values of the file items to the {{%badge%}}RecyclerView{{%/badge%}} container for displaying the files, fetching the metadata of the files from the Data Store through a {{%badge%}}fileItem{{%/badge%}} object and rendering them in the view, rendering the view after the files are deleted, the user logout, and more. * {{%badge%}}{{%bold%}}UploadDialog.kt{{%/bold%}}{{%/badge%}}: Handles the file upload activity in the app. The file is uploaded to the configured bucket in the Stratus. A new row is created in the Data Store, and the file's metadata is extracted and set to the row's columns. An object for the {{%badge%}}fileItem{{%/badge%}} class that contains the file's metadata is then created, and the file item is rendered in the {{%badge%}}HomeActivity{{%/badge%}}. * {{%badge%}}{{%bold%}}UserFileDownloadManager.kt{{%/bold%}}{{%/badge%}}: Handles the file download activity in the app. When the download is initiated by the user, the file in the Stratus bucket is referred to by an instance, and it is fetched and stored in a temporary file path. {{%badge%}}fileOutputStream{{%/badge%}} downloads the file from the path. * {{%badge%}}{{%bold%}}DeleteDialog.kt{{%/bold%}}{{%/badge%}}: Handles the file deletion activity. A file instance is created to refer to the file in the Stratus bucket, and the file is deleted using the {{%badge%}}file.delete(){{%/badge%}} method. The row that stores the file's metadata is also fetched using a Data Store table instance, and the row is deleted from the table. * The {{%badge%}}{{%bold%}}LinearViewAdapter{{%/bold%}}{{%/badge%}} and the {{%badge%}}{{%bold%}}GridViewAdapter{{%/bold%}}{{%/badge%}} define the rendering of the file items in the adapters of the app's {{%badge%}}LinearView{{%/badge%}} and {{%badge%}}GridView{{%/badge%}} respectively. * {{%badge%}}{{%bold%}}PreviewFile.kt{{%/bold%}}{{%/badge%}}: Defines the methods for previewing a file in the app, after checking for permissions. The {{%badge%}}previewFile(){{%/badge%}} method fetches the file instance from Stratus and opens a preview. The {{%badge%}}java{{%/badge%}} directory also contains sub-directories that define instrumented Android tests and independent unit tests of the app, which we will not be performing. -------------------------------------------------------------------------------- title: "Configure source code" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.697Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/configure-source-code/" service: "All Services" related: - Android SDK (/en/sdk/android/v2/overview) -------------------------------------------------------------------------------- # Configure Values in the Source Code The Stratus bucket that has been associated with the app is referred to in the source files by its unique name. You must configure the value of your Stratus bucket name in the code that you downloaded from the Git repo in the previous step. You can fetch the bucket name configured in Step 3 and configure it in the **AppConstants.kt** file in the **ZCDrive > app > src > main > java > com > catalyst> zcdrive** directory. You must save the changes made. If your project's Gradle prompts for a project sync, synchronize the files with the build. The source files are now fully configured. We can now proceed to configure the build scripts for the app. -------------------------------------------------------------------------------- title: "Update build scripts" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.697Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/update-build-scripts/" service: "All Services" related: - Android SDK (/en/sdk/android/v2/overview) -------------------------------------------------------------------------------- # Update Gradle Build Scripts You must make some minor updates in the {{%link href="https://developer.android.com/studio/build" %}}Gradle build scripts{{%/link%}} of the Android project. Gradle provides you with the flexibility to define your own custom build configurations, in place of the default build configurations that an Android project is created with. Gradle entirely handles the app's build process and enables you to run the app effectively. You must update two of the build configuration files in your Android project: {{%badge%}}{{%bold%}}settings.gradle{{%/bold%}}{{%/badge%}}, and the module-level {{%badge%}}{{%bold%}}build.gradle{{%/bold%}}{{%/badge%}}. <br /> {{%badge%}}{{%bold%}}settings.gradle:{{%/bold%}}{{%/badge%}} 1. Open {{%badge%}}settings.gradle{{%/badge%}} from the Gradle scripts and locate the {{%badge%}}dependencyResolutionManagement{}{{%/badge%}} interface. 2. Replace the default code with the following code: {{%code class="language-javascript"%}}dependencyResolutionManagement { repositories { google() mavenCentral() maven { url = uri("https://maven.zohodl.com/") } } } {{%/code%}} This defines the repositories to be added to the project, and configures the dependency resolution for the build. Ensure that the following last two lines of the default code are still present, because Gradle will not be able to process the build without them: {{%code class="language-javascript"%}}rootProject.name="ZCDrive" include':app' {{%/code%}} {{%badge%}}{{%bold%}}build.gradle:{{%/bold%}}{{%/badge%}} The module-level {{%badge%}}build.gradle{{%/badge%}} file enables you to configure build settings specific to that particular module. For example, you can configure the minimum SDK and target SDK the app must be compatible with, the compile options, dependencies, or the JVM bytecode the Kotlin compiler must generate. 1. Open {{%badge%}}build.gradle (Module: ZCDrive.app){{%/badge%}} from the Gradle scripts and locate the {{%badge%}}{{%bold%}}android{}{{%/bold%}}{{%/badge%}} object. Set the following values for these parameters in it:<br /><br /> {{%badge%}}{{%bold%}}compileSdk 36{{%/bold%}}{{%/badge%}}<br /> {{%badge%}}{{%bold%}}targetSdk 36{{%/bold%}}{{%/badge%}}<br /> {{%badge%}}{{%bold%}}minSdk 26{{%/bold%}}{{%/badge%}} <br /> 2. Replace the default {{%badge%}}dependencies{}{{%/badge%}} module with the following code:<br /> {{%code class="language-javascript"%}}dependencies{ implementation("com.zoho.catalyst:android-sdk:3.0.1") implementation(libs.androidx.core.ktx) implementation(libs.androidx.lifecycle.runtime.ktx) implementation(libs.androidx.activity.compose) implementation(platform(libs.androidx.compose.bom)) implementation(libs.androidx.ui) implementation(libs.androidx.ui.graphics) implementation(libs.androidx.ui.tooling.preview) implementation(libs.androidx.material3) testImplementation(libs.junit) androidTestImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.espresso.core) androidTestImplementation(platform(libs.androidx.compose.bom)) androidTestImplementation(libs.androidx.ui.test.junit4) debugImplementation(libs.androidx.ui.tooling) debugImplementation(libs.androidx.ui.test.manifest) implementation(libs.androidx.appcompat) implementation(libs.androidx.recyclerview) implementation(libs.material) }{{%/code%}} <br /> After you have made these changes, Gradle will need to synchronize the project build. Click {{%bold%}}Sync Now{{%/bold%}} if prompted.<br /> <br /> The custom build configurations are updated. We can now build the Android project and test the app in Android Studio. -------------------------------------------------------------------------------- title: "Configure an AVD" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.697Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/configure-avd/" service: "All Services" related: - Android SDK (/en/sdk/android/v2/overview) -------------------------------------------------------------------------------- # Configure an AVD in the Android Emulator After you code an application in Android Studio, you can build it and deploy it to a connected device or a virtual emulator device to run it. When you build a project, an Android Application Package (APK) is built for the app, and the default project activity is launched to the target device. As we have updated the run configurations and scripts that define the project's build specifications in the last step, we can proceed to configuring a virtual device to test the app on. The {{%link href="https://developer.android.com/studio/run/emulator" %}}Android Emulator{{%/link%}} facilitates the simulation of virtual android devices in Android Studio that enables you to test your application on a variety of device configurations, API levels, and hardware profiles. If you don't already have a virtual device set up for the app's target API level, follow the steps mentioned below to create a virtual device through AVD (Android Virtual Device) Manager, and run the app on it. {{%note%}}{{%bold%}}Note:{{%/bold%}} * If the Android Emulator is not installed in your Android Studio, navigate to {{%bold%}}Settings > SDK Manager{{%/bold%}}, then select the {{%bold%}}SDK Tools{{%/bold%}} tab. You can select the {{%bold%}}Android Emulator{{%/bold%}} package and install it. * You must also ensure that you have installed an SDK package of API level 29 or higher to run on the simulated device, as we defined the target SDK as 36. {{%/note%}} 1. Navigate to {{%bold%}}Device Manager{{%/bold%}} in the Android Studio in your project. <br /> 2. Create a new virtual device by clicking {{%bold%}}Create Virtual Device{{%/bold%}}. <br /> 3. Select **Phone** and choose **Pixel 9** as the device. <br /> 4. Select the API as **API 36.0 Baklava** and the Services as **Google APIs**. Click on the download icon shown beside the system image and click **Finish**. {{%note%}}{{%bold%}}Note:{{%/bold%}} * If you see {{%bold%}}Download{{%/bold%}} next to the system image, you must download it. * You must ensure that you select the API level to be above the minimum SDK level the app targets, which is 26\. Since we defined our target SDK as 36, you can ideally install a system image of that API level or of a higher level. {{%/note%}} 5. You can verify the configuration properties, then click {{%bold%}}Finish{{%/bold%}} to create the virtual device. <br /> The AVD will be created and listed in the Device Manager section. -------------------------------------------------------------------------------- title: "Test app in the AVD" description: "Build an Android file storage mobile app using Android Studio, and associate it with a Catalyst project using Catalyst Android SDK to store files securely in the project's Stratus bucket." last_updated: "2026-03-18T07:41:08.698Z" source: "https://docs.catalyst.zoho.com/en/tutorials/zcdrive/test-app-in-avd/" service: "All Services" related: - Android SDK (/en/sdk/android/v2/overview) -------------------------------------------------------------------------------- # Test the App in the AVD Let's now test the app by launching it on the virtual device. You can also debug your app through the default debugger attached to the configured virtual device, or perform advanced tests on the app. However, we will simply run the app on the Emulator and test its functionalities manually as an end-user. When you run the app, the build process will be initiated and it will convert the Android project into a debug version of an APK that you can test. A build version of the app's source code and resource files will be generated. You will find the compiled source files and resource files in the {{%badge%}}{{%bold%}}app > build{{%/bold%}}{{%/badge%}} directory, along with the other components of the APK and compiled Kotlin class files. The APK will get installed on the virtual device automatically, enabling you to simply open the app after the device is powered on. #### Launch the App: 1. Click the **Run app** icon as shown in the screenshot below. This will launch the Android Emulator and your virtual device will be powered on. You might be prompted to perform some initial set up on the virtual device. Locate the ZCDrive app on the virtual device and double-click it to open it. #### Sign Up for an account: 1. You must perform an initial sign-up on the app to create your account in it. Click {{%bold%}}Sign Up{{%/bold%}}. <br /> 2. Enter your name and email address to create an account, then click {{%bold%}}Sign Up{{%/bold%}}. <br /> You will receive a toast in the app informing you that an email with an invitation link to set a password has been sent to the email address. 3. Open your email and click the link. <br /> You can set a password for the app. Confirm the password, then click **Update**. #### Change User's Permissions: Before you log into the app, you must configure some user permissions in the Catalyst console. The account you signed up for the app with will be added to the role of an {{%link href="/en/cloud-scale/help/authentication/user-management/roles/introduction/" %}}_App User_{{%/link%}} by default in Catalyst Authentication. However, an _App User_ will not have permissions to upload and delete files in the Stratus bucket, or insert and delete rows in the Data Store. We will therefore change the signed up user's role to _App Admin_ in the following way: 1. Open {{%bold%}}Authentication{{%/bold%}} in the Catalyst console for your project. You will find the account you signed up with added as a new user in the User Management section. Click the ellipsis icon for the user, then click {{%bold%}}Edit{{%/bold%}}. <br /> 2. Select the user's role as _{{%bold%}}App Administrator{{%/bold%}}_ from the drop-down list, then click {{%bold%}}Update{{%/bold%}}. <br /> You will now be able to perform all available operations in the Data Store and File Store. This will enable you to upload and delete files from the app. #### Log into the App: 1. Navigate back to the app in the Android Emulator and click {{%bold%}}Login{{%/bold%}}. Enter the email address you signed up with and the password you set on the login screen, then click {{%bold%}}Sign In{{%/bold%}}. <br /> 2. The app's home will be opened after a successful sign-in. <br /> #### Upload a file in the app: 1. You can now upload a file in the app by clicking the (+) icon. The app will ask permission to access the files on your virtual device. Click {{%bold%}}Allow{{%/bold%}} and select a file.<br /> {{%note%}}{{%bold%}}Note:{{%/bold%}} If the virtual device was newly configured and launched, it will not contain any files in its storage. You can open the Camera app on the device and click a sample image for this testing purpose. You could also simply drag a file onto the emulator screen from your system, to add it to the virtual device. The file will be added to the /sdcard/Download/ directory in the device's storage.{{%/note%}} 2. Click {{%bold%}}Yes{{%/bold%}} in the confirmation pop-up.<br /> <br /> The file will be uploaded to the app. Depending on the type of file, you will see an icon for it.<br /> <br /> The uploaded file will be present in the Stratus bucket of your Catalyst project. You will also find a new row created in the _Files_ table in the Data Store, that stores the metadata of the uploaded file. #### View or Download a file in the app: You can preview or download the file from the emulated device by clicking the ellipsis icon for it in the app, then clicking {{%bold%}}View{{%/bold%}} or {{%bold%}}Download{{%/bold%}}. The file will be downloaded to the virtual device's storage when you click the _Download_ option. #### Delete a file in the app: 1. You can delete an uploaded file from the app by clicking the ellipsis icon, then clicking {{%bold%}}Delete{{%/bold%}}.<br /> <br /> 2. Click {{%bold%}}Yes{{%/bold%}} to confirm. <br /> The file will be deleted from the app and the action will be synchronized with Stratus. The file will no longer be present in the Stratus bucket. <br /> The row containing the metadata of the file will also be deleted from the _Files_ table in the Data Store. <br /> You can also locate the APK of the ZCDrive app in the Android Studio and install it in any test device, to test its UI or functioning in a variety of hardware configurations or Android API levels. The app's APK can be found in this path of your Android project's directory:{{%bold%}}{{%badge%}} app > build > outputs > apk > debug > app-debug.apk{{%/badge%}}{{%/bold%}} {{%note%}}{{%bold%}}Note:{{%/bold%}} You can also host and distribute the mobile app in Catalyst using {{%bold%}}Mobile Device Management (MDM){{%/bold%}}. You will need to upload the APK file of the app in your project's MDM in Catalyst console to host it. You can learn about hosting an Android app in MDM in the console from the {{%link href="/en/cloud-scale/help/mobile-device-management/introduction" %}}Mobile Device Management help page{{%/link%}}.{{%/note%}} If all these actions work without any errors in the Emulator, the app has been configured properly.