cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle app setting functionality in MDK app?

ptw044
Explorer
0 Kudos

Hi Team,

We are checking on how to handle fiori App Sttings functionality in sap mdk app.

whenever user is opening the app for the first time, we will check app specific setting then we will fetch values from app specific value and set those values in application

Setting plant value in the app from app setting

Could you please guide us on how to achieve app setting functionality in the MDK app

Regards

Prakash

Accepted Solutions (0)

Answers (1)

Answers (1)

robinkuck
Product and Topic Expert
Product and Topic Expert

Hi Prakash,

for MDK you can achieve the same functionality using the NativeScript Application Settings module (https://v7.docs.nativescript.org/ns-framework-modules/application-settings / https://help.sap.com/doc/f53c64b93e5140918d676b927a3cd65b/Cloud/en-US/docs-en/guides/getting-started... which uses the API of SharedPreferences on Android and NSUserDefaults on iOS.

Below you can find a JS rule for storing a string value:

export default function SetAppSettingsValue(clientAPI, key, value) {
    let appSettingsModule = clientAPI.nativescript.appSettingsModule;
    appSettingsModule.setString(key, value);
}

Best regards,

Robin