Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
claudiapacheco
Product and Topic Expert
Product and Topic Expert
0 Kudos
OverviewBackendApp ConfigurationAndroidiOS
MBO Android AppOData Android App

OData Android Content:

On-boarding

On-boarding is the process of registering a user and giving them appropriate access to data and applications. MBO based mobile apps built in SUP 2.x/SMP 2.3 must register with the server before establishing a connection. Similarly OData based mobiles apps built in SMP 3.0 must on-board with the server before accessing backend data. However, this registration process for MBO based apps is completely different from the on-boarding process for OData based apps. In consequence, developers who want to migrate android apps from MBO to OData are required to rewrite the login screen. In the following section, we will compare both registration processes to guide your through these changes.

MBO Based Mobile Apps

In order for MBO based mobile apps to register with the server during the initial application startup, developers must:

  1. Create a standard Android activity
  2. In the onCreate method, indicate the Android layout used by this activity: In Android, developers can create the user interface with layout in XML to include the UI elements like text fields and buttons.
  3. Capture basic information like host, login and password
  4. Register the application using the registerApplication method in the com.sybase.mobile.Application class. The following code shows how to register the application and device from an MBO based android app.

OData based mobile apps

On the other hand, OData based mobile apps built using SMP 3.0 can leverage the MAF Logon component to simplify the on-boarding process. The MAF Logon component provides with the user interface and the logic required to onboard users.

In order to use the MAF Logon component, developers must

  1. Import a number of libraries and external resources to the android project
  2. Create a standard Android activity that implements com.sap.maf.tools.logon.logonui.api.LogonListener
  3. In the onCreate method, initialize the LogonUIFacade and present the logon screen by setting the resulting view as the content for this activity. The following Code shows how to customize and display the MAF logon screen from the OData based mobile apps.
  4. Once the registration finished, the MAF logon component will call the onLogonFinished method. Developers can implement this method to verify whether the on-boarding process finished successfully.

You can find in this guide How To... Setup MAF resources in Android Studio details about how to:

  • Import MAF libraries and external resources into your android project
  • Display the MAF Logon component
  • Verify results of the on-boarding process

Below you will find screenshots of the LoginActivity for the sample MBO based app and the OData  based app.

Please note we have submitted this sample app for publishing and it will be available on a public Git repository soon.