From 4352da9caec766a40a61be4a109d5688e54f04be Mon Sep 17 00:00:00 2001 From: wenki <946366658@qq.com> Date: Mon, 6 Jan 2025 23:58:24 +0800 Subject: [PATCH] support cordova-plugin-openinstall (#4892) --- .../plugins/openinstall/index.ts | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/@awesome-cordova-plugins/plugins/openinstall/index.ts diff --git a/src/@awesome-cordova-plugins/plugins/openinstall/index.ts b/src/@awesome-cordova-plugins/plugins/openinstall/index.ts new file mode 100644 index 0000000000..14c1d50d0e --- /dev/null +++ b/src/@awesome-cordova-plugins/plugins/openinstall/index.ts @@ -0,0 +1,56 @@ +import { Injectable } from '@angular/core'; +import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core'; + +export interface ConfigOptions { + androidId?: string; + serialNumber?: string; + simulatorDisabled?: boolean; + storageDisabled?: boolean; + adEnabled?: boolean; + macDisabled?: boolean; + macAddress?: string; + imeiDisabled?: boolean; + imei?: string; + gaid?: string; + oaid?: string; +} + +@Plugin({ + pluginName: 'OpenInstall', + plugin: 'cordova-plugin-openinstall', + pluginRef: 'openinstall', + repo: 'https://github.com/openinstall/cordova-plugin-openinstall', + platforms: ['Android', 'iOS'], +}) +@Injectable() +export class OpenInstall extends AwesomeCordovaNativePlugin { + @Cordova({ sync: true, platforms: ['Android'] }) + configAndroid(options: ConfigOptions): void {} + + @Cordova({ sync: true }) + serialEnabled(enabled: boolean): void {} + + @Cordova({ sync: true }) + clipBoardEnabled(enabled: boolean): void {} + + @Cordova({ sync: true }) + init(): void {} + + @Cordova({ sync: true }) + getInstall(onSuccess: Function, onError: Function, time: number): void {} + + @Cordova({ sync: true, platforms: ['Android'] }) + getInstallCanRetry(onSuccess: Function, onError: Function, time: number): void {} + + @Cordova({ sync: true }) + registerWakeUpHandler(onSuccess: Function, onError: Function): void {} + + @Cordova({ sync: true }) + reportRegister(): void {} + + @Cordova({ sync: true }) + reportEffectPoint(pointId: string, pointValue: number, extras?: { [key: string]: string }): void {} + + @Cordova({ sync: true }) + reportShare(onSuccess: Function, onError: Function, shareCode: string, sharePlatform: string): void {} +}