Here is my code I wanted to integrate Flurry Banner Ads at the bottom and Top of My App with their NEW SDK.. Please help
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Start of Flurry Permission-->
<activity
android:name="com.flurry.android.FlurryFullscreenTakeoverActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize">
</activity>
<!-- End of Flurry Permission -->
import com.flurry.android.FlurryAdType;
import com.flurry.android.FlurryAds;
import com.flurry.android.FlurryAdSize;
import com.flurry.android.FlurryAgent;
import com.flurry.android.FlurryAdListener;
public class MainActivity extends Activity {
ProgressDialog progress;
private Context mContext;
FrameLayout mBanner;
public static String apiKey ;
private String adSpace;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle bundle = getIntent().getExtras();
mBanner = (FrameLayout) findViewById(R.id.banner);
mContext = LauncherActivity.this;
apiKey = getResources().getString(R.string.flurry_api_key);
adSpace = getResources().getString(R.string.adSpaceName);
@Override
protected void onStart() {
// TODO Auto-generated method stub
super.onStart();
FlurryAds.fetchAd(mContext, adSpace, mBanner,
FlurryAdSize.BANNER_BOTTOM);
}
<FrameLayout
android:id="@+id/banner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"/>
<string name="flurry_api_key">3HVSXVC8XTBT8NCN5SCB</string>
<string name="adSpaceName">MyAdSpace Bottom</string>
The ad's are not displaying on my apps from this codes please let me know where is the problem and tell me how to solve it.
I am using FlurryAds-5.6.0.jar SDK. The error im getting is Unfortunately Application Has Stop. without showing error in error catalog
Just follow instructions from https://developer.yahoo.com/flurry/docs/publisher/code/android/#banner-ads-integration-code .
And I think it would be better to edit your question and delete your API key as that is a data private to your app.
Also, please consider looking at your LogCat, as it could contain reason of not showing any ad. If your app is new, it could take some time to start appearing.
Enable logging by adding FlurryAgent.setLogLevel(2)
before the FlurryAgent.init()
call. ( http://flurrydev.github.io/FlurryAndroidSDK5xAPI/classcom_1_1flurry_1_1android_1_1FlurryAgent.html#a0133e301ea0f01327b5143fc3974f3ac )
Although FlurryAds.fetchAd()
method call is deprecated, it could still be used, if you just wanted to test. But, then, replace it with code from the above link.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.