通过ionic添加UMP SDK

n9vozmp4  于 9个月前  发布在  Ionic
关注(0)|答案(1)|浏览(82)
Beginning January 16, 2024, Google will require all publishers serving ads to EEA and 
UK users to use a Google-certified Consent Management Platform (CMP). 
You can use any Google-certified CMP for this purpose, including Google's own consent management solution. 
If you are interested in using 
Google's consent management solution, start by setting up your 
GDPR message and implementing the UMP SDK. Learn more

这是我在AdMob页面上看到的消息。我所有的应用程序都是用ionic构建的。有教程如何实现这个sdk与离子?

jobtbby3

jobtbby31#

你只需要Android教程,这是由谷歌在“了解更多”部分或在here中提供的。
在你将你的项目构建到android中之后,只需打开android studio和你的android文件夹项目(通过npx cap open android命令,或者手动打开android studio并打开项目中的android文件夹).然后,你需要作出的变化,在教程中提到(如果你想去与谷歌的方式,而不是其他中医)。
唯一的问题是,您需要覆盖的onCreate函数位于node_modules中的电容器桥文件中(位于此处:\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\BridgeActivity.java)。你需要小心,你可能需要替换文件每次你的node_modules被重新创建,在构建apk之前.更好的方法是等到有人为此写了一个插件(我还没有找到任何插件)或者自己写一个。我还注意到AndroidManifest.xml位于android\app\src\main中,文档中的build.gradle文件位于android\capacitor-cordova-android-plugins

相关问题