<commit_before>import QtQuick 2.0
import QtQuick.Controls 1.4

import QtFirebase 1.0

ApplicationWindow {
    id: application

    title: qsTr('QtFirebase Example (%1x%2)').arg(width).arg(height)

    visible: true

    width: 500
    height: 832

    property bool paused: !Qt.application.active

    /*
     * AdMob example
     */
    AdMob {
        appId: Qt.platform.os == "android" ? "ca-app-pub-6606648560678905~6485875670" : "ca-app-pub-6606648560678905~1693919273"

        // NOTE All banners and interstitials will use this list
        // unless they have their own testDevices list specified
        testDevices: [
            "01987FA9D5F5CEC3542F54FB2DDC89F6",
            "d206f9511ffc1bc2c7b6d6e0d0e448cc"
        ]
    }

    // NOTE a size of 320x50 will give a Standard banner - other sizes will give a SmartBanner
    // NOTE width and height are values relative to the native screen size - NOT any parent QML components
    AdMobBanner {
        id: banner
        adUnitId: Qt.platform.os == "android" ? "ca-app-pub-3940256099942544/6300978111" : "ca-app-pub-6606648560678905/3170652476"

        x: 0
        y: ready ? 10 : 0

        visible: loaded

        width: 320
        height: 50

        onReadyChanged: if(ready) load()

        onError: {
            // TODO fix "undefined" arguments
            console.log("Banner failed with error code",code,"and message",message)

            // See AdMob.Error* enums
            if(code === AdMob.ErrorNetworkError)
                console.log("No network available");
        }

        request: AdMobRequest {
            gender: AdMob.GenderMale
            childDirectedTreatment: AdMob.ChildDirectedTreatmentUnknown

            // NOTE remember JS Date months are 0 based
            // 1st of Januray 1980:
            birthday: new Date(1980,0,1)

            keywords: [
                "AdMob",
                "QML",
                "Qt",
                "Fun",
                "Test",
                "Firebase"
            ]

            extras: [
                { "something_extra11": "extra_stuff11" },
                { "something_extra12": "extra_stuff12" }
            ]
        }
    }

    AdMobInterstitial {
        id: interstitial
        adUnitId: Qt.platform.os == "android" ? "ca-app-pub-6606648560678905/3118450073" : "ca-app-pub-6606648560678905/7548649672"
        //adUnitId: "ca-app-pub-6606648560678905/3118450073"; // Android
        //adUnitId: "ca-app-pub-6606648560678905/7548649672"; // iOS

        onReadyChanged: if(ready) load()
        //onLoadedChanged: if(loaded) show()

        onClosed: load()

        request: AdMobRequest {
            gender: AdMob.GenderFemale
            childDirectedTreatment: AdMob.ChildDirectedTreatmentTagged

            // NOTE remember JS Date months are 0 based
            // 8th of December 1979:
            birthday: new Date(1979,11,8)

            keywords: [
                "Perfume",
                "Scent"
            ]

            extras: [
                { "something_extra1": "extra_stuff1" },
                { "something_extra2": "extra_stuff2" }
            ]
        }

        onError: {
            console.log("Interstitial failed with error code",code,"and message",message)
            // See AdMob.Error* enums
            if(code === AdMob.ErrorNetworkError)
                console.log("No network available");
        }
    }

    AdMobNativeExpressAd {
        id: nativeExpressAd
        //adUnitId: Qt.platform.os == "android" ? "ca-app-pub-3940256099942544/6300978111" : "ca-app-pub-6606648560678905/3170652476"

        x: 0
        y: ready ? application.height-height : 0

        visible: loaded

        width: 320
        height: 50

        onReadyChanged: if(ready) load()<commit_msg>Added Rewarded Video test + Native Express units<commit_after>import QtQuick 2.0
import QtQuick.Controls 1.4

import QtFirebase 1.0

ApplicationWindow {
    id: application

    title: qsTr('QtFirebase Example (%1x%2)').arg(width).arg(height)

    visible: true

    width: 500
    height: 832

    property bool paused: !Qt.application.active

    /*
     * AdMob example
     */
    AdMob {
        appId: Qt.platform.os == "android" ? "ca-app-pub-6606648560678905~6485875670" : "ca-app-pub-6606648560678905~1693919273"

        // NOTE All banners and interstitials will use this list
        // unless they have their own testDevices list specified
        testDevices: [
            "01987FA9D5F5CEC3542F54FB2DDC89F6",
            "d206f9511ffc1bc2c7b6d6e0d0e448cc"
        ]
    }

    // NOTE a size of 320x50 will give a Standard banner - other sizes will give a SmartBanner
    // NOTE width and height are values relative to the native screen size - NOT any parent QML components
    AdMobBanner {
        id: banner
        adUnitId: Qt.platform.os == "android" ? "ca-app-pub-3940256099942544/6300978111" : "ca-app-pub-6606648560678905/3170652476"

        x: 0
        y: ready ? 10 : 0

        visible: loaded

        width: 320
        height: 50

        onReadyChanged: if(ready) load()

        onError: {
            // TODO fix "undefined" arguments
            console.log("Banner failed with error code",code,"and message",message)

            // See AdMob.Error* enums
            if(code === AdMob.ErrorNetworkError)
                console.log("No network available");
        }

        request: AdMobRequest {
            gender: AdMob.GenderMale
            childDirectedTreatment: AdMob.ChildDirectedTreatmentUnknown

            // NOTE remember JS Date months are 0 based
            // 1st of Januray 1980:
            birthday: new Date(1980,0,1)

            keywords: [
                "AdMob",
                "QML",
                "Qt",
                "Fun",
                "Test",
                "Firebase"
            ]

            extras: [
                { "something_extra11": "extra_stuff11" },
                { "something_extra12": "extra_stuff12" }
            ]
        }
    }

    AdMobInterstitial {
        id: interstitial
        adUnitId: Qt.platform.os == "android" ? "ca-app-pub-6606648560678905/3118450073" : "ca-app-pub-6606648560678905/7548649672"
        //adUnitId: "ca-app-pub-6606648560678905/3118450073"; // Android
        //adUnitId: "ca-app-pub-6606648560678905/7548649672"; // iOS

        onReadyChanged: if(ready) load()
        //onLoadedChanged: if(loaded) show()

        onClosed: load()

        request: AdMobRequest {
            gender: AdMob.GenderFemale
            childDirectedTreatment: AdMob.ChildDirectedTreatmentTagged

            // NOTE remember JS Date months are 0 based
            // 8th of December 1979:
            birthday: new Date(1979,11,8)

            keywords: [
                "Perfume",
                "Scent"
            ]

            extras: [
                { "something_extra1": "extra_stuff1" },
                { "something_extra2": "extra_stuff2" }
            ]
        }

        onError: {
            console.log("Interstitial failed with error code",code,"and message",message)
            // See AdMob.Error* enums
            if(code === AdMob.ErrorNetworkError)
                console.log("No network available");
        }
    }

    AdMobRewardedVideoAd {
        id: rewardedVideoAd

        adUnitId: Qt.platform.os == "android" ? "ca-app-pub-6606648560678905/5628948780" : "ca-app-pub-6606648560678905/2850564595"

        onReadyChanged: if(ready) load()
        //onLoadedChanged: if(loaded) show()

        onClosed: load()

        request: AdMobRequest {
            gender: AdMob.GenderUnknown
            childDirectedTreatment: AdMob.ChildDirectedTreatmentUnknown

            // NOTE remember JS Date months are 0 based
            // 8th of December 1979:
            birthday: new Date(1979,11,8)

            keywords: [
                "Qt",
                "Firebase"
            ]

            extras: [
                { "something_extra1": "extra_stuff1" },
                { "something_extra2": "extra_stuff2" }
            ]
        }

        onError: {
            console.log("RewardedVideoAd failed with error code",code,"and message",message)
            // See AdMob.Error* enums
            if(code === AdMob.ErrorNetworkError)
                console.log("No network available");
        }
    }

    AdMobNativeExpressAd {
        id: nativeExpressAd
        adUnitId: Qt.platform.os == "android" ? "ca-app-pub-6606648560678905/3373308775" : "ca-app-pub-6606648560678905/3620720781"

        x: 0
        y: ready ? application.height-height : 0

        visible: loaded

        width: 320
        height: 50

        onReadyChanged: if(ready) load()
{'fraction_non_alphanumeric': 0.09881650005745145, 'fraction_numerical': 0.09226703435596921, 'mean_word_length': 1.7544303797468355, 'pattern_counts': {'":': 10, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2297769', 'n_tokens_mistral': 3225, 'n_tokens_neox': 2602, 'n_words': 567}