1

i am trying to show native ad when user launch my app in DialogFragment but problem is that i want to show ad when its loaded and viewable i am sending layout to dialog fragment in ad loaded and i am getting size error and crash when orientation changes and how can i make dynamic size dialog on different sizes devices please guide me if you have better solution or what i am doing wrong ?

this is my DialogFragment class:

  public class NativeAdDialog extends DialogFragment implements View.OnClickListener {

    FrameLayout frameLayout;



    private Activity activityReference;//Reference

    @NonNull
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {

        WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
        try {
            getDialog().getWindow();
            lp.copyFrom(getParentActivity().getWindow().getAttributes());
            lp.width = Utilities.getScreenWidth(getActivity()) - Utilities.dpToPx(getActivity(), 40);
            lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
            lp.gravity = Gravity.CENTER;
            getDialog().getWindow().setAttributes(lp);
        }
        catch (Exception e){
            e.printStackTrace();
        }


        MainActivity activity=(MainActivity)getActivity();
        View view=activity.getYourObject();


        AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
        builder.setView(view);
        Dialog dialog = builder.create();

        if (dialog.getWindow() != null) {
            dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
            dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
        }
        return dialog;

    }


    @Override
    public void onAttach(Context context) {
        super.onAttach(context);

        if (context instanceof Activity){
            activityReference =(Activity) context;
        }
    }

    @Override
    public void onClick(View view) {

    }

    public Activity getParentActivity(){
        if(activityReference==null)
            return getActivity();
        else return activityReference;
    }

}

and this is my Main Class:

    public class MainActivity extends AppCompatActivity {
    FrameLayout frameLayout;
    NativeExpressAdView nativeExpressAdView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);



        LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        frameLayout = (FrameLayout)inflater.inflate(R.layout.adview, null);
       nativeExpressAdView=(NativeExpressAdView) frameLayout.findViewById(R.id.adView);
        nativeExpressAdView.loadAd(new AdRequest.Builder().build());
        nativeExpressAdView.setAdListener(new AdListener()
        {
            @Override
            public void onAdLoaded() {
                super.onAdLoaded();
                FragmentManager fm = getSupportFragmentManager();
                NativeAdDialog myDialogFragment = new NativeAdDialog();
                myDialogFragment.show(fm, "dialog_fragment");

            }

            @Override
            public void onAdClosed() {
                super.onAdClosed();

            }
        });

    }

    public FrameLayout getYourObject(){
        return frameLayout;
    }
}

and this is my layout file what i want to show in dialog:

   <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="@android:color/transparent">
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="20dp"
        android:text="exit?"
        android:textColor="@android:color/white"
        android:padding="20dp"
        android:gravity="center"
        android:background="@color/BlueDarkColor"/>

        <com.google.android.gms.ads.NativeExpressAdView
            android:layout_margin="50dp"
            android:id="@+id/adView"
            android:background="@android:color/transparent"
            android:layout_gravity="center|top"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            ads:adSize="280x80"
            ads:adUnitId="ca-app-pub-3940256099942544/2793859312">
        </com.google.android.gms.ads.NativeExpressAdView>


</FrameLayout>

this is my log Logs:

    10-25 14:17:21.404 27430-27534/com.example.mateen.testingdialog E/FA: Missing google_app_id. Firebase Analytics disabled. See 
