Android Facebook Native ads error: 1001 no fill on user device - facebook-audience-network

Our application use Facebook Native Ad via mediation platform Mopub, and it works good, but we should move to another platform.
I've replaced SDK platform, using the same placementId and app_id and tested my application as Developer.
Everything works good in test mode with real ads also, but I cannot get ads on real devices.
I tried to implement Facebook Native without any mediation platforms(code in the bottom), but still have the same result.
So the issue is not in partner platform,but I cannot get ads on real devices. Facebook Native throws error: 1001 no fill
It looks very strange, because I have:
Application has real users and shows ads in the previous version.
Application in PlayMarket(but with the previous implementation) with same package Id, placementId and app_id.
Facebook has checked my app.
I can see requests from new and previous version.
Code and logs:
AndroidManifest:
//...
//...
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/app_id" />
Application build.gradle:
//...
ext {
supportLibraryVersion = '25.3.1'
playServicesVersion = '11.0.1'
FBVersion = "4.25.0"
}
dependencies {
compile project(':library')
compile fileTree(include: ['*.jar'], dir: 'libs')
//...
compile "com.facebook.android:audience-network-sdk:$FBVersion"
//...
}
FacebookNativeLoader.java:
//...
/**
* Initiate ad container for native ad
*/
Override
public View createContentView(Context context) {
log(" createContentView");
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
return inflater.inflate(R.layout.facebook_ad_native_view, null);
}
#Override
public void loadAd(final MyViewManager myViewManager, final ResultListener resultListener) {
log(" loadAd");
adNativeLayout = myViewManager.getContentView();
// Create ad request with Facebook ad PlacementId
adNative = new NativeAd(myViewManager.getContext(), adPlacementId);
//
adNative.setAdListener(new AdListener() {
#Override
public void onError(Ad ad, AdError adError) {
log("FacebookNative Ad Loading Failed." +
"Error:" + NATIVE_LOAD_ERROR +
" ErrorCode:" + adError.getErrorCode() +
" ErrorMessage" + adError.getErrorMessage());
//Call Error to hide ad layout
resultListener.onError(NATIVE_LOAD_ERROR);
}
#Override
public void onAdLoaded(Ad ad) {
log("FacebookNative Ad Loading Completed");
//...
// Download icon for native ad
if (adNative.getAdIcon() != null) {
String iconUrl = adNative.getAdIcon().getUrl();
if (iconUrl != null && iconUrl.length() > 0)
NativeAd.downloadAndDisplayImage(adNative.getAdIcon(), icon);
}
// Download cover for native ad
if (adNative.getAdCoverImage() != null) {
String coverUrl = adNative.getAdCoverImage().getUrl();
if (coverUrl != null && coverUrl.length() > 0)
NativeAd.downloadAndDisplayImage(adNative.getAdCoverImage(), contentImage);
}
//Show debug info
log("adNative.getCalltoAction() - " + adNative.getAdCallToAction());
log("adNative.getBody() - " + adNative.getAdBody());
log("adNative.getClickUrl() - " + adNative.getAdCallToAction());
BaseLockScreenManager.url = adNative.getAdCallToAction();
title.setText(adNative.getAdTitle());
text.setText(adNative.getAdSubtitle());
downloadButton.setText(adNative.getAdCallToAction());
// Add the AdChoices icon
LinearLayout adChoicesContainer = (LinearLayout) adNativeLayout.findViewById(R.id.ad_choices_container);
AdChoicesView adChoicesView = new AdChoicesView(myViewManager.getContext(), adNative, true);
adChoicesContainer.addView(adChoicesView);
//Call Success to show ads
resultListener.onSuccess(true);
}
#Override
public void onAdClicked(Ad ad) {
//Do something
}
#Override
public void onLoggingImpression(Ad ad) {
//Do something
}
});
//Register Ad container to catch user Interactions
adNative.registerViewForInteraction(adNativeLayout);
// Initiate a request to load an ad.
// Loading Ad started here...
adNative.loadAd();
}
In Facebook documentation "error: 1001 no fill" means:
This is a common error seen while testing, and relates to a "No Fill"
response; the most common reason for this is the user is not logged in
to the Facebook App when testing your mobile app or not logged in to
the Facebook mobile website when testing your mobile website.
Error 1001 - No Fill. May be due to one or more of the following:
- User not logged into Native Facebook App on Mobile Device(But real device logged into Native Facebook App)
Limit Ad Tracking turned on (iOS)(but this is not relevant for Android app)
Opt out of interest-based ads turned on (Android) (but I've turned value off)
No Ad Inventory for current user (What does it mean?)
Your testing device must have the native Facebook application installed.(but I tested on real device with real Facebook account)
Your application should attempt to make another request after 30 seconds.(but I'have the same result everytime)
LogCat messages:
Developer device:
FacebookLoader:
I/----FacebookLoader: loadAd
I/----FacebookLoader: createContentView
I/----FacebookLoader: Facebooknative Ad Loading Completed
I/----FacebookLoader: adNative.getCalltoAction() - Learn More
I/----FacebookLoader: adNative.getBody() - LAToken aims to tokenize assets worth $1.2 trillion by 2025.
I/----FacebookLoader: adNative.getClickUrl() - Learn More
User Device:
FacebookLoader:
I/----FacebookLoader: loadAd
I/----FacebookLoader: createContentView
I/----FacebookLoader: FacebookNative Ad Loading Failed.Error:669 ErrorCode:1001 ErrorMessage: No fill
What can be issue of it? Has somebody the same issue?
I'm afraid to make release without ability to be sure that user can see ads, because the main idea of our application is Advertisement.

step 1: goto play store download native Facebook app install and login
step 2: Then test your app "testing add loading success"
Other errors like : " FacebookAdapter: No fillI/TAG: No fill.I/Ads: Ad failed to load : 3"
then : goto Manifest file and add on application level : android:usesCleartextTraffic="true"
<application
.........
android:usesCleartextTraffic="true"
.......
/>

Related

How to Register a device through Azure Notification Hub App Service SDK or manually for a Xamarin Forms App?

So i'm using Azure Notification Hub, and in that i followed their tutorial where they had mentioned to use FCM for Android , configure it and use their API key, and creating a certificate for iOS, which is working flawless
But the problem is i'm working on Xamarin forms, and i'd like to know if i could do the registration manually through API, and i've already written a method to do that in my API Service
public async Task<string> RegisterDevice([FromBody] string handle = null)
{
string newRegistrationId = null;
//newRegistrationId = await hub.CreateRegistrationIdAsync();
//// make sure there are no existing registrations for this push handle (used for iOS and Android)
//if (handle != null)
//{
// var registrations = await hub.GetRegistrationsByChannelAsync(handle, 100);
// foreach (var registration in registrations)
// {
// if (newRegistrationId == null)
// {
// newRegistrationId = registration.RegistrationId;
// }
// else
// {
// await hub.DeleteRegistrationAsync(registration);
// }
// }
//}
newRegistrationId = await hub.CreateRegistrationIdAsync();
return newRegistrationId;
}
But i'm not able to understand how the device would be linked to this registration ID and/or what is a pns handle, i know the abbreviation but i dont know how to use it in this case or if at all is it necessary?
Any help would be deeply appreciated
While registering Azure Notification Hub, If you want to ask for Push permissions after login, you have to call RegisterForRemoteNotifications(); (iOS) & CreateNotificationChannel(); (Android) after Login.
What you're asking would require a few steps-
You would have to created a DependencyService like this, which would require creating an Interface like IPushRegistrationService with a RegisterForPush() function that would basically be called after login:
var pushService = DependencyService.Get<IPushRegistrationService>();
pushService.RegisterForPush();

Unable to see in the Unregistered tab of Google Beacon Tools app the Eddystone UID when trasmitting using the Android Beacon Library

I see the UID transmitted in Locate App from Radius but I am not able to see in Google Beacon Tools app . I want to register in Google the Eddystone-UID when I use a transmitter build with the Beacon Library. Code is the following. What am I not considering?
uuid = "0x56987753868952999aaa";
major = "0x577886654591";
beacon = new Beacon.Builder()
.setId1(uuid)
.setId2(major)
.setManufacturer(0x0118)
.setTxPower(-56)
.build();
beaconParser = new BeaconParser()
.setBeaconLayout("s:0-1=feaa,m:2-2=00,p:3-3:-41,i:4-13,i:14-19");
beaconTransmitter = new BeaconTransmitter(getApplicationContext(),
beaconParser);
beaconTransmitter.setAdvertiseMode(
AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY);
beaconTransmitter.startAdvertising(beacon, new AdvertiseCallback() {
#Override
public void onStartSuccess(AdvertiseSettings settingsInEffect) {
Log.d(TAG, "EMISION COORECTA: ");
super.onStartSuccess(settingsInEffect);
}

Is it possible to run a timer task when the application is closed?

I have just completed learning Java, now I am working on creating Android apps. But I am not so expert in this field. I have just created an Android app which has some advertisements like banner ad, interstitial ad. I want to give an opportunity to the user to stop those Ads for 24 hours if they watch a video AD. But I'm not familiar with timer task any suggestion will be very appreciating. here is the code that I imagine :
// load from shared preference
SharedPreference spref = getSharedPreference("directory_name", 0);
if(spref.getBoolean("ad_key", false)==true){
// all ads should stop showing
}else{
// ads are showing
}
// help me here in timer task
As ad reward
--> start countadown
--> if(countDown>0){
doneWatchindAd(true);
}else{
doneWatchindAd(false);
}
// store to shared preference
public void doneWatchindAd(bollean cond){
SharedPreference spref = getSharedPreference("directory_name", 0);
SharedPreference.Editor editor = spref.edit();
editor.putBoolean("ad_key", cond);
editor.commit();
}

Launch Cordova Windows App with Parameters

Am finding hard to launch Cordova Windows App, from another native Windows App.
Using Protocol invocation, I am passing few parameters to Cordova Windows App, to see if the Cordova app identifies those parameters from the Windows Native App.
Is there anyway to pass Parameters from native Windows App to Cordova App, so that Cordova App identifies the parameters as arguments?
In native windows 8 store app I am using app protocol association to send parameters one app to another app. like
in sender app:
mainpage.xaml.cs on button click
var url = "apptest:?" + name;
Uri uri = new Uri(url);
await Launcher.LaunchUriAsync(uri);
in received app
Package.appxmanifest:
Declarations --> available declarations add --> protocol --> name = apptest
app.xaml.cs
protected override void OnActivated(IActivatedEventArgs args)
{
if (args.Kind == ActivationKind.Protocol)
{
ProtocolActivatedEventArgs protocolArgs = args as ProtocolActivatedEventArgs;
var rootFrame = new Frame();
rootFrame.Navigate(typeof(MainPage), protocolArgs);
Window.Current.Content = rootFrame;
}
Window.Current.Activate();
}
mainpage.xaml.cs
protected override void OnNavigatedTo(NavigationEventArgs e)
{
ProtocolActivatedEventArgs pa = e.Parameter as ProtocolActivatedEventArgs;
if(pa != null)enter code here
{
string qS = pa.Uri.Query;
if (!string.IsNullOrEmpty(qS))
{
Txt_name.Text = qS;
}
}
}
in this way i will take the data from sender app.
Same like is there any way to receive data from windows 10 native app to cordova app. it is very hard to find the solution. not able to find the exact piece of code.

Can't singin into SkyDrive account. WP7

I am making SkyDrive integration in my app for Windows phone. Every time after login screen in signInButton_SessionChanged it gives me e.Status = Unknown with e.Error = "".
I tried download some examples for SkyDrive integration
http://rabeb.wordpress.com/2012/01/07/using-skydrive-in-your-windows-phone-applications-part-1/
, but it gives the same result.
private void signInButton1_SessionChanged(object sender, Microsoft.Live.Controls.LiveConnectSessionChangedEventArgs e)
{
if (e.Status == LiveConnectSessionStatus.Connected)
{
session = e.Session;
client = new LiveConnectClient(session);
infoTextBlock.Text = "Signed in.";
}
else
{
infoTextBlock.Text = "Not signed in.";
client = null;
}
}
I tried to change App ID ond Live account also, but nothing helps. Please help.
This can happen if in application settings at Live Connect Developer Center you haven't specified that it is a Mobile client app:

Resources