Skip to Content
Product Information
Author's profile photo Jitendra Kansal

What’s new in Mobile development kit client 3.0 SP01

I am happy to announce that a new release of the Mobile Development Kit is available for all Mobile Services customers and can be downloaded on the SAP Software Center (and MDK Download page.

With the latest MDK 3.1.1 release, users can now create cross platform applications (iOS & Android) that use a single set of metadata definitions.

SAP Mobile development kit (MDK) extends SAP Cloud Platform Mobile Services and SAP Web IDE to provide you with a complete set of mobile application development and management tools, onboarding, offline support, and central lifecycle management. It offers a metadata-driven approach to create native supported applications so no experience of creating iOS or Android apps is required.

The main focus of this release are –

 

Check for Application Updates when the application resumes from the background

You don’t have to wait for timer to expire to check for new version of the app or don’t have to kill the app from the background and relaunch it, with latest client (built via MDK SDK or generic public store), app update is triggered when app is resumed from the background.

 

 

 

Support MDK application with multiple backend connections

 

Your MDK app is no longer restricted to just 1 OData backend, with this release, you can add multiple backend connections (destinations) both online and offline (can be mixed at the same time)

 

 

Note: When Logout action is triggered or client is reset, MDK clears all offline stores

 

Add attachment component with document upload

A new attachment type “SelectFile” available in Form Cell page to upload all document types.

 

 

 

Note: When the AllowedFile Types property is set, only files of those types shall be shown to the user for picking.

 

Implement Progress Bar during initial & delta sync

Initial Sync

 During Initialize Offline OData, a progress indicator would be displayed to update user on the initialization process. Here is the default text being displayed on the progress indicator for each states:

  • Opening: “Opening…”
  • Initializing: “Connecting…”
  • InitialCommunication: “Connecting…”
  • StartingDownloadingFile: “Waiting for file from server…”
  • DownloadingFile: “Downloading file… [downloaded_size][unit]”
  • StartingDownloadingData: “Waiting for data from server…”
  • DownloadingData: “Downloading data… [downloaded_size][unit]”
  • Opened: “Completed”

 

{
    "Service": (String, Required),
    "DefiningRequests": ([{
        "Name": (String: Required),
        "Query": (String: Required),
        "AutomaticallyRetrievesStreams": (Boolean: Optional)
    }], Optional),
    "ProgressText": ({
        "Opening": (String: Optional),
        "Initializing": (String: Optional),
        "InitialCommunication": (String: Optional),
        "StartingDownloadingFile": (String: Optional),
        "DownloadingFile": (String: Optional),
        "StartingDownloadingData": (String: Optional),
        "DownloadingData": (String: Optional),
        "Opened": (String: Optional),
    }, Optional),
    "_Type": "Action.Type.OfflineOData.Initialize"
}

 

[optional]: you can have a set of customized text for each state to replace the progress indicator text shown during Initialize Offline OData. Specifically for ProgressText.DownloadingFile and ProgressText.DownloadingData properties, user may define dynamic parameter of {0} and/or {1} to display the size and/or size unit. When the state is not specified for customization, default text would be used.

 

 

 

Delta Sync

Now, you can display a progress message during delta sync.

Create a new ProgressBanner action and call it from e.g. a Sync button (you can chain another action like Upload followed by Download to complete delta sync in a single call.

The progress banner message is like the standard Banner Message action but used to show that another action or set of actions is in progress. It does this by attaching a banner to the app’s main navigation bar that contains a progress-indicator image. It also allows the user to define a message to display while running and a message to display upon the action chain’s completion. It is more geared towards alerting the user of current long running operations.

 

 

 

API to get the UserID and DeviceID from Mobile Services

 

Any place you want to get the deviceID or userID, you can use this target path.

 

Additional Languages Supported: Czech, Dutch, Hungarian, Italian, Japanese, Korean

In the previous release of the Mobile Development Kit, we added support for languages – simplified Chinese, Danish, and Norwegian and this release supports additional languages – Czech, Dutch, Hungarian, Italian, Japanese, Korean.  The MDK now support 14 total languages.

 

  • English (Default)
  • Simplified Chinese
  • Danish
  • French
  • German
  • Spanish
  • Portuguese
  • Norwegian
  • Czech
  • Dutch
  • Hungarian
  • Italian
  • Japanese
  • Korean

Create new properties files under i18n for them to be used throughout the editor.

 

 

Once, I created my new properties files, I can see and test the new languages directly from the MDK editor.

 

Ability to specify an output directory when creating the MDK Client project

In previous release, when the create-client script of the MDK was used, it always created the client project inside the SDK. With this release, there is a way to specify an output directory to  create the project in the directory where the command was invoked.

 

MDKClient_SDK userid$ ./create-client.command -o /Users/userid/Desktop -m ./jkdemotemplate.mdkproject

Or

You can also mention –-outdir (double dash) instead of -o

And -–mdkproject (double dash) instead of -m

 

Allow the demo bundle to be different from a branded application

A demo app & database can be branded so that the user can try the app without authenticating with the SCPms endpoint.

Demo App

By default a demo app bundle will not be generated and enabled for your app. You can enable it by setting the `Demo` property in BrandedSettings.json. If this property is found (even if it’s just an empty object), the create-client will generate a demo app based on the following criterias:

  1. If a demo.js file is NOT found in the `<.mdkproject directory>/demo` directory, your main app (bundle.js) will be copied as demo.js to be used as the demo app.
  2. If a demo.js file is found in the `<.mdkproject directory>/demo` directory, it will be used as the demo app.

Demo database(s) for Offline OData

The database comes in the form of two files with the extensions `.udb` and `.rq.udb`. The names of both of these files must match the destination name for the OData service. You can include them in the app by adding them to the `<.mdkproject directory>/demo` directory.

For example, if the app uses a destination called `com.sap.sam.swe`, the Offline OData store could be branded by including `com.sap.sam.swe.udb` and `com.sap.sam.swe.rq.udb` in the `branding` directory. If multiple destinations are used by the app, additional pairs of database files would need to be included for each additional destination. When the app is built with one or more branded databases, you can click “Try the Demo” on the launch screen to use those databases.

 

Alternate input to Form Cell Simple Property fields like Barcode

 

you can set a rule to QueryOptions property of Target and use DataQueryBuilder to build your custom OData Query Options, you can also get the then get the current Search String that user entered in the Search bar and use it to further build the query option.

 

Set Visibility of Section and Static Cells in a Sectioned Table

All Sectioned Table controls now has a new property called ‘Visible’, that can be set in the metadata.

 

Support for the latest device versions & NativeScript 5.2

This release supports iOS 12.x and Android 9.x and we have also updated to NativeScript 5.2

 

New to MDK development?

Many thanks to our dev colleagues to share inputs in writing up this post.

Regards

Jitendra Kansal

Product Management, SAP Cloud Platform Mobile Services
SAP SE

Assigned Tags

      11 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Ridhima Goel
      Ridhima Goel

      Hi Jitendra

      Thanks for the detailed blog.

      I have one doubt regarding the MDK installer,does it only run on Windows 32 bit, as it is not running on my 64 bit machine.

      Appreciate for a quick reply.

       

      Thanks

      Ridhima

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author
      Could you share error you got while running installer on 64 bit windows machine?
      Author's profile photo Ridhima Goel
      Ridhima Goel

      Jitendra,

       

      I am not getting any error, but when I run the MDK installer it shows loading and nothing else comes after that. PFB screenshot.

      Thanks

      Ridhima

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author
      Can you share what do you see by running below  command in the installer's folder :
      MDK_Dependencies_Installer.exe --debug --debug

      regarding issue - this could be due to Security Policy. It can be fixed by executing this in PowerShell:

      Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser

      Can you see if this fix it for you?

      Author's profile photo Ridhima Goel
      Ridhima Goel

      Jitendra,

      This worked for me, and I can run the installer now.

      But I am facing another issue. I have set the JAVA_HOME path in the environment variables and also downloaded the android sdk 1.8.But when i run the installer it shows JAVA_HOME as invalid and Android sdk as not installed.

      Please find below screenshot.

      Also please specify which version of Android studio is compatible with MDK.

      Thanks

      Ridhima

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author
      if not done before, download JDK 1.8
      you need to set env variable > user variable
      e.g.
      JAVA_HOME : C:\Program Files\Java\jdk1.8.0_201
      also add below to Path system variable
      e.g.
      C:\Program Files\Java\jdk1.8.0_201\bin
      I was able to build a custom android mdk client with Android studio 3.3.2
      Author's profile photo Ridhima Goel
      Ridhima Goel

      I have already set the environment variable,but it did not work for me.

      Currently I am using Android studio version 3.4.1,let me try with 3.3.2 if this may solve the problem for downloading Android build tools- 28 package

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author
      I should have clarified it in my previous post
      There’s no minimum for Android Studio, you can always install the latest one and keep it up to date. It’s the Android SDK that requires specific version.
      Author's profile photo Arvind Patel
      Arvind Patel

      Hi Jitendra,

      Could you please provide more details on how to use multiple backend for 1 MDK app?

       

      for e.g. I have one app and I am creating extension in this app which include another app with another backend system.

       

      Now how would I be able to get the data from both the backend systems, running as 1 single app for users?

       

      Thanks

      Arvind

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author
      First you need to add/create 2nd OData endpoint in Mobile Services app configuration.
      you may need to refresh the webide page then, right click on Services folder > new MDK service
      Regards
      JK
      Author's profile photo Manish Joshi
      Manish Joshi

      Hi Jitendra,

      Great information.

      Its great that now we have attachment capability. A quick question, do we have offline capabilities also available for the same. I mean I can upload attachments and they get synced with server whenever the device is online. Additionally, the background download of documents / attachments for offline viewing etc.

      Thanks,

      Manish