Hot to integrate Meta(Facebook) Audience Network binding with Admob? - android

Based on my understanding those are the required steps to integrated binding Audience Network:
Completed the Audience Network Setup
Integrating Facebook Audience Network with Mediation
Add a Network Security Configuration File
I am implementing native ads, and there is one extra step for it that I don't understand
The docs says:
Some Facebook native ad assets don't map one to one to Google native
ad assets. Such assets are passed back to the publisher in a bundle in
getExtras() method in NativeAd. Here's a code example showing how to
extract these assets:
Bundle extras = nativeAd.getExtras();
if (extras.containsKey(FacebookAdapter.KEY_SOCIAL_CONTEXT_ASSET)) {
String socialContext = extras.get(FacebookAdapter.KEY_SOCIAL_CONTEXT_ASSET);
...
}
What am I supposed to do with the socialContext? Also, it's an object and not a string.
At moment, I am getting Admobs ads, but for Meta, I am able to make binding requests and have some fill rate, but there are no impressions. All the rest is green.
In the Publisher Onboarding Debugger it shows that I don't properly integrate the impressions.

Related

Firebase Dynamic Links - Can't get Url in android after install app from play store

If I install the app when clicking the dynamic link. All of that information from dynamic should be still available when I open the app for the first time.How can I get that information? It is not working when I use this: getInitialLink() returns Promise<string|null>;
Since, you haven't mentioned - I'm assuming you are having problems with shorter urls, if that's the case try putting the longer url.
Or refer here on Simon's answer: When I use the long instead of short links, everything works perfectly fine.
On Android, you use the getInvitation() method to get data from the Dynamic Link:
AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, false).setResultCallback
(/* ... */);
Then, in the callback, you can get the data passed in the Dynamic Links link parameter by calling the getDeepLink() method:
Firebase Documentation - Use Case
For future reference or detailed answer on Firebase Dynamic Links
Behave just like normal Links
In cases where the application doesn’t require installation (say, if it’s already installed) then clicking the Dynamic Link will automatically open the link to the desired screen.
Dynamic Links have a very simple process flow:
The user begins by clicking the Dynamic Link
If the the needs of the Dynamic Link target are satisfied (this is, the application being installed) then the user is navigated to the target location
Otherwise, if the application requires install in order to navigate
to the Dynamic Link target, the the user is taken to the point of
install for the application. Once the application has been installed,
the user is navigated to the target location of the Dynamic Link
And if that wasn’t all, we can integrate Dynamic Links with Firebase Analytics to track the interaction with any links that we generate for our applications. But if we only require simple tracking, then we can use the automatic built-in analytics from the Dynamic Links panel within the Firebase Console where we can also obtain attribution and referrer information for interacted links with no extra effort required from our side.
What makes it different from Google Analytics?
One of the first things that came to my mind when I read about Firebase Analytics was, “What about my Google Analytics setup?”. So if you already have Google Analytics in place, then why would you make the switch to Firebase Analytics? Well, here’s a couple of differences between the two:
Audiences
We can use Firebase Analytics to create Audiences — these are groups of users that we can then interact with using other Firebase service such as Firebase Notifications and / or Firebase Remote Config.
Integration with other Firebase Services
An awesome thing with Firebase Analytics is that we can integrate other Firebase services with analytics. For example, creating an Audience of users who have experienced a crash reported through Firebase Crash Reporting.
Lower Method Count
The Google Analytics dependency on Android has a total count of 18,607 methods and has a total of 4kb used for dependancies. On the other hand, Firebase Core (for Analytics) has a method count of 15,130 and only 1kb used for dependancies.
Automatic Tracking
When we add the firebase core dependency, it will automatically begin tracking a collection of user engagement events and device information for us — this is useful if you’re looking to only collect the minimal data for your app.
Unlimited Reporting
For up to 500 events, Firebase Analytics provides us with unlimited reporting straight out of the box for free!
No Singleton Initialisation
When setting up Google Analytics on Android we are required to initialize a Singleton instance. Firebase Analytics are simply available by fetching the instance directly from where we wish to track data. This isn’t much effort obviously but just makes the setup flow slightly easier.
Single Console
All of the data for every Firebase service is available for a single console. That makes it both easier and quicker for us to navigate from checking the analytic stats for our app to viewing the latest crash reports.
It looks like this is a react-native-firebase open bug for android
For fix the only thing that is required to be changed in module code:
private boolean isInvitation(PendingDynamicLinkData pendingDynamicLinkData) {
return FirebaseAppInvite.getInvitation(pendingDynamicLinkData) != null;
}
to
private boolean isInvitation(PendingDynamicLinkData pendingDynamicLinkData) {
FirebaseAppInvite invite = FirebaseAppInvite.getInvitation(pendingDynamicLinkData);
if (invite != null && invite.getInvitationId() != null && !invite.getInvitationId().isEmpty()) {
return true;
}
return false;
}
Bug reference : https://github.com/invertase/react-native-firebase/issues/1273
Please Check Your Manifest file
open AndroidManifest.file => In your activity tag there is intent-filter tag put below line in that tag.
<data android:scheme="https" android:host="your.dynamic.link" />
<data android:scheme="http" android:host="your.dynamic.link" />
If already done then check this link for the full blog on the dynamic link with react native.
Link: http://blog.logicwind.com/react-native-dynamic-links-using-firebase/
I hope this will help. sorry for the typos.

