SAP Mobile Development Kit (MDK) integration with SAP AI Core services: Part 1 – Setup

Estimated read time 5 min read

SAP AI Core is a service in the SAP Business Technology Platform that is designed to handle the execution and operations of your AI assets in a standardized, scalable, and hyperscaler-agnostic way. It provides seamless integration with your SAP solutions. Any AI function can be easily realized using open-source frameworks. SAP AI Core supports full lifecycle management of AI scenarios. Access generative AI capabilities and prompt lifecycle management via the generative AI hub.

The SAP Mobile Development Kit (MDK) enables developers and technical business users to build multi-channel applications. It allows you to build your application once, in an integrated development environment, and run it natively on mobile devices (Android and iOS) and as a web application (online) in the browser.

In this series of blogs, I will showcase how to integrate SAP AI Core services into SAP Mobile Development Kit (MDK) to develop mobile applications with AI capabilities.

1. Subscribe SAP AI Core service and create instance

Please refer to SAP tutorials:

Use Boosters for Free Tier Use of SAP AI Core and SAP AI Launchpad

Prompt LLMs in the generative AI hub in SAP AI Core & Launchpad 

for details on how to setup SAP AI Core service and SAP AI Launchpad.

2. Note down the “client-id” and “client-secret” under credentials of your new instance

3. Create new deployment in SAP AI Launchpad and note down the url

4. Configure new destination for SAP Mobile Development Kit (MDK) Web Client to consume the new AI service deployment

If you want to test and run your app in SAP Business Application Studio (MDK Editor) and deploy it as a web app running on SAP Business Technology Platform (BTP), you need to configure the BTP destination for your AI service deployment of SAP AI Core services.

an example of destination configuration is as below

#
#Wed Jul 03 03:57:27 UTC 2024
Type=HTTP
clientId=sb-xxxxxxxxx|xsuaa_std!xxxxx
clientSecret=xxxxxxxxxxxx
HTML5.DynamicDestination=true
Authentication=OAuth2ClientCredentials
URL.headers.AI-Resource-Group=default
Name=AzureOpenAI
tokenServiceURL=https://test-int.authentication.sap.hana.ondemand.com/oauth/token
URL=https://api.ai.prod.eu-central-1.aws.ml.hana.ondemand.com/v2/inference/deployments/d123456789c
ProxyType=Internet
tokenServiceURLType=Dedicated
URL.headers.Content-Type=application/json
WebIDEEnabled=true

5. Configure your SAP Mobile Service instance to consume the new AI service deployment

You can create a new mobile service instance or modify your existing instance to add new mobile connectivity for your AI service deployment on SAP AI Core services.

6. Setup your MDK development and testing environment. 

Download and install the SAP Mobile Services Client on your mobile devices, or build your Mobile Development Kit Client using the MDK SDK, and create a new MDK project in Business Application Studio (MDK Editor) as usual.

If you are new to MDK, please check out the following tutorials

Create Your First MDK Application

Build Your Mobile Development Kit Client Using MDK SDK 

After completing the steps mentioned above, our next blog will explore integrating SAP AI Core services into SAP Mobile Development Kit (MDK) to develop mobile applications with AI capabilities.

 

 

​ SAP AI Core is a service in the SAP Business Technology Platform that is designed to handle the execution and operations of your AI assets in a standardized, scalable, and hyperscaler-agnostic way. It provides seamless integration with your SAP solutions. Any AI function can be easily realized using open-source frameworks. SAP AI Core supports full lifecycle management of AI scenarios. Access generative AI capabilities and prompt lifecycle management via the generative AI hub.The SAP Mobile Development Kit (MDK) enables developers and technical business users to build multi-channel applications. It allows you to build your application once, in an integrated development environment, and run it natively on mobile devices (Android and iOS) and as a web application (online) in the browser.In this series of blogs, I will showcase how to integrate SAP AI Core services into SAP Mobile Development Kit (MDK) to develop mobile applications with AI capabilities.1. Subscribe SAP AI Core service and create instancePlease refer to SAP tutorials:Use Boosters for Free Tier Use of SAP AI Core and SAP AI LaunchpadPrompt LLMs in the generative AI hub in SAP AI Core & Launchpad for details on how to setup SAP AI Core service and SAP AI Launchpad.2. Note down the “client-id” and “client-secret” under credentials of your new instance3. Create new deployment in SAP AI Launchpad and note down the url4. Configure new destination for SAP Mobile Development Kit (MDK) Web Client to consume the new AI service deploymentIf you want to test and run your app in SAP Business Application Studio (MDK Editor) and deploy it as a web app running on SAP Business Technology Platform (BTP), you need to configure the BTP destination for your AI service deployment of SAP AI Core services.an example of destination configuration is as below##Wed Jul 03 03:57:27 UTC 2024Type=HTTPclientId=sb-xxxxxxxxx|xsuaa_std!xxxxxclientSecret=xxxxxxxxxxxxHTML5.DynamicDestination=trueAuthentication=OAuth2ClientCredentialsURL.headers.AI-Resource-Group=defaultName=AzureOpenAItokenServiceURL=https://test-int.authentication.sap.hana.ondemand.com/oauth/tokenURL=https://api.ai.prod.eu-central-1.aws.ml.hana.ondemand.com/v2/inference/deployments/d123456789cProxyType=InternettokenServiceURLType=DedicatedURL.headers.Content-Type=application/jsonWebIDEEnabled=true5. Configure your SAP Mobile Service instance to consume the new AI service deploymentYou can create a new mobile service instance or modify your existing instance to add new mobile connectivity for your AI service deployment on SAP AI Core services.6. Setup your MDK development and testing environment. Download and install the SAP Mobile Services Client on your mobile devices, or build your Mobile Development Kit Client using the MDK SDK, and create a new MDK project in Business Application Studio (MDK Editor) as usual.If you are new to MDK, please check out the following tutorialsCreate Your First MDK ApplicationBuild Your Mobile Development Kit Client Using MDK SDK After completing the steps mentioned above, our next blog will explore integrating SAP AI Core services into SAP Mobile Development Kit (MDK) to develop mobile applications with AI capabilities.    Read More Technology Blogs by SAP articles 

#SAP

#SAPTechnologyblog

You May Also Like

More From Author

+ There are no comments

Add yours