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: 
Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
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 soon to be available on community Download page).

This release adds incremental functionality over the previous MDK Client 3.0 SP02 release.

 



 

Mobile Services Client is also available in Apple AppStore and Google Play Store.

 

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 –

 

XCode 11 & iOS 13 Support


This release supports XCode 11 and iOS 13.

New action type to check for new App Update definitions


This new predefined Action “Application Update action” allows the client to check for an application update manually.



Check is considered

  • successful if the application checks for a new version or downloads a new version.

  • failure if the application fails to either check for a new version or download the new version.




Check the documentation for more details.

Ability to discard objects or transactions on irrecoverable errors


We have introduced a new property when Initializing Offline OData SetEnableIndividualErrorArchiveDeletion - It must be set on an OData Service and will affect how ErrorArchive deletion work.



When set to false (this is default value):
It will behave the same as the current behavior: If you delete one entry of ErrorArchive, it will revert all error states and discards all data from the ErrorArchive. In additions, the requests associated with entries in the ErrorArchive are removed. Note: requests that are not associated with the Error Archive entries will not be removed.

When set to true:
Deleting an individual failed request from ErrorArchive will cause that request and any following requests in the request queue (sent or unsent) that depend on the failed request to be deleted as well.
In this mode, you will need to manage the ErrorArchive entries, individually.

 



Check the documentation (Store Parameters) for more details.

Support Undo Pending Offline Changes of a specified Entity initial & delta sync


We have introduced a new OfflineOData Action UndoPendingChanges that discards all unsent (offline) requests that affect a specified entity So that you can any local changes they've made for that entity without needing to send those requests to the backend.

This action allows app to undo a pending changes (local changes that has not been uploaded) as if it never happens:

  • An existing entity will be restored to the original status as if no any changes had been made.

  • A new entity will be removed as if the entity had never been created.




Check the documentation for more details.

Additional Languages Supported


In this release, we have added support for languages – Malay, Hebrew, Slovenian, Croatian, Bulgarian, UK – Ukrainian, Polish, Russian, Romanian, Serbian Latin, Slovak, Swedish, Turkish, Arabic

The MDK now support 29 total languages.

 











































English (Default) Spanish Hungarian Malay Ukrainian Slovak
Traditional Chinese Portuguese Italian Hebrew Polish Swedish
Danish Norwegian Japanese Slovenian Russian Turkish
French Czech Korean Croatian Romanian Arabic
German Dutch Bulgarian  Serbian Latin

 

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

 



Check the documentation for more details.

Right-to-left & bi-directional support for Arabic and Hebrew languages


MDK supports two RtoL (Right to left) languages, Arabic and Hebrew. If at any stage, the application language is set to either Arabic or Hebrew, the layout automatically changes to RtoL.



Check the documentation for more details.

Support extension in metadata project


You can now write an extension in metadata project (or WebIDE MDK project) without having to build a custom MDK client.


 


Note: this feature only supports Javascript codes (.ts files). You cant add additional framework/library/module/aar




Check the documentation for more details.

Support ServiceOptions in OfflineOptions for OData Service


Service Options is for application to inform the MDK whether your OData Service supports certain features e.g. supportsBind, supportPatch.

  • supportsBind: Service either supports or doesn't support bind operations. (default value is false)

  • supportsPatch: Service either supports or doesn't support patch operations. (default value is true)


E.g.  If an OData Service does not accept PATCH method for updating an entity, then the app should set the supportPatch to false. Setting supportPatch to false will tell MDK that your OData Service doesn't accept PATCH. So, MDK will react accordingly and will no longer use PATCH method when executing UpdateEntity action. Instead, MDK will use PUT method



Check the documentation (Offline Service Options) for more details.

Support Linking from Principle entity to Dependent entity


With this new capability, you can now create a link or an association from a principle entity to a dependent entity. In order to enable this feature, You need to set the enable your OData service’s ServiceOptions supportsBind to true.

Let's take the link between MyWorkOrderHeader and MyEquipment. Here is the metadata for the navigation property of MyWorkOrderHeader, which points to MyEquipment. The name of the navigation property is EquipmentHeader:
<NavigationProperty Name="EquipmentHeader" Relationship="sap_mobile.Equip_MyWOHeader" FromRole="ToRole_Equip_MyWOHeader" ToRole="FromRole_Equip_MyWOHeader"/>

