ドキュメント

​
​

Development

User Acquisition

Monetization

産業

Unity Offerwall

Offerwall Android SDK

Offerwall iOS SDK

Offerwall Unity SDK

Unity Offerwall

Tapjoy Offerwall
​
​
使用の準備
  • Tapjoy Offerwall の Monetization ダッシュボードへのアクセス
  • Offerwall の開始
  • Unity Ads での Offerwall のプロモーション
  • アプリの設定
Dashboard
  • A/B テスト
  • 通貨セール
  • 交換レート
  • メッセージ
  • Offerwall カード
  • Placements
  • パブリッシャーカスタマーサービスツール
  • ターゲティング
  • 指標のリファレンス
最適化
  • 収益化戦略の計画
API
  • API の認証
  • Reporting API パブリッシャー
  • Reporting API のベストプラクティス
  • コンテンツ管理
  • User Level Revenue API の概要
ゲーム内通貨
  • ゲーム内通貨の概要
  • 自己管理通貨
  • Tapjoy 管理通貨
  • コールバック失敗のトラブルシューティング
その他
  • Offerwall収益化ダッシュボード ユーザー ロールと権限
  • トラブルシューティング
  • アプリプライバシー - iOS
  • データセーフティ - Android
  • FAQ
  1. ゲームの成長
  2. Unity Offerwall
  3. Offerwall の収益化

Tapjoy 管理通貨

Tapjoy Offerwall の管理通貨を使用すると、Tapjoy のサーバー上にユーザー通貨残高を保存して管理できます。
読み終わるまでの所要時間 18 分
最終更新 7日前

Tapjoy 管理通貨を利用すると、Tapjoy のサーバーでユーザーのゲーム内通貨の金額を保存して管理できます。この無料サービスは、Tapjoy のパブリッシャー SDK を統合するすべての開発者が利用可能で、アプリにバックエンド通貨ストレージが不要になります。

通貨残高の取得

ユーザーの現在のゲーム内通貨残高を確認するには、プラットフォーム別に詳しく説明されているメソッドを使用します。推奨されるベストプラクティスは、残高の正確性を保つために、
getCurrencyBalance
を頻繁に呼び出すことです。残高を確認する主なタイミングとしては、以下のシナリオが発生したときが挙げられます。
  • ​​アプリケーション起動
  • アプリの再開
  • Tapjoy ビューの終了
  • プレースメントコンテンツの消去
最良の結果を得るには、広告コンテンツが完了してから約 3.5 秒後に
getCurrencyBalance
を呼び出します。そうすることで、ゲーム内報酬の更新に十分な処理時間が確保されます。すぐに残高を確認すると、新たに獲得したゲーム内報酬が反映されない場合があります。

通貨残高の取得

Tapjoy はゲーム内報酬を迅速に付与できるよう取り組んでいます。しかし、ネットワークの遅延などにより、ゲーム内報酬の即座の付与は保証されません。オファーからのゲーム内報酬が表示されるまでに時間がかかる場合があることを、ユーザーに通知してください。正確性を保つため、残高を定期的に、さらには主要なアプリイベント発生時 (以下のイベント発生時など) にも確認してください。
  • アプリの起動
  • アプリの再開
  • レベル間
  • ストアのロード前
通貨残高を取得するには、以下のプラットフォーム別のメソッドを参照してください。
iOS デバイスで現在のゲーム内通貨残高を取得するには、以下のメソッドを使用します。
// This method requests the tapjoy server for current virtual currency of the user.//Get currency[Tapjoy getCurrencyBalanceWithCompletion:^(NSDictionary *parameters, NSError *error) { if (error) { //Show error message NSLog(@"getCurrencyBalance error: %@", [error localizedDescription]); } else { //Update currency value of your app NSLog(@"getCurrencyBalance returned %@: %d", parameters[@"currencyName"], [parameters[@"amount"] intValue]); }}];
完了ブロックでは、残高が返されます。
currencyName
は通貨の名前、
amount
はユーザーの合計残高です。実装の詳細については、SDK パッケージのサンプルアプリケーションを参照してください。
Android デバイスで現在のゲーム内通貨残高を取得するには、以下のメソッドを使用します。
Tapjoy.getCurrencyBalance(new TJGetCurrencyBalanceListener(){ @Override public void onGetCurrencyBalanceResponse(String currencyName, int balance) { Log.i(TAG, "getCurrencyBalance returned " + currencyName + ":" + balance); } @Override public void onGetCurrencyBalanceResponseFailure(String error) { Log.i("Tapjoy", "getCurrencyBalance error: " + error); } });
残高は
onGetCurrencyBalanceResponse
コールバックで受け取り、エラーは
onGetCurrencyBalanceResponseFailure
で受け取ります。正確性を保つため、アプリの開始時や再開時に
getCurrencyBalance
を呼び出します。支出および付与のコールバックでも合計残高が返されるため、アプリの更新に利用できます。
// Get currencyTapjoy.GetCurrencyBalance();// on enable, add delegatesvoid OnEnable() { Tapjoy.OnGetCurrencyBalanceResponse += HandleGetCurrencyBalanceResponse; Tapjoy.OnGetCurrencyBalanceResponseFailure += HandleGetCurrencyBalanceResponseFailure;}// on disable, remove delegatesvoid OnDisable() { Tapjoy.OnGetCurrencyBalanceResponse -= HandleGetCurrencyBalanceResponse; Tapjoy.OnGetCurrencyBalanceResponseFailure -= HandleGetCurrencyBalanceResponseFailure;}public void HandleGetCurrencyBalanceResponse(string currencyName, int balance) { Debug.Log("C#:HandleGetCurrencyBalanceResponse: currencyName: " + currencyName + ", balance: " + balance);} public void HandleGetCurrencyBalanceResponseFailure(string error) { Debug.Log("C#:HandleGetCurrencyBalanceResponseFailure: " + error);}
通貨残高は、指定した
OnGetCurrencyBalanceResponse
ハンドラーで通知されます。このハンドラーは
currencyName
と
balance
のパラメーターを渡します。エラーは、
OnGetCurrencyBalanceResponseFailure
ハンドラーで通知されます。
try { let result = await Tapjoy.getCurrencyBalance(); let currencyName = result['currencyName']; let amount = result['amount'];} catch (error: any) { //Handle error}
React Native では、
getCurrencyBalance()
にパラメーターを取らない promise を使用します。promise は
currencyName
と
amount
を含むディクショナリで解決され、失敗した場合はエラーとなります。
// Get currency TapjoyAIR.getCurrencyBalance(); // Setup handlers TapjoyAIR.addEventListener(TJCurrencyEvent.GET_CURRENCY_BALANCE_SUCCESS, tapjoyCurrencyEventHandler); TapjoyAIR.addEventListener(TJCurrencyEvent.GET_CURRENCY_BALANCE_FAILURE, tapjoyCurrencyEventHandler); private function tapjoyCurrencyEvents(event:TJCurrencyEvent):void { trace("Tapjoy sample event listener for " + event.type + ", " + event.balance + ", " + event.currencyName); }
通貨残高は、指定した
TJCurrencyEvent.GET_CURRENCY_BALANCE_SUCCESS
ハンドラーで通知されます。このハンドラーは
TJCurrencyEvent
オブジェクトを渡します。このオブジェクトには
currencyName
と
balance
のプロパティが含まれます。エラーは、
TJCurrencyEvent.GET_CURRENCY_BALANCE_FAILURE
ハンドラーで通知されます。

ユーザーが通貨を獲得したかどうかの確認

最後の残高確認以降にユーザーが通貨を獲得した場合はユーザーに通知します。以下のセクションに記載されているプラットフォーム別の手順を使用して、通知を設定します。
iOS デバイスで獲得した通貨を検出するには、通知オブザーバーを加えます。
// Set the notification observer for earned-currency-notification.これは applicationDidBecomeActive メソッド内に配置することをお勧めします。[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showEarnedCurrencyAlert:) name:TJC_CURRENCY_EARNED_NOTIFICATION object:nil];// In the following method, you can set a custom message or use the default UIAlert to inform the user that they just earned some currency.- (void)showEarnedCurrencyAlert:(NSNotification*)notifyObj{ NSNumber *currencyEarned = notifyObj.object; int earnedNum = [currencyEarned intValue]; NSLog(@"Currency earned: %d", earnedNum); // Pops up a UIAlert notifying the user that they have successfully earned some currency. // This is the default alert, so you may place a custom alert here if you choose to do so. [Tapjoy showDefaultEarnedCurrencyAlert]; // This is a good place to remove this notification since it is undesirable to have a pop-up alert more than once per app run. [[NSNotificationCenter defaultCenter] removeObserver:self name:TJC_CURRENCY_EARNED_NOTIFICATION object:nil];}
ユーザーが (オファーなどを通じて) ゲーム内通貨を獲得するたびに通知を受けるには、以下のメソッドを使用して獲得通貨リスナーを設定します。
// Get notifications whenever Tapjoy currency is earned. Tapjoy.setEarnedCurrencyListener(new TJEarnedCurrencyListener() { @Override public void onEarnedCurrency(String currencyName, int amount) { Log.i("Tapjoy", "You've just earned " + amount + " " + currencyName); } });
獲得した通貨の通知は、
TJEarnedCurrencyListener
内の
onEarnedCurrency(String currencyName, int amount)
コールバックで受け取ります。例えば、ユーザーの残高が 100 で、オファーから 25 を獲得した場合、次回
getCurrencyBalance()
を呼び出すと、
onEarnedCurrency
がトリガーされ、amount が 25 になります。
// on enable, add delegatesvoid OnEnable() { Tapjoy.OnEarnedCurrency += HandleEarnedCurrency;}// on disable, remove delegatesvoid OnDisable() { Tapjoy.OnEarnedCurrency -= HandleEarnedCurrency;}public void HandleEarnedCurrency(string currencyName, int amount) { Debug.Log("C#:HandleEarnedCurrency: currencyName: " + currencyName + ", amount: " + amount);}
獲得した通貨は、指定した
OnEarnedCurrency
ハンドラーで通知されます。このハンドラーは
currencyName
と獲得した
amount
のパラメーターを渡します。
TapjoyAIR.addEventListener(TJEarnedCurrencyEvent.EARNED_CURRENCY, tapjoyEarnedCurrencyEventHandler); private function tapjoyEarnedCurrencyEventHandler(event:TJEarnedCurrencyEvent):void { trace("You can notify user's here that they've just earned " + event.amount + " " + event.currencyName); }
獲得した通貨は、指定した
earned in the TJEarnedCurrencyEvent.EARNED_CURRENCY
ハンドラーで通知されます。このハンドラーは
TJEarnedCurrencyEvent object
を渡します。このオブジェクトには
currencyName
と
amount
のプロパティが含まれます。

Tapjoy 管理通貨の支出

ユーザーのゲーム内通貨を支出するには、以下のセクションで詳しく説明されているプラットフォーム別のメソッドを呼び出します。
// This method call will deduct 10 virtual currencies from the user's total. [Tapjoy spendCurrency:10 completion:^(NSDictionary *parameters, NSError *error) { if (error) { NSLog(@"spendCurrency error: %@", [error localizedDescription]); } else { NSLog(@"spendCurrency returned %@: %d", parameters[@"currencyName"], [parameters[@"amount"] intValue]); }}];
通貨残高は完了ブロックで通知されます。パラメーター
currencyName
は通貨の名前を示し、
amount
はユーザーの残高を示します。
Tapjoy.spendCurrency(10, new TJSpendCurrencyListener() { @Override public void onSpendCurrencyResponse(String currencyName, int balance) { Log.i("Tapjoy", currencyName + ": " + balance); } @Override public void onSpendCurrencyResponseFailure(String error) { Log.i("Tapjoy", "spendCurrency error: " + error); } });
通貨残高は、指定した
TJSpendCurrencyListener
の
onSpendCurrencyResponse(String currencyName, int balance)
コールバックメソッドで通知されます。エラーは、
onSpendCurrencyResponseFailure(String error)
メソッドで通知されます。
// Spend currencyTapjoy.SpendCurrency(10);// on enable, add delegatesvoid OnEnable() { Tapjoy.OnSpendCurrencyResponse += HandleSpendCurrencyResponse; Tapjoy.OnSpendCurrencyResponseFailure += HandleSpendCurrencyResponseFailure;}// on disable, remove delegatesvoid OnDisable() { Tapjoy.OnSpendCurrencyResponse -= HandleSpendCurrencyResponse; Tapjoy.OnSpendCurrencyResponseFailure -= HandleSpendCurrencyResponseFailure;}public void HandleSpendCurrencyResponse(string currencyName, int balance) { Debug.Log("C#:HandleSpendCurrencyResponse: currencyName: " + currencyName + ", balance: " + balance);} public void HandleSpendCurrencyResponseFailure(string error) { Debug.Log("C#:HandleSpendCurrencyResponseFailure: " + error);}
通貨残高は、指定した
OnSpendCurrencyResponse
ハンドラーで通知されます。このハンドラーは
currencyName
と
balance
のパラメーターを渡します。エラーは、
OnSpendCurrencyResponseFailure
ハンドラーで通知されます。
try { let result = await Tapjoy.spendCurrency(10); let currencyName = result['currencyName']; let amount = result['amount'];} catch (error: any) { //Handle error}
React Native では、
spendCurrency(),
にパラメーターとして
amount
を取る promise を使用します。promise はディクショナリまたはエラー (検出される) で解決されます。ディクショナリキー
currencyName
は、通貨金額が含まれる文字列を保持します。
// Spend currency TapjoyAIR.spendCurrency(10); // Setup handlers TapjoyAIR.addEventListener(TJCurrencyEvent.SPEND_CURRENCY_SUCCESS, tapjoyCurrencyEventHandler); TapjoyAIR.addEventListener(TJCurrencyEvent.SPEND_CURRENCY_FAILURE, tapjoyCurrencyEventHandler); private function tapjoyCurrencyEventHandler(event:TJCurrencyEvent):void { trace("Tapjoy sample event listener for " + event.type + ", " + event.balance + ", " + event.currencyName); }
通貨残高は、指定した
TJCurrencyEvent.SPEND_CURRENCY_SUCCESS
ハンドラーで通知されます。このハンドラーは
TJCurrencyEvent
オブジェクトを渡します。このオブジェクトには
currencyName
と
balance
のプロパティが含まれます。エラーは、
TJCurrencyEvent.SPEND_CURRENCY_FAILURE
ハンドラーで通知されます。

Tapjoy 管理通貨の付与

注意
新しいアプリでこの機能を利用する場合は、アカウントマネージャーに連絡して承認を得てください。
ゲーム内通貨をユーザーに付与するには、以下のセクションで詳しく説明されているプラットフォーム別のメソッドを使用します。
// This method call will award 10 virtual currencies to the user's total. [Tapjoy awardCurrency:10 completion:^(NSDictionary *parameters, NSError *error) { if (error) { NSLog(@"awardCurrency error: %@", [error localizedDescription]); } else { NSLog(@"awardCurrency returned %@: %d", parameters[@"currencyName"], [parameters[@"amount"] intValue]); }}];
通貨残高は
completion
ブロックで通知されます。パラメーター
currencyName
は通貨の名前を示し、
amount
はユーザーの残高を示します。
Tapjoy.awardCurrency(10, new TJAwardCurrencyListener() { @Override public void onAwardCurrencyResponseFailure(String error) { Log.i("Tapjoy", "awardCurrency error: " + error); } @Override public void onAwardCurrencyResponse(String currencyName, int balance) { Log.i("Tapjoy", currencyName + ": " + balance); } });
通貨残高は、指定した
TJAwardCurrencyListener
の
onAwardCurrencyResponse(String currencyName, int balance)
コールバックメソッドで通知されます。
// Award currencyTapjoy.AwardCurrency(10);// on enable, add delegatesvoid OnEnable() { Tapjoy.OnAwardCurrencyResponse += HandleAwardCurrencyResponse; Tapjoy.OnAwardCurrencyResponseFailure += HandleAwardCurrencyResponseFailure;}// on disable, remove delegatesvoid OnDisable() { Tapjoy.OnAwardCurrencyResponse -= HandleAwardCurrencyResponse; Tapjoy.OnAwardCurrencyResponseFailure -= HandleAwardCurrencyResponseFailure;}public void HandleAwardCurrencyResponse(string currencyName, int balance) { Debug.Log("C#:HandleAwardCurrencySucceeded: currencyName: " + currencyName + ", balance: " + balance);} public void HandleAwardCurrencyResponseFailure(string error) { Debug.Log("C#:HandleAwardCurrencyResponseFailure: " + error);}
通貨残高は、指定した
OnAwardCurrencyResponse
ハンドラーで通知されます。このハンドラーは
currencyName
と
balance
のパラメーターを渡します。エラーは、
OnAwardCurrencyResponseFailure
ハンドラーで通知されます。
try { let result = await Tapjoy.awardCurrency(10); let currencyName = result['currencyName']; let amount = result['amount'];} catch (error: any) { //Handle error}
React Native では、
awardCurrency()
にパラメーターとして
amount
を取る promise を使用します。promise はディクショナリまたはエラー (検出される) で解決されます。ディクショナリキー
currencyName
は、通貨金額が含まれる文字列を保持します。
// Award currencyTapjoyAIR.awardCurrency(10);// Setup handlersTapjoyAIR.addEventListener(TJCurrencyEvent.AWARD_CURRENCY_SUCCESS, tapjoyCurrencyEventHandler);TapjoyAIR.addEventListener(TJCurrencyEvent.AWARD_CURRENCY_FAILED, tapjoyCurrencyEventHandler);private function tapjoyCurrencyEventHandler(event:TJCurrencyEvent):void { trace("Tapjoy sample event listener for " + event.type + ", " + event.balance + ", " + event.currencyName);}
通貨残高は、指定した
TJCurrencyEvent.AWARD_CURRENCY_SUCCESS
ハンドラーで通知されます。このハンドラーは
TJCurrencyEvent
オブジェクトを渡します。このオブジェクトには
currencyName
と
balance
のプロパティが含まれます。エラーは、
TJCurrencyEvent.AWARD_CURRENCY_FAILURE
ハンドラーで通知されます。

Tapjoy 管理通貨のテスト

Offerwall でオファーをテストするには、アプリケーションにテストデバイスを加えます。これにより、Offerwall の上部に検証用のテストオファーが表示されます。

ベストプラクティスおよび追加情報

  • awardCurrency
    と
    spendCurrency
    の呼び出しを必ず検証し、これらの呼び出しが成功した場合のみコンテンツをロック解除します。失敗した場合、デバイス上の残高に影響を与える可能性があります。
  • ローカルに保存されている通貨のみに依存せず、Tapjoy のサーバーを利用して正確性を保ちます。
  • spendCurrency は、コンテンツをロック解除するために通貨を差し引く場合にのみ呼び出します。
  • 管理通貨はアプリ ID ごとに 1 つの通貨のみをサポートします。複数の通貨がある場合は、自己管理通貨を使用します。
  • Tapjoy では、通貨残高がデバイスごと、アプリごとに保存されるため、デバイス間で残高を共有することはできません。
  • Tapjoy はゲーム内報酬を迅速に付与することを目指していますが、さまざまな要因によって通貨の付与が遅れる場合があります。主要なアプリイベントの後に定期的に残高を確認し、ユーザーに遅延の可能性があることを通知します。

Copyright © 2026 Unity Technologies
法規事項プライバシーポリシークッキーDocumentation Terms of Use私の個人情報を販売または共有しないプライバシーに関する選択 (クッキー設定)

"Unity" の名称、Unity のロゴ、およびその他の Unity の商標は、米国およびその他の国における Unity Technologies またはその関係会社の商標または登録商標です (詳しくはこちら)。その他の名称またはブランドは該当する所有者の商標です。

一部のページは利便性向上のため機械翻訳を使用しており、内容に不正確な表現が含まれる場合があります。内容に齟齬または不一致が生じた場合は、英語版を正本とします。

  • このページ
    • 通貨残高の取得

      • 通貨残高の取得

    • ユーザーが通貨を獲得したかどうかの確認

    • Tapjoy 管理通貨の支出

    • Tapjoy 管理通貨の付与

    • Tapjoy 管理通貨のテスト

    • ベストプラクティスおよび追加情報


このページの問題を報告する