3

Download, display and create offline images in MDK app

 3 years ago
source link: https://blogs.sap.com/2021/06/03/download-display-and-create-offline-images-in-mdk-app/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Technical Articles
Posted on June 3, 2021 2 minute read

Download, display and create offline images in MDK app

0 Likes 8 Views 0 Comments

In SAP Mobile Development Kit app, Offline OData allows your app to download media binaries from your OData backend and store them in the offline database. In order to use or display them in your app, you’d have to retrieve the binaries out from the offline store, save them in a local storage and access them. So, I want to use this blog post to help you to achieve that with SAP Mobile Development Kit app.

To guide you on this, we have now added a new MDK Showcase app: Image Handling App, which will demonstrate how you can download, save, display and create media in your application.

With this showcase app, you will learn to do the following different scenarios:

  1. Download & display product images in Object Table’s Details Image & Object Header’s Detail Image.
  2. Download & display product images in Image Collection.
  3. Using Object Table’s Accessory Button to download the product image and then to open the image in a document viewer via Open Document action.
  4. Create a product with image attachment that can be viewed using any of the above method.

Here is what the app looks like:

In iOS

Images%20in%20Object%20Table

Images in Object Table – iOS (Images: SAP Mobile Services Sample OData Service)

Images%20in%20Image%20Collection

Images in Image Collection – iOS (Images: SAP Mobile Services Sample OData Service)

Image%20opened%20with%20Open%20Document%20action

Image opened with Open Document action – iOS (Images: SAP Mobile Services Sample OData Service)

In Android:

Images%20in%20Object%20Table%20-%20Android

Images in Object Table – Android (Images: SAP Mobile Services Sample OData Service)

Images%20in%20Image%20Collection%20-%20Android

Images in Image Collection – Android (Images: SAP Mobile Services Sample OData Service)

Image%20opened%20with%20Open%20Document%20action%20-%20Android

Image opened with Open Document action – Android (Images: SAP Mobile Services Sample OData Service)

Do note that this showcase app is currently only meant for mobile platform, however, we will look into enhance it to support web in the future.

We will create more blog posts like this to introduce showcase app that helps you learn to make the best use of MDK to develop your app.

If you have any feedback or thoughts, please do add them in the comment section.

If you have any questions about MDK in general, please do check out the Q&A in the mobile development kit SAP Community and post any questions.

This app is made available under the SAP Sample Code license, which essentially means it is provided as-is, no warranties. Feel free to grab and reuse the portions of the app that seem useful to you.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK