我想知道什么时候用 firebase_admob
,我需要这个代码吗?
如果是这样,在发布应用程序时,我应该为keywords
写些什么? , contentUrl
, 和 testDevices
?
我的意思是,在发布应用程序时,testDevices
甚至有必要吗?
MobileAdTargetingInfo targetingInfo = MobileAdTargetingInfo(
keywords: <String>['flutterio', 'beautiful apps'],
contentUrl: 'https://flutter.io',
birthday: DateTime.now(),
childDirected: false,
designedForFamilies: false,
gender: MobileAdGender.male, // or MobileAdGender.female, MobileAdGender.unknown
testDevices: <String>[], // Android emulators are considered test devices
);
最佳答案
此信息用于向用户展示广告。
您应该使用 关键词 与您的应用程序相关。例如:如果您的申请与医院有关,那么您可以使用医学作为关键字。
如果您为特定应用程序开发任何网站,您可以添加您的网站网址,如 contentUrl .
测试设备 是您在其中进行测试的设备的 ID。如果您想在真实设备中测试您的应用程序,那么您必须添加测试设备 ID,因为它可以帮助您避免广告暴民。
关于flutter - 我需要 Flutter Firebase AdMob 包的哪些 MobileAdTargetingInfo 属性才能发布?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53590584/