android - 无法从 Tapjoy 积分墙获得点数?

标签 android tapjoy

我开发了一个安卓应用。在此应用程序中,我集成了 tapjoyeverbadge 积分墙。在 tapjoy 积分墙中,我调用以下方法来显示积分墙。

TapjoyConnect.getTapjoyConnectInstance().showOffers();

但是当我完成报价时,我无法在 toast 中看到点击点。以下是我为 tapjoy 积分墙 编写的代码。

public class TapjoyOfferwall implements TapjoyEarnedPointsNotifier, TapjoyNotifier{

    private Activity context;
    //private AppPreferences appPreferences;

    private String AppId_TapJoy = "bba49f11-b87f-4c0f-9632-21aa810dd6f1";
    private String SecretKey_TapJoy = "yiQIURFEeKm0zbOggubu";

    private String displayText = "";
    boolean update_text = false;
    boolean earnedPoints = false;

    int point_total;
    String currency_name;





    public TapjoyOfferwall(Activity context) {
        super();
        this.context = context;
        //appPreferences = new AppPreferences(context);

        // Enables logging to the console.
        TapjoyLog.enableLogging(true);

        // OPTIONAL: For custom startup flags.
        Hashtable<String, String> flags = new Hashtable<String, String>();
        flags.put(TapjoyConnectFlag.ENABLE_LOGGING, "true");

        // Connect with the Tapjoy server. Call this when the application first starts.
        // REPLACE THE APP ID WITH YOUR TAPJOY APP ID.
        // REPLACE THE SECRET KEY WITH YOUR SECRET KEY.
        TapjoyConnect.requestTapjoyConnect(context,AppId_TapJoy, SecretKey_TapJoy,flags);
        //TapjoyConnect.getTapjoyConnectInstance().setUserID(""+appPreferences.GetUserID());

        // Set our earned points notifier to this class.
        TapjoyConnect.getTapjoyConnectInstance().setEarnedPointsNotifier(this);
        //LaunchTapJoyOfferwall();
    }

    @Override
    public void earnedTapPoints(int amount)
    {
        earnedPoints = true;
        update_text = true;
        displayText = "You've just earned " + amount + " Tap Points!";

        // We must use a handler since we cannot update UI elements from a different thread.
        System.out.println("displayText :: "+displayText);
        OEPUtil.showAppToast(context, displayText);
    }

    public void LaunchTapJoyOfferwall() {
        TapjoyConnect.getTapjoyConnectInstance().showOffers();
    }

    @SuppressWarnings("deprecation")
    public void SetBannerAutoRefresh() {
        TapjoyConnect.getTapjoyConnectInstance().enableBannerAdAutoRefresh(false);
    }

    public void SetShutDown() {
        TapjoyConnect.getTapjoyConnectInstance().sendShutDownEvent();
    }
}

我正在点击一个按钮在我的一个 Activity 类(class)中访问这个类(class)。

请告诉我我所做的是否正确以及如何获得积分?

最佳答案

这可能对你有帮助..

http://www.jjask.com/32814/android-tapjoy-offerwall-never-makes-callback

基本上

@Override
protected void onResume()
{
    TapjoyConnect.getTapjoyConnectInstance().getTapPoints(this);
    super.onResume();
}

关于android - 无法从 Tapjoy 积分墙获得点数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14412665/

相关文章:

android - 获取运行时异常列 data2 无效?

java - InApp 计费安全和远程方法调用

android - 构建应用程序时出现警告 : "Expected stack map table for method with non-linear control flow."

Android Tapjoy Offerwall 从不回调

ios - iPhone应用集成Tapjoy sdk后,如何在UiViewcontroller中展示广告、视频?

android - 服务、可运行、异步任务

android - TimePickerDialog 未显示/显示

android - 在 Xamarin Android 名称中绑定(bind)一个 .AAR 不存在

ios - Tapjoy 展示位置问题 广告在应用程序中不可见