简体   繁体   中英

Firebase Remote Config: controlling ads

Does anyone know how to turn ads on and off in Android using firebase Remote Config? I have been given an assignment in which i have to place native ads in android app and then turn them on and off using firebase remote config.

You need to use Firebase Remote Config SDK for your application.

You make a call to this SDK to fetch the data from Firebase servers in the needed place (in most cases it's an app initialization stage) and use the actual value for splitting your in-app logic to decide whether you need to show an ad.

If the request to fetch data failed (for instance, if the app is launching without internet), it will use the data from the last successful fetch. If this is the first launch and it's not connected to the Internet, the default values will be used which you set in the client-side code when integrating Firebase Remote Config SDK.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM