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

What’s new in Mobile development kit (MDK) Client 3.0 SP02

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

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

 

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, on-boarding, 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 –  

Support Complex OData types

You can now able to consume OData services that utilize complex OData types. This includes binding to complex type fields as well as setting complex types in CRUD operations.  

 Example: Assuming your current context’s binding-data is as follows: 

{   
"EmployeeID": "12345", 
"EmployeeName": "Product A", 
"Address": {
  "City": "CityA",    
  "Street": {       
     "StreetName": "StreetB",       
     "HouseNo": "1"
            } 
           } 

"Roles": [{        
  "RoleName": "Role A", 
  "RoleFunction": "Func A"     
  }, 
  { 
  "RoleName": "Role B",  
  "RoleFunction": "Func B" 
  } 
]} 

 

You can bind these properties in your metadata: 

"Title": "{EmployeeName}", 
"Subhead": "{Address/City}", 
"Description": "{Address/Street/StreetName}"

 

You can also bind property of an item in an array by using number in the binding path: 

 "Title": "{Roles/0/RoleName}

Add support for OData v4 online & action import

You can now consume OData v4 (online) services that include calls to OData actions and pass in complex data types. Any results should also be usable in pages and lists.  

Support OData v4 on existing OData actions: 

  • Target Binding and property binding 
  • Create, Open, Read 
  • CreateEntity, UpdateEntity, DeleteEntity 
  • CreateMedia, DeleteMedia 
  • CallFunction 
  • Support new data types that’s introduced in OData v4

Headers are now supported in CallFunction action and are being passed to the OData Service. 

 Headers are already supported in CreateEntityUpdateEntity, etc. 

Headers should be in structure of Map{String, Map{String, String} or String}. The parameter values are resolved from the current context

{     
'Header1': {         
'Parameter1': String, 
'Parameter2': String, 
 },     

'Header2': {        
'Parameter1': String, 
'Parameter2': String, 
 }, 

'Header3': String 
} 

 example:

 

{
  "ActionResult": {
    "_Name": "results"
  },
  "ActivityIndicatorText": "Assign to Warehouse Order...",
  "OnSuccess": "/WM_Open_WT/Actions/Navigation/Nav2DetailsWT.action",
  "ShowActivityIndicator": true,
  "Headers": {
    "If-Match": "{@odata.etag}"
  },
  "Target": {
    "Function": {
      "Name": "AssignWarehouseOrder",
      "Parameters": {
        "Warehouse": "{Warehouse}",
        "WarehouseOrder": "{WarehouseOrder}"
      }
    },
    "Service": "/WM_Open_WT/Services/Warehouse_Order_Task.service"
  },
  "_Type": "Action.Type.ODataService.CallFunction"
}

You can now add a custom logo for welcome screen for iOS by adding a Branding.nss file in the App_Resources/iOS directory. If a file is there, the client will pick it up and load it first. NSS is cumulative, so styles in Branding.nss can be overriden by SDK-level styles in the definitions out of the box. For example, to brand the Welcome Page Logo, this file can be used: 

// Branding.nss
fdlFUIWelcomeScreen_logoImageView {
image-name: custom-logo.png;   /* user is in charge of putting this file in the App_Resources/iOS as well */
} 

 

For Android – Custom logo for welcome screen for android can be specified by adding custom logo file to the drawable resource folders and updating the style in the .mdkproject/App_Resources/Android/src/main/res/values/styles.xml. 

You need to add your custom logo file in the /res/drawable (or drawable-XXX) folder(s). 

 e.g. /res/drawable/custom_icon.png 

 

<style name="OnboardingLogo"> 
<!-- The value is always @drawable/<your_logo_name_without_ext> --> 
<!-- Do not add the file extension e.g. .png -->          
<item name="android:src">@drawable/custom_icon</item> 
</style> 

 

Expose CSDL options for Offline OData

You can now specify CSDL options for the offline OData by adding OfflineOptions to service metadata. 

“OfflineOptions”: { 

  “CSDLOptions”: [ 

“disableNameValidation”, 

“ignoreAllAnnotations”, 

“ignoreAllReferences”, 

“ignoreEdmAnnotations”, 

“ignoreExternalReferences”, 

“ignoreInternalReferences”, 

“ignoreStandardReferences”, 

“ignoreUndefinedTerms”, 

“ignoreXmlAnnotations”, 

“processMixedVersions”, 

“resolveUndefinedTerms”, 

“retainOriginalText”, 

“retainResolvedText”, 

“traceParsingOfElements”, 

“warnAboutUndefinedTerms” 

] 

}

 

 

Additional Languages Supported:Traditional Chinese

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

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

Provide access to NativeScript Utils module

You can now access the NativeScrtipt’s Utils module from a rule so that you can call openUrl() API, required for calling external URLs, as well as launching external apps via URL schemes. 

 

export default Rule(mdkAPI) {   
const utilsModule = mdkAPI.nativescript.utilsModule;  utilsModule.openUrl("https://docs.nativescript.org/core-concepts/utils") 
} 

Support bindings in ToolbarItems

The following properties of ToolbarItem should support Rules, Binding, TargetPathDynamicTargetPath, Global: 

  • _Name
  • Caption
  • Image
  • SystemItem
  • Visible
  • Enabled
  • Clickable
  • Width
  • ItemType 

 

Enable / disable screen sharing in the Android client

You can now control (in a custom Android client) whether to allow taking screenshots and sharing screen for demo purpose.  

In BrandedSettings.json file, you can override the settings that controls if screen sharing and screen shots are enabled or disabled.  By default, if the value is not present it should default to not sharing or taking screen shots. 

 

{  "ConnectionSettings": {       
“EnableScreenSharing”: true
  }, 

New to Mobile Development Kit 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

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.