'my ads do not show while debugging and also while internal testing, lgcat: E/Ads: Fail to get isAdIdFakeForDebugLogging""
this is my xml code i am trying to show the ad within a fragment every thing work fine except for the ads what ever i did it doesnot show , even when debuggibg using another device also while pushing a new release with new version, it is now about 3 days "processing " and now notifications are sent to testers. is it normal to take this time while processing a new release.
<com.google.android.gms.ads.AdView
android:id="@+id/adView_method_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:visibility="visible"
app:adSize="SMART_BANNER"
app:adUnitId="ca-app-pub-6189698627273347/8329725005">
</com.google.android.gms.ads.AdView>
my java code
MobileAds.initialize(getActivity().getApplicationContext(), new OnInitializationCompleteListener() {
@Override
public void onInitializationComplete(InitializationStatus initializationStatus) {
}
});
List<String> testDeviceIds = Arrays.asList("3042108d-9adf-4586-b166-10ca1ad1abe1");
RequestConfiguration configuration =
new RequestConfiguration.Builder().setTestDeviceIds(testDeviceIds).build();
MobileAds.setRequestConfiguration(configuration);
adView = new AdView(getActivity());
AdRequest adRequest = new AdRequest.Builder().build();
adView.setAdUnitId("ca-app-pub-6189698627273347/8329725005");
adView.setAdSize(AdSize.SMART_BANNER);
adView.loadAd(adRequest);
Solution 1:[1]
By default .then accepts dynamic parameter but if you wish to pass different parameter then you have change Function(dynamic) to Function(YOURTYPE) try below code:
static void getCurrentOnlineUserInformation()async{
User user = _firebaseAuth.currentUser;
String userid = user.uid;
DatabaseReference reference =
FirebaseDatabase.instance.ref().child('userProfile');
reference.child(userid).once().then(<DataSnapshot>(DataSnapshot dataSnapshot){
}
);
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Diwyansh |
