fbsamples / audience-network

Open source projects to demonstrate SDK and sample code usages and integration, and to collaborate and support peers in this community.
https://developers.facebook.com/docs/audience-network
Other
319 stars 370 forks source link

AudienceNetworkAds.initialize() error in Logcat (Android Studio) #93

Closed Izzyjm closed 5 years ago

Izzyjm commented 5 years ago

Hello when running my app in Android Studio I get this log in the logcat "You don't call AudienceNetworkAds.initialize(). Some functionality may not work properly" but no where in the FAN network documentation did it ever mention to make this call or didn't even show in the example code so how will developers know to include this ? and what functionality wouldn't' work properly because Im still receiving ads ? also I don't call an initialize method in my iOS app for FAN ads and I don't receive this warning so i'm kind of of confused why the documentation here makes no mention of this "intialize()" method ? ( https://developers.facebook.com/docs/audience-network/android-banners )

phzhou commented 5 years ago

Hi! Sorry for not being very clear in the banner document specifically about initializing the SDK. Please refer to the sample code here about the SDK initialization. We would update the documentation shortly as well. Thank you!

Izzyjm commented 5 years ago

@phzhou is there an equivalent method for iOS ?

phzhou commented 5 years ago

Hi @Izzyjm no there is no equivalent for iOS, initialization of SDK is only for Android

Izzyjm commented 5 years ago

@phzhou I implemented AudienceNetworkAds.initialize(); but I am getting an error , what am I suppose to put inside the parenthesis ?

Izzyjm commented 5 years ago

?

phzhou commented 5 years ago

Hi @Izzyjm please refer to the documentation for sdk initialisation here: https://developers.facebook.com/docs/audience-network/android-sdk-initialize Thanks!

Izzyjm commented 5 years ago

@phzhou do we have to implement the helper class, or can we just call AudienceNetworkAds.initialize(); ?

AntRemo commented 5 years ago

Hi @phzhou

I have the same question as @Izzyjm

Thanks

AG-Developers commented 4 years ago

Hello when running my app in Android Studio I get this log in the logcat "You don't call AudienceNetworkAds.initialize(). Some functionality may not work properly" but no where in the FAN network documentation did it ever mention to make this call or didn't even show in the example code so how will developers know to include this ? and what functionality wouldn't' work properly because Im still receiving ads ? also I don't call an initialize method in my iOS app for FAN ads and I don't receive this warning so i'm kind of of confused why the documentation here makes no mention of this "intialize()" method ? ( https://developers.facebook.com/docs/audience-network/android-banners )

I think you forget to use maven() and both dependencies of facebook (visit- https://developers.facebook.com/docs/audience-network/guides/adding-sdk/android )

without adding both dependencies you can not add AudienceNetworkAds.initialize(); -now no need to implement helper class, this is deprecated now.

Enjoy, Happy Coding :)