Issue
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
This is the message I am getting on admob page. All of my apps are built with ionic. Are there tutorials how to implement this sdk with ionic?
Solution
you just need android tutorials, which is provided by google in the 'learn more' section or in here.
after you've built your project into android, just open android studio with your android folder project (by either npx cap open android
command, or manually opening android studio and open the android folder in your project). then you need to make the changes mentioned in the tutorial (if you want to go with the google's way and not other CMPs).
the only issue is that the onCreate
function that you need to override is in capacitor bridge file in node_modules
(which is located here:
\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\BridgeActivity.java
). you need to be careful that you might need to replace the file everytime your node_modules
are recreated, before building apks. the better way would be to wait until someone writes a plugin for this (I didn't find any plugin yet) or write one yourself.
also I'd note that the AndroidManifest.xml
is located in android\app\src\main
and the build.gradle
file in documents is the one located in android\capacitor-cordova-android-plugins
Answered By - AmirAli Saghaei
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.