Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init每次都会调用 #4

Closed
spring321 opened this issue Jan 30, 2024 · 1 comment
Closed

init每次都会调用 #4

spring321 opened this issue Jan 30, 2024 · 1 comment

Comments

@spring321
Copy link

final _openInstallFlutterPlugin = OpeninstallFlutterPlugin();
void init() async {
await getDefaultChannelCode();
await enableAd();
_openInstallFlutterPlugin
..init(dataHandler)
..install(dataHandler);
}

dataHandler每次打开应用都会调用

@wenkiwu
Copy link
Collaborator

wenkiwu commented Jan 30, 2024

_openinstallFlutterPlugin.init(wakeupHandler)
用于初始化,并且设置拉起回调
_openinstallFlutterPlugin.install(installHandler)
用于获取安装参数

SDK初始化成功后内部将会一直保存安装参数,每次调用install都会返回安装参数。
在获取完成后如果不需要再次获取,可以在本地设置一个标识以便于下次不再调用此方法

@wenkiwu wenkiwu closed this as completed Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants