Closed vvhj806 closed 9 months ago
Hello ๐, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
What happened?
์ ๋๋ชน์์ ๋ฆฌ์๋ ๊ด๊ณ ๋จ์๋ฅผ ๋ฑ๋กํ ํ ์ค์ ๊ด๊ณ ๊ฐ ๋จ๋ ๊ฒ ๊น์ง ํ์ธํ๋ค.
TestIds.REWARDED ๋ฅผ ์ฌ์ฉ ํ์ ๊ฒฝ์ฐ์๋ payloadAd์์ ๊ด๊ณ ํด๋ฆญ ํ type์ด 'paid'๋ก ์ ๋ฌ๋๊ณ if (type === AdEventType.PAID) ์ฌ๊ธฐ ์กฐ๊ฑด์ผ๋ก ๋ค์ด๊ฐ๋ฉด์ payload ๊ฐ์ด ์ฌ๋ฐ๋ฅด๊ฒ ์ฐํ๋ค.
(type์ด 'paid'์ผ๋ payload ๊ฐ -> {precision: 0, currency: 'USD', value: 0})
AdEventType์ ์๋์ ๊ฐ๋ค. {CLICKED: "clicked", CLOSED: "closed", ERROR: "error", LOADED: "loaded", OPENED: "opened", PAID: "paid"}
ํ์ง๋ง 'ca-app-pub-' ์ผ๋ก ์์๋๋ ์ค์ ๊ด๊ณ ID๋ฅผ ์ฌ์ฉํด์ ์ค์ ๊ด๊ณ ๋ฅผ ์์ฒญํ์ ๊ฒฝ์ฐ์๋ type ๊ฐ์ paid๊ฐ ์ฐํ์ง ์๋๋ค.
๋ฆฌ์๋ ๊ด๊ณ ์์๋paid ๊ฐ์ด ์๋ ์ ๋ฌ ๋์ง ์๋ ๊ฒ์ธ์ง, ์ ์ฝ๋๊ฐ ์๋ชป๋ ๊ฒ์ธ์ง ๋ฌธ์๋ฅผ ๋๋ฆฝ๋๋ค. ์ฑ ์ฌ์ฉ์๊ฐ ์์ฒญํ ๊ด๊ณ ์ ๋ํ ๊ด๊ณ ๊ธ์ก์ ์ ๋ฌ ๋ฐ๊ณ ์ถ์ต๋๋ค. (์ค์ ํ ๋ฆฌ์๋ ๊ฐ์ด ์๋)
(์ฝ๋)
import React, { useEffect, useState } from 'react'; import { Button, View, Text } from 'react-native'; import { viewAdmobApi } from '../../api/Common'; import { RewardedAd, RewardedAdEventType, TestIds, AdEventType } from 'react-native-google-mobile-ads'; import { ISToast } from '../ISToast';
const adUnitId = DEV ? TestIds.REWARDED : 'ca-app-pub-';
const rewarded = RewardedAd.createForAdRequest(adUnitId, { keywords: ['fashion', 'clothing'], });
function RewardAd() { const [loaded, setLoaded] = useState(false); const [payloadData, setPayloadData] = useState({});
}
export default RewardAd;
Platforms
Android, but have not tested behavior on iOS
React Native Info
Are your using Typescript?
package.json
app.json
ios/Podfile
No response
android/build.gradle
No response
android/app/build.gradle
No response
android/settings.gradle
No response
AndroidManifest.xml
No response