Here, the Association is sap_mobile.Equip_MyWOHeader. Let's take a look at this Association, below in the metadata:
<Association Name="Equip_MyWOHeader" sap:content-version="1">
<End Type="sap_mobile.MyEquipment" Multiplicity="0..1" Role="FromRole_Equip_MyWOHeader"/>
<End Type="sap_mobile.MyWorkOrderHeader" Multiplicity="*" Role="ToRole_Equip_MyWOHeader"/>
<ReferentialConstraint>
<Principal Role="FromRole_Equip_MyWOHeader">
<PropertyRef Name="EquipId"/>
</Principal>
<Dependent Role="ToRole_Equip_MyWOHeader">
<PropertyRef Name="HeaderEquipment"/>
</Dependent>
</ReferentialConstraint>
</Association>

Here, the Dependant is ToRole_Equip_MyWOHeader. And ToRole_Equip_MyWOHeader points to sap_mobile.MyWorkOrderHeader. This means that MyWorkOrderHeader is the Dependant.

Here is the rule: A link can only be created from the Dependant to the Principal.

In this case, the link must go from MyWorkOrderHeader to MyEquipment.

How we support OData Linking:

  • create MyWorkOrderHeader

  • create MyEquipment and link to MyWorkOrderHeader


This should allow executing CreateEntity or UpdateEntity on an entity that is Principal in a relationship to link to another entity that is Dependent via CreateLinks or UpdateLinks.


Support Complex Type in Offline Create/Update


You can now pass complex type data to Create/Update entity operations in Offline OData (v2)


 


Support PUT (replace) & PATCH (merge) option for OData transactions


 

We have introduced a new argument RequestOptions in Update Entity action which has an updateMode property that allows user to specify the mode as patch (merge) or PUT (replace).

MDK should expose that in metadata.

RequestOptions.UpdateMode has two possible values:

  • "Replace" (PUT method): Include all of the Entity's properties in the update request, as in a complete replacement of the resource

  • "Merge" (PATCH method): Include only properties with changed values in the update request, as in patching the resource Default value is "Merge". If any other value is set to "UpdateMode", it will be ignored and default will be used.


{    'RequestOptions': { 
'UpdateMode': 'Replace'
}
}

 



 

Check the documentation for more details.

Support List picker form cell extension in Android


For FormCell Extension, by default MDK will automatically wrap the custom view you returned from your extension into a Form Cell.

With this feature, instead of letting MDK wrap the view in a Form Cell, extension can create and return a view as a Form Cell, and it will be put into the Form Cell container directly.

The return value of the view() method must be a class that implement an interface defined by MDK (ExtensionFormCell for iOS or com.sap.mdk.client.ui.fiori.formCell.views.IExtensionView for Android)

Allow for EULA to be optional


In this release, we introduce an optional property called SkipEula in Brandings.json file. This should be set to true if you want to skip the EULA page during onboarding. If this property is not used in BrandedSettings.json , application will use its default value which is: false.

EULA page will be skipped if the EULA content resource file is not present even if the SkipEula property is set to false.



 



Check the documentation (Skip EULA page) for more details.

Enhance .mdkproject to support automatically adding plugins


We have enhanced .mdkproject structure and have added a new property called NSPlugins. Once you run create-client script to build the custom client, it adds automatically additional NS plugins into the client.







NSPlugins A list of additional NativeScript plugins to be used in the application, these plugins are automatically downloaded and added to the MDK client application. Add the modules from these plugins that you would consume in your application in the “Externals” property. You can access their modules in rules via the required API.






 

Support Infinite Duration for Progress Banner action


You now have ability to set the duration as infinite for the Progress Banner action (set value to zero) .

 


{
"Animated": true,
"CompletionTimeout": 0,
"Message": "This is indefinite, to close press dismiss/close",
"_Type": "Action.Type.ProgressBanner"
}

To close the banner choose:

  • DISMISS button on Android.

  • Close icon on iOS.




Check the documentation for more details.

Android: Re-design ListPicker to use Fragments instead


Previously, when displaying ListPicker’s list view in a Modal page, it would be displayed in full screen.



(screenshot from previous MDK client release)

In this new release, we have enhanced it so that the ListPicker’s list view is fitting into the modal page.



 

New "Visible" support to Form Cell sections


You now have ability to hide/show an entire Form Cell Section in a Form Cell Container from the metadata.
use case - When loading a FormCell page, you can hide or show sections based on binding data or logic in a rule.

Just-In-Time feature for ListPicker


We have improved list picker control to load the data only when it is opened. So when you have multiple list pickers in a page, it won't suffer from very long initial load time.



Support OnResume event in Page


This OnResume event is invoked when the application is resumed and the page is shown. The event is raised after the application OnResume event is raised. For Android platform, if the default language in the device is changed during the application suspension, when the application resuming it will navigate to main page. In this case the page resume event will not be invoked.



Check the documentation for more details.

 

References:

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
3 Comments