Jump-start your MDK application with two new app t...
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.
I have heard the same question many times - why do I need to create the offline / online actions and messages? Mobile Development Kit should do it for me. Well, we listened and Mobile Development Kit now creates your offline and online service actions, messages and more for you.
With the introduction of two new Mobile Development Kit application templates, you can get an even faster jump-start to building native mobile cross-platform applications.
The MDK Base template creates your offline/online services actions for you
MDK List-Detail template creates a list and detail page for each dataset and includes everything from the MDK Base template.
Mobile development kit (MDK) is a feature of SAP Cloud Platform Mobile Services. If this is your first introduction to the mobile development kit, I suggest you first review the Learning Map which provides overview topics, blogs, videos, and tutorials.
MDK Base Template
Every MDK application needs a minimum set of services actions to connect to and work with your backend data. So, we have decided to create this for you and save you time. The MDK Base Template creates the actions and rules needed for every MDK application. If you only want MDK to create the offline or online actions and messages for you, then this is the template for you. The following objects are created after completing the MDK Base Template wizard.
Service Actions
For Offline Apps
Initialize
Upload
Download
Close
For Online Apps
Create
Open
Success Messages
Failure Messages
Other Actions
Logout
Close Page
Rules
OnWillUpdate.js
Globals
Application Version
Main Page
Logout toolbar button
Sync toolbar button (Offline Apps Only)
Application.app updated
After using the Base Template, you can focus on creating your pages, other actions, and rules needed for your application.
Take a look at the following video to see it in action.
MDK List Detail Template
If you are looking to create a list page and detail page, we have a template for you. The List-Detail Template builds on the MDK Base Template. Everything created in that template is created here. In addition, the template also creates a list page and detail page for every dataset you select. Further, the following objects are created after completing the MDK List-Detail Template.
All objects created in MDK Base Template
Additional Actions
DataSet Folder
Navigation Actions from List to Detail
Pages
DataSet Folder
List Page
Detail Page
Take a look at the following video to see it in action.
By using the MDK templates, you can quickly get up and running. You also have complete control to edit the pages, actions, and rules after the template has created them. Try MDK today, these features are now available.
Do we have a launchpad to integrate multiple apps or does MDK support it readily. We don’t see an option yet. Also is MDK always supposed to work as a single app and not a combination of different apps/projects.
MDK is designed with the native app model in mind. From this perspective you would create separate MDK applications and deploy them to your device individually. The user will use the device home page organization capabilities to layout the various apps along side their existing applications and launch into them as needed.
The MDK SDK allows you to create branded MDK clients so you can control the icons and naming on the home pages to support deploying multiple MDK applications on a device.
I already built an MDK app with the new base template. Almost everything worked fine, but there is one thing, that I don‘t know how to achieve.
My App is built with two screens:
List of objects (
Detail of selected object
In the second screen I‘ve implemented an object table showing tickets for the selected object (0:n, realized in the service).
Now the customer asked me to make the app „offline“. So I added the objects (1. Screen) to the „offline sets“ and did some changes to my online app. (InitializeOffline.action)..
After doing this, I was happy that I got the list of objects and the details to the objects in flight mode.. obviously the ticket‘s didn‘t got displayed, because I didn‘t added them to the offline-query. When I turn off flight mode, I would expect that all the data is shown. Unfortunately, the data doesn‘t seem to change… I don‘t get the tickets even if I‘m online.
Edit: I didn‘t deleted the OpenService and the Create Service actions, but the failure message. (Otherwise it would always show an error in offline-mode)
Can you please help me?
PS: I tried adding the tickets-collection to the offline query, but there are more than 10‘000 tickets available and I get an error trying to download all of them.
Can you please post a blog on how to update data from offline mdk application to backend automatically (i.e without clicking on sync button on main page) whenever data connnection is switched on?