The Project Features Page¶
Use this page to configure SAP Cloud Platform and device features such as Discovery Service, push notification, and logging.
Discovery Service Support¶
The SAP Discovery Service simplifies the user onboarding process by letting you distribute initial configuration data to a mobile app.
If you enable the Discovery Service, the app is published to the discovery service during app generation. The service domain is then downloaded from the server and generated into the application.
If the app was previously published, it is re-published using the default configuration options.
During onboarding, your app users are prompted to enter their e-mail address or a short code. Once they have done so, the app downloads the required initial configuration.
To use a short code, you must configure the Discovery Service on the SAP Cloud Platform. See Discovery Service Overview for more information.
If you decide not to use the Discovery Service, the Wizard creates a JSON file containing app configuration and includes it with the app during generation. During onboarding, the app uses the File Provider to read JSON file and configure the app.
Discovery Service is not supported on Cloud Foundry. If your account is on a Cloud Foundry, Use Discovery Service for Application Bootstrapping check box is disabled.
Push notification requires Firebase. To configure your app to use Firebase, create a FireBase Account, configure Push service for your app, and download the JSON file (
google-sevices.json) containing the push configuration.
You must also configure the server to use push. See Android Push Notifications for more information.
To use the Discovery Service to deliver initial configuration during onboarding, enable Use Discovery Service as Configuration Provider.
If you disable this option, the app uses the File Provider to provide initial configuration.
Under OData, select either:
- Online – Generates an online-only app
- Offline – Generates an app that supports offline operation. This includes that ability to initialize and create the offline store, upload changes made on the client to the back end, and refresh the offline store as needed.
To generate UI for the app, select Create a sample user experience for the selected OData destination.
The Destination field displays the destination configured in the OData Services page. If there is more than one destination configured, the destinations are provided in a list. If required, select a destination from the list.
If you clear this checkbox, the Wizard generates a project with only basic functionality such as onboarding and proxy classes but without code for UI, logging, or push notifications.
Onboarding screens are still present, but the UI is replaced with a very simple "Hello world" which the user can replace or customize.
To allow your generated app to log information during runtime, select Enable Logging.
Logging information is stored on the app. To upload stored logs to the cloud platform, select Enable Upload.
To include code in your generated app for collecting app usage information and uploading it to the SAP Cloud Platform, select Include Usage.
When this check box is enabled, the Wizard generates an app with the corresponding code and enables the usage feature on the server. However, usage information is only collected and uploaded if the app user provides consent to usage collection during onboarding. Furthermore, the user can withdraw this consent at any time through the Settings screen.
To have your generated app accept push notifications, select Enable Push, then upload the
google-services.jsonthat you obtained from the Firebase website.
The package name in the JSON file must match the project namespace.
Select Finish to generate your new app.
The Wizard connects to the SAP Cloud Platform to register your app and send your app configuration settings.
The generated application opens in Android Studio. It starts with a Welcome screen followed by the onboarding or Logon screen. After a successful logon, the application lists the OData Service collections that are available. You can select each entity to see its details.
The Wizard automatically generates hundreds of lines of source code. For example, it uses the OData service definition to generate specific functions and calls to retrieve data from the SAP Cloud Platform Mobile Services for each entity type, allowing the application to communicate with the back-end system using only the generated code.
As a part of project generation, the wizard also generates a WizardAppReadme file that provides an overview of the generated application and its architecture.
See also The Generated Application for more information.
Do not choose to update Android Gradle Plugin as recommended by Android Studio, or compilation for the new generated application may fail.
Once you've generated your app, customize it as required. You can also configure and administer your app from the SAP Cloud Platform Mobile Services cockpit as needed.