i try to run the downloaded code from admob, but that not shows adbanner in screen, even i uses publisher id in pice of code.
bannerView_.adUnitID = MY_BANNER_UNIT_ID;
Please answer.
Enable test ads to check whether the problem is with your code or with AdMob:
GADRequest.isTesting = YES;
Do what jnic suggests. Also, check if there is a message from AdMob in the console. There might be a message that says not showing ads is normal.
Related
How and where do I implement the code to set my test device ID for Admob in Flutter apart from setting it in my ADMOB UI? This line "Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("myTestDeviceId"))" keeps popping
Add
RequestConfiguration configuration =
RequestConfiguration(testDeviceIds: ["ID HERE"]);
And
MobileAds.instance.updateRequestConfiguration(configuration)
To your main function after mobileads.instance.initialize();
Next to the message you mentioned would be your device id ..
No need to add it in the admob setting after this
And then use actual ad units afterwards
Once the AdMob banner is displayed, it blinks the screen knowing that there is no error reporting in the console!
The screen viewing the ad includes a spinner that runs until some data are fetched from an API, so I kept the spinner loading until the Ad is present to avoid blinking, but the screen still blinks when Ad is shown.
This is a sample from my code:
this.admobFree.banner.config(ConfigData.bannerAds.config);
// autoShow = true in config.
this.admobFree.banner.prepare().then(()=>{
// Boolean variable that is assigned to the *ngIf directive to keep the spinner until the
// banner is loaded.
// <ion-spinner name="crescent" *ngIf="!isDataLoaded&&!(isBannerLoaded)"></ion-spinner>
isBannerLoaded=true;
});
What is causing the screen blink when a banner is viewed? And how to solve this?!
(ionic 4)
It seems that it is a fault in the ionic AdMob plugin where this issue is reported on the ionic forum without proposed solutions!
https://forum.ionicframework.com/t/admob-screen-flash-on-load/25526
I had solved this by waiting for the AdMob banner to be shown and then display my actual view where this is controlled by using the *ngIf directive and a Boolean variable like this:
isContentVisible: boolean=false;
....
this.admobFree.banner.show().then(()=>{
this.isContentVisible=true;
});
This will decrease the blink by 95%, but it may take some seconds to display if the internet connection is weak!
By the way the blink is slight, and will not be a clearly noticed issue, but to be professional it must be solved!
Hope the the ionic AdMob developers will solve that!
I'm developing a lockscreen application using theos and part of the functionality requires icon images of certain applications on the phone. How can I go about getting those icon images and displaying them on the lockscreen of the phone?
I've tried everything I could think of so far and have searched through the springboard headers with no luck. I've specifically been trying retrieving the images from SBApplication and SBIconModel from suggestions I found through google, but still I have no luck.
Any help is greatly appreciated. Thanks!
After you %hook a class, inside the method you're using, do the following if for example you're trying to get the icon for the mail app
// Get the SBApplication for the mail app
Class $SBApplicationController = objc_getClass("SBApplicationController");
SBApplication *mailApp = [[$SBApplicationController sharedInstance] applicationWithDisplayIdentifier:#"com.apple.mobilemail"];
// Get the SBApplicationIcon for the mail app
SBApplicationIcon *mailAppIcon = [[objc_getClass("SBApplicationIcon") alloc] initWithApplication:mailApp];
The important thing is to get the right DisplayIdentifier of the app you're interested in.
Hope this help! any problems please shout.
Although, I accept the above as the answer, I ended up using the following code, which displays titles and badges:
SBIcon *sbIcon = [model applicationIconForDisplayIdentifier:identifier];
SBIconView *app = [[%c(SBIconView) alloc] initWithDefaultSize];
[app setIcon:sbIcon];
//if you want the titles to be conditional
[app setLabelHidden:!titlesEnabled];
//if you want the badge view to be conditional
id badgeView;
if (device_version >= 6.0) badgeView = MSHookIvar<id>(app, "_accessoryView");
else badgeView = MSHookIvar<id>(app, "_badgeView");
if (badgeView) [badgeView setHidden:!badgesEnabled];
I'm trying to integrate Facebook sharing procedure into my app. I'm using UIActivityViewController like this:
NSArray * activityItems = #[self.imgView.image, self.txtField.text];
UIActivityViewController * activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
[self presentViewController:activityVC animated:YES completion:nil];
Till now all have been working fine. But I've met such problem - when I click on facebook icon and enter the facebook sharing screen the alertView appears:
so the problem is - when I click Setting my controller is just dismissed and nothing happens. For twitter all is working well - when Settings button is clicked my app is going background and the Settings is opened. Why this does not work for Facebook? Any help will be appriciated.
ADDED:
Using SLComposeViewController leads to the same behavior - Settings does not open
iOS 6.0.1 resolve this issue. Update software on device it go setting view.
i am having the same issue you update the ios from 6 to 6.0.1 and remove the verification type **SLServiceTypeFacebook** in **SLComposeViewController** at first.,thats all working fine for me now.
This bug seems to be fixed in new version of iOS (6.0.1) At least I have all working well since my last updgrade.
I just integrated the facebook social framework into my app and had exact same issue on iOS 6.1, i.e. when my facebook account is not setup, I will get this warning, but clicking "Setting" will simply dismiss the dialog instead of bringing me to the device's setting page.
I found out this seems to be a simulator ONLY issue, it works perfectly on real device. I'd suggest you to give a try.
I'm trying to integrate Facebook sharing procedure into my app. I'm using UIActivityViewController like this:
NSArray * activityItems = #[self.imgView.image, self.txtField.text];
UIActivityViewController * activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
[self presentViewController:activityVC animated:YES completion:nil];
Till now all have been working fine. But I've met such problem - when I click on facebook icon and enter the facebook sharing screen the alertView appears:
so the problem is - when I click Setting my controller is just dismissed and nothing happens. For twitter all is working well - when Settings button is clicked my app is going background and the Settings is opened. Why this does not work for Facebook? Any help will be appriciated.
ADDED:
Using SLComposeViewController leads to the same behavior - Settings does not open
iOS 6.0.1 resolve this issue. Update software on device it go setting view.
i am having the same issue you update the ios from 6 to 6.0.1 and remove the verification type **SLServiceTypeFacebook** in **SLComposeViewController** at first.,thats all working fine for me now.
This bug seems to be fixed in new version of iOS (6.0.1) At least I have all working well since my last updgrade.
I just integrated the facebook social framework into my app and had exact same issue on iOS 6.1, i.e. when my facebook account is not setup, I will get this warning, but clicking "Setting" will simply dismiss the dialog instead of bringing me to the device's setting page.
I found out this seems to be a simulator ONLY issue, it works perfectly on real device. I'd suggest you to give a try.