Querying active directory to get attribute on android

Hi (i'm new to this so you'll need to forgive me)
My end goal is to be able to grab an attribute from Microsoft azure active directory for use in my app. The issue being that while i have done a fair amount of research i'm still at a loss of how to achieve my end result.
I have found that Microsoft has an API of sorts that allows authentication with azure AD but i'm unable to find any information as to how i query an attribute.
Possible solutions I've looked into:
https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-devquickstarts-android (Microsoft's android AD API)
Using Java to find simple Active Directory Information (this isn't a possible solution as i need azure integration as the AD server isn't outward facing).
I'm sure that the solution to this isn't a complex one but i would be grateful if someone could point me in the right direction. I don't have much experience with AD which is why i'm struggling here.
You could learn how to integrate Azure AD into an Android app from here . You could call Microsoft Graph API or Azure AD Graph API to access AAD resource :
To call Microsoft Graph API/Azure AD Graph API from Android Native Client application , In Settings blade of that app in azure portal, select Required Permissions and select Add. Locate and select Windows Azure Active Directory(Azure AD graph api )/Microsoft Graph(microsoft graph api) , add the appropriate permissions under Delegated Permissions .
To get access token With ADAL for android :
mContext.acquireToken(MainActivity.this, resource, clientId, redirect, user_loginhint, PromptBehavior.Auto, "", callback);
resource is required and is the resource you're trying to access.So you need to set that value to "https://graph.windows.net" if you want to call Azure AD graph api , and "https://graph.microsoft.com" if you want to call Microsoft Graph Api.

No Fill from server Failed to load add 3 Android adMob Using SDKBox

I have implemented AdMob using SDKBox for the cocos2d-x android project as well as the iOS project the same implementation works fine for iOS but on android, it is throwing an error that No Fill from the server. Failed to load the ad.
Error code 3.
Any help is appreciated Thanks.
The error code say that the ad server cant supply an ad for your request Reference
Ad fill depends on several parameters, main ones are Geo location of the user, device model and app content rating...
From what country are you making the request? try to use a proxy and request an ad as a US user, admob supply close to 100% for US users

Facebook Audience Network - Get Ad Placement Id

I'm implementing the Facebook Audience Network SDK across iOS and Android. I set certain flags by checking a dictionary for the existence of an Ad, by looking up the Ads placementId. On iOS you can access this via the delegate methods easily, as below:
- (void)adView:(FBAdView *)adView didFailWithError:(NSError *)error
{
NSLog(#"Adview placement id is: %#", adView.placementId);
}
However on Android, the Ad object (in the Ad's listener) doesn't seem to have a placementId property as it's encapsulated. So this is either the usual inconsistencies between third-party SDK's cross platform, or i'm missing something?
Is it possible to retrieve the Ads placement id directly from the Ad object on Android, as you can do on iOS?
(Note: Facebook's docs don't seem to mention it)
Have you checked the AdView object in the Android implementation? it contains the placementId as well.

Can i test facebook audience network for my unpublished app?

Is this possible? Maybe there are some test PLACEMENT_ID for this?
I just want to play around and see capability of facebook native ads, but i can't create placement id for my app without "Applying for Audience Network", which requires url from google play.
You can use these ids
public String BANNER_PLACEMENT_ID = "549167759165615_549192715829786";
public String INT_PLACEMENT_ID = "549167759165615_549190905829967";
public String RV_PLACEMENT_ID = "549167759165615_549192132496511";
public String NATIVE_PLACEMENT_ID = "549167759165615_551513495597708";
for testing purpose facebook audience network
Just recently Facebook Audience Network allowed publishers/users to test with Facebook Ads without "Applying for Audience Network" or submitting an application.
You can start from here, https://developers.facebook.com/docs/audience-network Assuming that you have already signed into Facebook, Click on "Get Started" and create a Facebook App if you haven't yet. Enter the Audience Network tab on the left side panel. Then simply just create an ad placement and you can start testing from there with the newly created ad placement.
Note, your placements will only serve Facebook Ads to the developers/admins of the app until Audience Network approves your app.
Yes you can check this Link Here
AdView(this, "IMG_16_9_APP_INSTALL#YOUR_PLACEMENT_ID", AdSize.BANNER_HEIGHT_50);
According to facebook documentation you can use test ads as follow:
TEST_AD_TYPE#YOUR_PLACEMENT_ID
You can find test ad type from this link below:
https://developers.facebook.com/docs/audience-network/setting-up/test/test-device
And then just place your ad placement id after # then It will something look like this:
'IMG_16_9_APP_INSTALL#28123678890986787880_2231119230931372'

Categories

Resources