From c8f827691e98519794e24e973410960f91c95abd Mon Sep 17 00:00:00 2001 From: Alex Ryltsov Date: Mon, 10 Mar 2025 19:21:00 +0200 Subject: [PATCH] feat (launch-navigator): Add setApiKey method #4915 (#4916) --- .../plugins/launch-navigator/index.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/@awesome-cordova-plugins/plugins/launch-navigator/index.ts b/src/@awesome-cordova-plugins/plugins/launch-navigator/index.ts index 9e9bb54a6..455d2fbcc 100644 --- a/src/@awesome-cordova-plugins/plugins/launch-navigator/index.ts +++ b/src/@awesome-cordova-plugins/plugins/launch-navigator/index.ts @@ -323,7 +323,7 @@ export class LaunchNavigator extends AwesomeCordovaNativePlugin { */ @Cordova({ successIndex: 1, - errorIndex: 2 + errorIndex: 2, }) navigate(destination: string | number[], options?: LaunchNavigatorOptions): Promise { return; @@ -447,4 +447,16 @@ export class LaunchNavigator extends AwesomeCordovaNativePlugin { */ @Cordova({ sync: true }) userSelect(destination: string | number[], options: LaunchNavigatorOptions): void {} + + /** + * Sets the Google API key for Android. + * + * @param api_key {string} - Google API key. + * Note: This function is also available on iOS but it does nothing. This is to keep the interface consistent between the platforms + * @returns {Promise} + */ + @Cordova({ platforms: ['Android', 'iOS'] }) + setApiKey(api_key: string): Promise { + return; + } }