mobfox / MobFox-Android-SDK

26 stars 21 forks source link

Error "no fill" #71

Open SamHoque opened 6 years ago

SamHoque commented 6 years ago
 protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        showAd(this);
    }

    public static void showAd(final Context mCont) {
        interstitial = new InterstitialAd(mCont);
        InterstitialAdListener listener = new InterstitialAdListener() {
            @Override
            public void onInterstitialLoaded(InterstitialAd interstitial) {
                Toast.makeText(mCont, "loaded", Toast.LENGTH_SHORT).show();
                interstitial.show();
            }

            @Override
            public void onInterstitialFailed(InterstitialAd interstitial, Exception e) {
                Toast.makeText(mCont, e.getMessage(), Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onInterstitialClosed(InterstitialAd interstitial) {
                Toast.makeText(mCont, "closed", Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onInterstitialFinished() {
                Toast.makeText(mCont, "finished", Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onInterstitialClicked(InterstitialAd interstitial) {
                Toast.makeText(mCont, "clicked", Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onInterstitialShown(InterstitialAd interstitial) {
                Toast.makeText(mCont, "shown", Toast.LENGTH_SHORT).show();
            }
        };
        interstitial.setListener(listener);
        interstitial.setInventoryHash("f53bbe77796376be20c651dd84911e45");
        interstitial.load();
    }

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        interstitial.onRequestPermissionsResult(requestCode, permissions, grantResults);
    }

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

    @Override
    protected void onResume() {
        super.onResume();
        interstitial.onResume();
    }

I get a toast message saying "No Fill" When I start the app.

nabriski commented 6 years ago

Hi,

This just means there was no ad for your request, have you tried with the test hashes? https://docs.mobfox.com/docs/inventory-hashes-for-testing

SamHoque commented 6 years ago

Hello, Thanks for letting me know. No I did not this is the first time I am using mobfox SDK found out about it from a friend. I thought It would show me test ads on my unit ID until I request activation for release.

SamHoque commented 6 years ago

I have tested the test hash. and I still get the toast saying no fill.

nabriski commented 6 years ago

Did you use the test hash for interstitials? 267d72ac3f77a3f447b32cf7ebf20673

SamHoque commented 6 years ago

Yes, I have tried that.

nabriski commented 6 years ago

Can you please paste here a 'Charles' log of the request?

Thanks

SamHoque commented 6 years ago

How can I get the 'Charles' log?

SamHoque commented 6 years ago

I get a new error saying "timeout" instead of "no fill" here is the Log Cat reports. http://i.lynxkik.org/LH9CGW0Y.png

nabriski commented 6 years ago

Does it happen only on the first attempt or on every attempt? 'Charles' (proxy) is a piece of software some people use to record traffic ('https://www.charlesproxy.com/').

nabriski commented 6 years ago

Hi,

Please stop investigating this, I think we have a lead on a problem with our test hashes. Will update tomorrow when we know more.

Thanks

SamHoque commented 6 years ago

Okay

nabriski commented 6 years ago

Hi,

Ok, turns out that problem was not related to your case just to our demo app. I will still need your traffic recording to investigate.

Thanks

SamHoque commented 6 years ago

How am I able to get the traffic report?

nabriski commented 6 years ago

You use a program like 'Charles Proxy', 'Wireshark' or similar and record the network traffic.

SamHoque commented 6 years ago

Oh alright, I will take a look if I can get it.

SamHoque commented 6 years ago

http://i.lynxkik.org/22J3LIm.png do I have to fill the host name and port with MobFoxes one? if so what are they?

shahafss commented 6 years ago

Hi, While Charles is running and recording traffic - on Charles menu -> help -> 'Install Charles certificate on a mobile device' -> an alert prompt will pop with your pc IP and the port Charles is running on (see the screen shots attached). These are the IP and port you should enter as the 'proxy hostname' and 'proxy port'. (Note that you can use a different port by - Charles menu -> Proxy -> proxy settings)

screen shot 2018-03-15 at 11 22 44 am screen shot 2018-03-15 at 11 23 20 am screen shot 2018-03-15 at 11 23 43 am

You should also follow the instructions on that alert prompt in order to install Charles root certificate on a mobile device or remote browser.

Best, -Shahaf

nabriski commented 6 years ago

Hi,

Can you please try alternating between a WIFI and a 3G/4G connection? we have a theory on what's happening we're trying to validate.

Thanks