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

华为荣耀手机获取OAID首次为空,要手动调用才能获取 #88

Open
godcop opened this issue Apr 25, 2024 · 4 comments
Open

Comments

@godcop
Copy link

godcop commented Apr 25, 2024

即使提前用DeviceIdentifier.register(this)方法预处理后,依然需要手动再次调用DeviceIdentifier.getOAID(this)方法才能获取,而不是立即就能自动获取。除华为荣耀以外,其它手机没问题。

比如一个场景:当应用启动时使用DeviceIdentifier.getOAID(this)方法自动获取OAID,这样就获取不到。但当应用启动完毕后,再调用该同步方法就没问题。这里说的应用启动,是指完全杀掉该应用的进程后启动,因为如果不杀掉进程,这样偶尔是能获取的。

@xp8812
Copy link

xp8812 commented Apr 26, 2024

我这的荣耀magic6 没有这个问题

@TianShun2018
Copy link

用异步的方式试试,我同步的也拿不到,异步的就拿到了,但是还没在不同的机型测试

@GuoLiangjun123
Copy link

用异步的方式试试,我同步的也拿不到,异步的就拿到了,但是还没在不同的机型测试

荣耀设备上首次启动,同步和异步都有可能拿不到,偶现

@godcop
Copy link
Author

godcop commented May 9, 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

4 participants