My first Android app using SAP Cloud Platform Android SDK

0
1463

Dear SAPLearners, in this blog post we will learn How to develop native android app using SAP Cloud Platform Android SDK.

What is SAP Cloud Platform SDK for Android?

SAP Cloud Platform SDK for Android enable mobile developers to quickly develop native android mobile apps using Android Studio. The SDK also provides different services and functions of SAP Cloud Platform to build powerful and enterprise-grade native android applications.

The native android mobile applications built using SDK will leverage the SAP Cloud Platform Mobile Services to deliver powerful enterprise-grade apps and seamless integration with SAP systems.

Architecture

Below is the high-level technical architecture and different components of SAP Cloud Platform SDK for Android.

SAP Cloud SDK for Andriod Architecture
Image is from https://developers.sap.com/topics/cloud-platform-sdk-for-android.html#use-cases

SAP Cloud Platform SDK for Android Wizard

The SAP Cloud Platform SDK for Android Wizard is an Android Studio plugin provided as part of SDK.

The wizard accelerates the development process by automatically generating fully functional apps which includes SAP Mobile Services connectivity, registration, authentication, OData access, Logging, Push Notifications and Offline capabilities.

Now lets look into creating a sample android application using SDK.

Prerequisites

Before you start, make sure you have

  • Downloaded and Installed SAP Cloud Platform SDK for Android
  • Created a trial account on SAP Cloud Platform
  • Enabled SAP Cloud Platform Mobile Service

Step-by-Step Procedure

1. Launch Android Studio and Choose Start a new SAP Cloud Platform Android Project.

SAP Cloud SDK for Andriod App Development Step1

2. Now SAP Cloud Platform SDK for Android Wizard starts

3. Firstly provide Server Connections details like below

Account NameEnter account name as SAP Cloud Platform Mobile Services Trial
Admin API URLThe URL is available in SAP Mobile Service website under
Important Links section
Admin UI URLThe URL is available in SAP Mobile Service website under
Important Links section
UsernameUsername of your trial account user
PasswordPassword of your trial account user

Admin API and Admin UI URLs can be obtained under SAP Mobile Services like below.

SAP Cloud SDK for Andriod App Development Step2

4. After that, provide all details on Server Connection tab and click Next.

SAP Cloud SDK for Andriod App Development Step3

5. On Cloud Configuration tab, choose Sample and click Next.

SCP SDK for Android Step4

6. Similarity on OData Services, choose the sample destination available and click Next.

SAP Cloud SDK for Andriod App Development Step5

7. In Android Studio Project tab, enter the Project Name and leave other fields to default. Click Next. You can change the default values of your choice, if you want.

SAP Cloud SDK for Andriod App Development Step6

8. Finally, on last wizard step Project Features, as this is a sample application we will select the minimal features like below.

SAP Cloud SDK for Andriod App Development Step7
SAP Cloud SDK for Andriod App Development Step8

9. After all wizard steps are completed, our first android app will be open in Android studio.

SAP Cloud SDK for Andriod App Development Step9 1

10. Now its time to build the android app. Click on Build.

SAP Cloud SDK for Andriod App Development Step9

11. After build is successful, click on Run to run the app in android emulator.

SAP Cloud SDK for Andriod App Development Step10

12. Finally, the welcome screen of app is shown like below. Log in with SAP Cloud Platform credentials.

SAP Cloud SDK for Andriod App Development Step11
SAP Cloud SDK for Andriod App Development Step12

13. After that, set 8 digit pin code.

SAP Cloud SDK for Andriod App Development Step13
SAP Cloud SDK for Andriod App Development Step14

14. Explore the app

SAP Cloud SDK for Andriod App Development Step15
SAP Cloud SDK for Andriod App Development Step16
SAP Cloud SDK for Andriod App Development Step17

Conclusion

Congrats!! you have learnt how to develop native android app using SAP Cloud Platform Android SDK.

Please feel free to comment and let us know your feedback. Subscribe for more updates.

If you liked it ❤️, please share it! Thanks! 🙏