10-25 14:17:21.448 27430-27430/com.example.mateen.testingdialog I/Ads: Ad finished loading.
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window android.app.Dialog.getWindow()' on a null object reference
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err:     at com.example.mateen.testingdialog.NativeAdDialog.onCreateDialog(NativeAdDialog.java:36)
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.support.v4.app.DialogFragment.onGetLayoutInflater(DialogFragment.java:310)
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.support.v4.app.Fragment.performGetLayoutInflater(Fragment.java:1231)
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1419)
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1740)
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1809)
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:799)
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2580)
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2367)
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2322)
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2229)
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:700)
10-25 14:17:21.464 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.os.Handler.handleCallback(Handler.java:789)
10-25 14:17:21.465 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:98)
10-25 14:17:21.465 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.os.Looper.loop(Looper.java:164)
10-25 14:17:21.465 27430-27430/com.example.mateen.testingdialog W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:6541)
10-25 14:17:21.465 27430-27430/com.example.mateen.testingdialog W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
10-25 14:17:21.465 27430-27430/com.example.mateen.testingdialog W/System.err:     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
10-25 14:17:21.465 27430-27430/com.example.mateen.testingdialog W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
10-25 14:17:21.568 27430-27430/com.example.mateen.testingdialog W/Ads: Not enough space to show ad. Needs 280x132 dp, but only has 220x559 dp.
10-25 14:17:21.571 27430-27430/com.example.mateen.testingdialog I/chatty: uid=10523(u0_a523) com.example.mateen.testingdialog identical 2 lines
10-25 14:17:21.571 27430-27430/com.example.mateen.testingdialog W/Ads: Not enough space to show ad. Needs 280x132 dp, but only has 220x559 dp.
10-25 14:17:21.572 27430-27430/com.example.mateen.testingdialog W/Ads: Not enough space to show ad. Needs 280x132 dp, but only has 220x132 dp.
10-25 14:17:21.573 27430-27430/com.example.mateen.testingdialog I/chatty: uid=10523(u0_a523) com.example.mateen.testingdialog identical 2 lines
10-25 14:17:21.574 27430-27430/com.example.mateen.testingdialog W/Ads: Not enough space to show ad. Needs 280x132 dp, but only has 220x132 dp.
10-25 14:17:21.582 27430-27446/com.example.mateen.testingdialog I/zygote64: Do full code cache collection, code=124KB, data=96KB
10-25 14:17:21.583 27430-27446/com.example.mateen.testingdialog I/zygote64: After code cache collection, code=89KB, data=52KB
10-25 14:17:21.635 27430-27430/com.example.mateen.testingdialog I/chromium: [INFO:CONSOLE(0)] "Document was loaded from Application Cache with manifest https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.appcache", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
10-25 14:17:21.635 27430-27430/com.example.mateen.testingdialog I/chromium: [INFO:CONSOLE(0)] "Application Cache Checking event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
10-25 14:17:21.727 27430-27430/com.example.mateen.testingdialog W/Ads: Not enough space to show ad. Needs 280x132 dp, but only has 220x559 dp.
10-25 14:17:21.731 27430-27430/com.example.mateen.testingdialog I/chatty: uid=10523(u0_a523) com.example.mateen.testingdialog identical 2 lines
10-25 14:17:21.732 27430-27430/com.example.mateen.testingdialog W/Ads: Not enough space to show ad. Needs 280x132 dp, but only has 220x559 dp.
10-25 14:17:21.732 27430-27430/com.example.mateen.testingdialog W/Ads: Not enough space to show ad. Needs 280x132 dp, but only has 220x132 dp.
10-25 14:17:21.733 27430-27430/com.example.mateen.testingdialog I/chatty: uid=10523(u0_a523) com.example.mateen.testingdialog identical 2 lines
10-25 14:17:21.734 27430-27430/com.example.mateen.testingdialog W/Ads: Not enough space to show ad. Needs 280x132 dp, but only has 220x132 dp.
10-25 14:17:22.427 27430-27430/com.example.mateen.testingdialog I/chromium: [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
10-25 14:17:22.480 27430-27446/com.example.mateen.testingdialog I/zygote64: Do partial code cache collection, code=124KB, data=83KB
10-25 14:17:22.481 27430-27446/com.example.mateen.testingdialog I/zygote64: After code cache collection, code=124KB, data=83KB
10-25 14:17:22.481 27430-27446/com.example.mateen.testingdialog I/zygote64: Increasing code cache capacity to 512KB
10-25 14:17:23.183 27430-27534/com.example.mateen.testingdialog E/FA: Missing google_app_id. Firebase Analytics disabled. See 
10-25 14:18:25.440 27430-27430/com.example.mateen.testingdialog W/Ads: JS: Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 (https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26:1)
10-25 14:18:25.440 27430-27430/com.example.mateen.testingdialog I/chromium: [INFO:CONSOLE(1)] "Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080", source: https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26 (1)
10-25 14:18:25.441 27430-27430/com.example.mateen.testingdialog W/Ads: JS: Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 (https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26:1)
10-25 14:18:25.442 27430-27430/com.example.mateen.testingdialog I/chromium: [INFO:CONSOLE(1)] "Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080", source: https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26 (1)
10-25 14:18:25.457 27430-27430/com.example.mateen.testingdialog W/Ads: JS: Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 (https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26:1)
10-25 14:18:25.457 27430-27430/com.example.mateen.testingdialog I/chromium: [INFO:CONSOLE(1)] "Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080", source: https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26 (1)
10-25 14:18:25.487 27430-27430/com.example.mateen.testingdialog W/Ads: JS: Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 (https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26:1)
10-25 14:18:25.487 27430-27430/com.example.mateen.testingdialog I/chromium: [INFO:CONSOLE(1)] "Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080", source: https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26 (1)
10-25 14:18:25.503 27430-27430/com.example.mateen.testingdialog W/Ads: JS: Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 (https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26:1)
10-25 14:18:25.503 27430-27430/com.example.mateen.testingdialog I/chromium: [INFO:CONSOLE(1)] "Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080", source: https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26 (1)
10-25 14:18:25.535 27430-27430/com.example.mateen.testingdialog W/Ads: JS: Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 (https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26:1)
10-25 14:18:25.535 27430-27430/com.example.mateen.testingdialog I/chromium: [INFO:CONSOLE(1)] "Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080", source: https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26 (1)
10-25 14:18:25.539 27430-27430/com.example.mateen.testingdialog W/Ads: JS: Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 (https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26:1)
10-25 14:18:25.539 27430-27430/com.example.mateen.testingdialog I/chromium: [INFO:CONSOLE(1)] "Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080", source: https://googleads.g.doubleclick.net/mads/gma?_activity_context=true&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_gcache&eid=318475406%2C318478937%2C318478658%2C318478607&format=280x132_as&heap_free=0&heap_max=201326592&heap_total=3213040&js=afma-sdk-a-v11518440.11400000.1&mr=-81263383576163352%2C558487924625327805%2C-842851478521176980%2C3034205090645484728%2C6250273962772792242%2C6790699469749076524%2C8106075749880409047%2C8172694969195902592%2C8605227968969822171%2C-2372806167391951297%2C-7975036091476117975&msid=com.example.mateen.testingdialog&preqs=0&scroll_index=-1&seq_num=1&target_api=26 (1)
10-25 14:18:55.764 27430-30490/com.example.mateen.testingdialog V/FA: Not logging ad unit exposure. No active activity
10-25 14:18:55.766 27430-30490/com.example.mateen.testingdialog V/FA: Not logging ad exposure. No active activity
10-25 14:18:55.768 27430-30490/com.example.mateen.testingdialog V/FA: Recording user engagement, ms: 95585
10-25 14:18:55.773 27430-30490/com.example.mateen.testingdialog V/FA: Using measurement service
10-25 14:18:55.775 27430-30490/com.example.mateen.testingdialog V/FA: Connecting to remote service
10-25 14:18:55.839 27430-30490/com.example.mateen.testingdialog V/FA: Activity paused, time: 863010056
10-25 14:18:55.840 27430-30490/com.example.mateen.testingdialog V/FA: Not logging ad unit exposure. No active activity
10-25 14:18:55.840 27430-30490/com.example.mateen.testingdialog V/FA: Not logging ad exposure. No active activity
10-25 14:18:55.845 27430-30490/com.example.mateen.testingdialog E/FA: Missing google_app_id. Firebase Analytics disabled. See 
10-25 14:18:56.174 27430-30490/com.example.mateen.testingdialog D/FA: Connected to remote service
10-25 14:18:56.175 27430-30490/com.example.mateen.testingdialog V/FA: Processing queued up service tasks: 1
10-25 14:19:01.178 27430-30490/com.example.mateen.testingdialog V/FA: Inactivity, disconnecting from the service

is this approach right or is there any better solution plz guide me Thanks!

Mateen Chaudhry
  • 631
  • 12
  • 32

0 Answers0