This content has been archived.

Table of Contents

Creating a Hello World Android app with the Connect SDK

This tutorial demonstrates how to configure and integrate the Connect SDK with a new Android app created in the Android Studio development environment. The purpose of the app is to log in to the Pega® Platform application instance and display a success message. To learn more about the Connect SDK, see the Connect SDK overview.

This walkthrough takes approximately 35 minutes to complete.


Before you start, download the file, which contains sample Java code and other application project files for the Android app described in this tutorial.

You can connect to any Pega Platform instance to test the sample Android app.

The users of the Pega Platform mobile app that you are creating must have the PegaRULES:PegaAPI role assigned to them. If required, to enable the use of HTTP server URLs, in the Context tab of the API Service Package rule, clear the Require TLS/SSL for REST services in this package check box.

Compile and run the application

After you create the required Java code and resources in your Android Studio project that make calls to the Connect SDK library, you can compile and run the new Android app in a emulator to test that it works correctly.

  1. To build your project on Android Studio, click Build and select Make Project. You can also click the Gradle Console on the bottom right of the window to show compiling progress information.
  2. To run or debug your application, select Run > Run (or Run > debug) from the Android Studio menu bar. This compiles the project (if necessary), creates a default run configuration, and installs and starts the application on an emulator, depending on the deployment target selected by the run configuration.

    HelloWorld first (log in) screen
    HelloWorld first (login) screen
  3. Enter a valid user name and a password for the app. The content that displays depends on the portal that is associated with the access group of the operator.

Related Content

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.