Create a basic native Android master-detail app

Create a basic native Android master-detail app

Create a native Android project which will then be modified with the SAP Mobile SDK

Details

You will learn

In this example, you will create a skeleton of an app using the Android Studio Master-Detail Flow activity template. In the next tutorial, you will add the SAP Mobile SDK resources to it.

Step 1: Start a new Android Studio project

Open Android Studio and click on Start a new Android Studio project.

Step 2: Configure your project

In the Configure your new project screen, enter the values below. The package name will be created for you. Lastly, select the directory for your project files and click Next.

Field Name

Value

Application name

NWAndroid

Company Domain

northwind.com

Step 3: Select format

In the Select the form factors your app will run on screen:

Select the Phone and Tablet checkbox

Select the Minimum SDK level to API 19

Leave the TV, Wear and Glass boxes unchecked

Click Next

Step 4: Add activity

In the Add an Activity to Mobile screen, select the Master/Detail Flow activity and click Next.

Step 5: Customize activity

In the Customize the Activity screen, enter the values below. The Title field will be populated for you. Click Finish and Android Studio will create the project and master-detail app framework for you.

Field Name

Value

Object Kind

Product

Object Kind Plural

Products

Title

Products (filled out for you)

Step 6: View your project

Your project window should look like this:

Step 7: Run the project

To make sure the Android Studio environment is working properly, you can run the app by clicking the run button, and the app will compile.

Step 8: Choose device

You will be prompted to choose a device for your app. You can select a connected Android device (if you have one it will appear in the window, or you can run in the Android Emulator. If you select the emulator, it is normal for it to take a few minutes to start up.