
The most awaited feature BTP Mobile Authentication with SAP Build Apps. In this blog let’s create Build Apps project which does authentication and fetches data from BTP.
Prerequisites:
First, make sure to subscribe to SAP Build Apps.
Project Creation:
From the Build lobby, create a new project by clicking “Create” button, selecting “Build an Application”, followed by “SAP Build Apps” and “Web & Mobile Application”. Provide a Project Name and click on “Create”.
BTP Authentication:
Please select the “Auth” tab
Select “ENABLE AUTHENTICATION” and select “SAP BTP Authentication” and Click “OK”.
This will add SAP BTP Authentication as shown below and this will also add an additional page to our application to handle authentication.
Data Integration:
To test BTP authentication we will add data from BTP Destinations.
Navigate to “Data” tab, From the “No Systems integrated”, select “ADD INTEGRATION” button. From SAP Systems, Click on “BTP DESTINATIONS”. In the list select “Northwind” destination and we can browse the details. Please select “Products” entity.
To use our destination in the application, select “INSTALL INTEGRATION” and click on “ENABLE DATA ENTITY” button and Click on “SAVE”.
Build Application Creation:
In the Home Page, drag and drop a button. From “PROPERTIES” label it as “Products”.
Click on the “Home page” to add another page to view Product details.
Let’s add a basic list item, for that click on “MARKETPLACE” and select from “Lists”-> “Basic list” and “INSTALL”. Click “SAVE”.
Click on “Configure” and Select “Products” data entity. Drag source data fields to the component fields to the right. Click on “SAVE AND EXIT”.
Go to “Home page” and select “Products” button and add logic for “Navigation”. Drag and drop “Open Page” to the logic panel. Click on “Open page” and configure the page to be opened as “Products.
Click on “Launch” tab and preview the application flow. We have successfully created application to view backend data. Now let’s setup build service.
Build Service:
Click on “Launch” tab and Select “Open build service” from “Build your app”.
Let Configure BTP Authentication for Android Mobile device.
Android Build Settings
Add Keystore details and click next and leave the default values for “Bundle Settings”, “Image Assets” and “Permissions”.
To Configure “Mobile Services” , Click on “Enable SAP Mobile Services”.
From drop down fill in the values with the ones from BTP Cockpit Subaccount – API Endpoint, Org Name, and Name of one of the spaces.
After choosing an API Endpoint, make sure to Click on Login button and after successful login, select organization and Space from dropdown and click “SAVE”.
Now let’s do a Android Build.. Click on the “Buiild” button, once the build is succesful we will able to install and run the .apk on Android device
On Android Device
Yay, the app is ready, we have successfully made an Android build and below is the BTP Authentication flow on the device.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
7 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |