Skip to Content

Create a basic native Android master-detail app

Previous

Create a basic native Android master-detail app

By akula86

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

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.

Details


  1. Open Android Studio, and click on “Start a new Android Studio project”

    start a new Android Studio project

  2. 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

    Configure your new project

  3. 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

    Target Android Devices

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

    Add an activity to Mobile

  5. 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)

    Customize the Activity

  6. Your project window should look like this:

    Project view

  7. 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.

    Run the project

  8. 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.

    Choose device

  9. If you select the emulator, your app will look like this:

    Emulator view

  10. Selecting one of the items in the list will show the detail screen:

    Choose device

Next Steps

Updated 05/24/2016

Time to Complete

5 Min.

Intermediate

Tags

Next
Back to top