Skip to content

quanptit/my-rn-my-ads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Thêm Vào package.json
"my-rn-my-ads": "git+https://gitlab.com/react-native-my-libs/my-rn-my-ads.git",

Chạy lệnh sau

yarn install

DialogKiemVangAndVip

DialogKiemVangAndVip.showDialog({
                title: getStrings().you_need_vip, titleKiemVang: getStrings().view_ads_for_download,
                onShowAds: () => {
                    gold -= 10;
                    PreferenceUtils.saveSeting("GOLD", gold);
                    addDownloadFun()
                }
            });

ButtonKiemVang

    _renderButtonGold(): any {
        if (this._isVip()) return;
        return (<ButtonKiemVang title={getStringsCommon().kem_10_vang} isShowDialog={true} textStyle={{color: "white"}}
                                onShowAds={async () => {
                                    let gold = await PreferenceUtils.getNumberSetting("GOLD", 100);
                                    gold += 10;
                                    console.log("_Reward Received Callback: ", gold);
                                    await PreferenceUtils.saveSeting("GOLD", gold);
                                    this.updateGold(gold);
                                }}/>)
    }

Releases

No releases published

Packages

No packages published