Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8744311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:49:19+00:00 2026-06-13T11:49:19+00:00

I have implemented MobFox in my application. I have two problems. Even in test

  • 0

I have implemented MobFox in my application.

I have two problems.

  1. Even in test mode, at first the ad fails to load (bannerLoadFailed) then I see it (bannerLoadSucceeded). This is caused by the onResume() method. Without that, there is no fail in loading. Why?

  2. It does not show any ads. In test mode it shows the test ad, both in the emulator and by downloaded from the market, but in live mode the noAdFound() method is active, saying “No MobFox ad found” in the toast.
    According to the documentation

noAdFound means that there is currently no ad available for the ad
request

I am from Hungary, but a friend downloaded the app in Austria, where MobFox headquarters is, so I doubt there are no ad requests in Austria…

The MobFox dashboard shows 3 impressions, I don’t know if they are coming from the test ad. If they are coming from real ads, question 2 is ignorable, but still I don’t know why my friend cannot see any ads.

Would you please take a look at the code to see what may cause the problem (is there is one)?

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
            MobFoxlayout = (RelativeLayout)findViewById(R.id.mobfoxContent);
            mobfoxView = new MobFoxView(Main.this, "211bcbf66f79c0355e43e849aec76b6c", Mode.LIVE, true, true);
            mobfoxView.setBannerListener(new BannerListener() {

            @Override
            public void bannerLoadFailed(RequestException cause) {
                Toast.makeText(getApplicationContext(), "Mobfox ad failed ", Toast.LENGTH_SHORT).show();
            }

            @Override
            public void noAdFound() {
                Toast.makeText(getApplicationContext(), "No MobFox ad Found", Toast.LENGTH_SHORT).show();
            }
            @Override
            public void bannerLoadSucceeded() {
                Toast.makeText(getApplicationContext(), "MobFox Ad loaded successfully", Toast.LENGTH_SHORT).show();    
            }

            @Override
            public void adClicked() {
                Toast.makeText(getApplicationContext(), "MobFox Ad clicked", Toast.LENGTH_SHORT).show();
            }
            });
            MobFoxlayout.addView(mobfoxView);
    }
    @Override
    protected void onResume() {  //ad fails to load
        super.onResume();
        mobfoxView.resume();
    }

    @Override
    protected void onPause() {
        super.onPause();
        mobfoxView.pause();
    }



@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
mobfoxView.pause();
mobfoxView.resume();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:49:20+00:00Added an answer on June 13, 2026 at 11:49 am

    I don’t know what was wrong but it works. I am posting the whole code for others to help. The great part in this code is that I managed to show admob ads when MobFox ads are failed!

    It is important that if you switch the MobFox ads to Test mode you will see the test ad in the emulator. On my phone I haven’t seen any live or test ads, but I see many impressions on my MobFox dashboard. Sometimes I don’t see any admob ads either. On my phone I used to see them, on my brother’s phone we have never seen them. But they are there considering I earn from them.

    public class MainActivity extends Activity {
    
    //MOBFOX----------------------------
    private RelativeLayout rlayout;
    private MobFoxView mobfoxView;
    
    //ADMOB-----------------------------
    private AdView adView;
    
    @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main2);
    final Handler updateHandler = new Handler();
            rlayout = (RelativeLayout) findViewById(R.id.mobfoxContent);
            mobfoxView = new MobFoxView(MainActivity.this, "37a12617ccdc6bd4bafdded4e8441bca", Mode.LIVE, false, false);
            mobfoxView.setBannerListener(new BannerListener() {
            @Override
            public void bannerLoadFailed(RequestException cause) {
                //Toast.makeText(getApplicationContext(), "MobFox failed", Toast.LENGTH_LONG).show();
                  adView = new AdView(MainActivity.this, AdSize.BANNER, MY_AD_UNIT_ID);
                  LinearLayout layout = (LinearLayout)findViewById(R.id.admobContent);
                  layout.addView(adView);
                  adView.loadAd(new AdRequest());
    
            }
            @Override
            public void noAdFound() {
                //Toast.makeText(getApplicationContext(), "MobFox noAd", Toast.LENGTH_LONG).show();
                  adView = new AdView(MainActivity.this, AdSize.BANNER, MY_AD_UNIT_ID);
                  LinearLayout layout = (LinearLayout)findViewById(R.id.admobContent);
                  layout.addView(adView);
                  adView.loadAd(new AdRequest());
    
            }
            @Override
            public void adClicked() {
                //Toast.makeText(getApplicationContext(), "MobFox clicked", Toast.LENGTH_LONG).show();
                // TODO Auto-generated method stub
    
            }
            @Override
            public void bannerLoadSucceeded() {
                //Toast.makeText(getApplicationContext(), "MobFox success", Toast.LENGTH_LONG).show();
                // TODO Auto-generated method stub
    
            }
            });
    
            mobfoxView.setVisibility(View.VISIBLE);
            mobfoxView.setOnClickListener(new android.view.View.OnClickListener(){
    
                @Override
                public void onClick(View v) {
                    updateHandler.post(new Runnable() {
                        public void run() {
                            //Toast.makeText(getApplicationContext(), "MobFox clicked2", Toast.LENGTH_LONG).show();
                        }
                    });
    
                }});
    
    
            rlayout.addView(mobfoxView);
    
    }
    
        @Override
        protected void onDestroy() {
    
            if (adView != null) {
                    adView.destroy();
            }
            super.onDestroy();
            //mManager.release();
        }
        @Override
        protected void onPause() {
            super.onPause();
            mobfoxView.pause();
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            mobfoxView.resume();
        }
    }
    

    Xml:

    <?xml version="1.0" encoding="utf-8"?>
    
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="@drawable/bg_selector"
        android:orientation="vertical" >
    
    <!-- objects -->
    
         <LinearLayout 
            android:id="@+id/admobContent"
            android:layout_alignParentBottom="true"
            android:layout_width="fill_parent"
            android:layout_height="50dp">
        </LinearLayout>
    
       <RelativeLayout 
            android:id="@+id/mobfoxContent"
            android:layout_width="fill_parent"
            android:layout_height="50dp"
            android:layout_centerHorizontal="true"
            android:layout_alignParentBottom="true" />
    
    </RelativeLayout>
    

    And don’t forget to these to all layout folders!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented SQL Server session mode for an asp.net application. <sessionState mode=SQLServer compressionEnabled=true
I have implemented a test method with Jersey to run on my Google AppEngine
I have implemented one matrix multiplication with boost::numeric::ublas::matrix (see my full, working boost code
I have implemented the functionality to remove users from the database in my application.
I have implemented quartz scheduler in my application. And its working upto a certain
I have implemented language localization to an Android application. My questions are: I can't
I have implemented a test app with Android's In-App Billing. I have filled in
I have implemented a ViewFlipper with 8 child view in my application as follows.
I have implemented Twitter4J in my Android application and it's works fine. But after
I have implemented one application in android which uses epublib to view .epub files.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.