当前位置: 首页>>代码示例>>Java>>正文


Java SoomlaUtils.LogDebug方法代码示例

本文整理汇总了Java中com.soomla.SoomlaUtils.LogDebug方法的典型用法代码示例。如果您正苦于以下问题:Java SoomlaUtils.LogDebug方法的具体用法?Java SoomlaUtils.LogDebug怎么用?Java SoomlaUtils.LogDebug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.soomla.SoomlaUtils的用法示例。


在下文中一共展示了SoomlaUtils.LogDebug方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startIabHelper

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
/**
 * Create a new IAB helper and set it up.
 *
 * @param onIabSetupFinishedListener is a callback that lets users to add their own implementation for when the Iab is started
 */
private synchronized void startIabHelper(OnIabSetupFinishedListener onIabSetupFinishedListener) {
    if (isIabServiceInitialized())
    {
        SoomlaUtils.LogDebug(TAG, "The helper is started. Just running the post start function.");

        if (onIabSetupFinishedListener != null && onIabSetupFinishedListener.getIabInitListener() != null) {
            onIabSetupFinishedListener.getIabInitListener().success(true);
        }
        return;
    }

    SoomlaUtils.LogDebug(TAG, "Creating IAB helper.");
    mHelper = new TapClashIabHelper();

    SoomlaUtils.LogDebug(TAG, "IAB helper Starting setup.");
    mHelper.startSetup(onIabSetupFinishedListener);
}
 
开发者ID:App47,项目名称:soomla-android-store-tapclash,代码行数:23,代码来源:TapClashIabService.java

示例2: onRestorePurchasessFinished

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
@Override
public void onRestorePurchasessFinished(IabResult result, IabInventory inventory) {
    SoomlaUtils.LogDebug(TAG, "Restore Purchases succeeded");
    if (result.getResponse() == IabResult.BILLING_RESPONSE_RESULT_OK && mRestorePurchasesListener != null) {
        // fetching owned items
        List<String> itemSkus = inventory.getAllOwnedSkus(IabHelper.ITEM_TYPE_INAPP);
        List<IabPurchase> purchases = new ArrayList<IabPurchase>();
        for (String sku : itemSkus) {
            IabPurchase purchase = inventory.getPurchase(sku);
            purchases.add(purchase);
        }

        this.mRestorePurchasesListener.success(purchases);
    } else {
        SoomlaUtils.LogError(TAG, "Wither mRestorePurchasesListener==null OR Restore purchases error: " + result.getMessage());
        if (this.mRestorePurchasesListener != null) this.mRestorePurchasesListener.fail(result.getMessage());
    }

    stopIabHelper(null);
}
 
开发者ID:App47,项目名称:soomla-android-store-tapclash,代码行数:21,代码来源:TapClashIabService.java

示例3: onFetchSkusDetailsFinished

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
@Override
public void onFetchSkusDetailsFinished(IabResult result, IabInventory inventory) {
    SoomlaUtils.LogDebug(TAG, "Restore Purchases succeeded");
    if (result.getResponse() == IabResult.BILLING_RESPONSE_RESULT_OK && mFetchSkusDetailsListener != null) {

        // @lassic (May 1st): actually, here (query finished) it only makes sense to get the details
        // of the SKUs we already queried for
        List<String> skuList = inventory.getAllQueriedSkus(false);
        List<IabSkuDetails> skuDetails = new ArrayList<IabSkuDetails>();
        for (String sku : skuList) {
            IabSkuDetails skuDetail = inventory.getSkuDetails(sku);
            if (skuDetail != null) {
                skuDetails.add(skuDetail);
            }
        }

        this.mFetchSkusDetailsListener.success(skuDetails);
    } else {
        SoomlaUtils.LogError(TAG, "Wither mFetchSkusDetailsListener==null OR Fetching details error: " + result.getMessage());
        if (this.mFetchSkusDetailsListener != null) this.mFetchSkusDetailsListener.fail(result.getMessage());
    }

    stopIabHelper(null);
}
 
开发者ID:App47,项目名称:soomla-android-store-tapclash,代码行数:25,代码来源:TapClashIabService.java

示例4: onIabPurchaseFinished

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
@Override
public void onIabPurchaseFinished(IabResult result, IabPurchase purchase) {
    /**
     * Wait to see if the purchase succeeded, then start the consumption process.
     */
    SoomlaUtils.LogDebug(TAG, "IabPurchase finished: " + result + ", purchase: " + purchase);

    TapClashIabService.getInstance().mWaitingServiceResponse = false;

    if (result.getResponse() == IabResult.BILLING_RESPONSE_RESULT_OK) {

        TapClashIabService.getInstance().mSavedOnPurchaseListener.success(purchase);
    } else if (result.getResponse() == IabResult.BILLING_RESPONSE_RESULT_USER_CANCELED) {

        TapClashIabService.getInstance().mSavedOnPurchaseListener.cancelled(purchase);
    } else if (result.getResponse() == IabResult.BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED) {

        TapClashIabService.getInstance().mSavedOnPurchaseListener.alreadyOwned(purchase);
    } else {

        TapClashIabService.getInstance().mSavedOnPurchaseListener.fail(result.getMessage());
    }
    TapClashIabService.getInstance().mSavedOnPurchaseListener = null;

    TapClashIabService.getInstance().stopIabHelper(null);
}
 
开发者ID:App47,项目名称:soomla-android-store-tapclash,代码行数:27,代码来源:TapClashIabService.java

示例5: onStart

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
@Override
protected void onStart() {
    SoomlaUtils.LogDebug(TAG, "onStart 1");
    super.onStart();

    if (!firstTime && SoomlaApp.getAppContext() instanceof Activity) {
        SoomlaUtils.LogDebug(TAG, "onStart 2");
        onActivityResult(10001, Activity.RESULT_CANCELED, null);

        Intent tabIntent = new Intent(this, ((Activity) SoomlaApp.getAppContext()).getClass());
        tabIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        SoomlaUtils.LogDebug(TAG, "onStart 3");
        startActivity(tabIntent);
    }
    SoomlaUtils.LogDebug(TAG, "onStart 4");
}
 
开发者ID:App47,项目名称:soomla-android-store-tapclash,代码行数:17,代码来源:TapClashIabService.java

示例6: onDestroy

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
@Override
        protected void onDestroy() {
            SoomlaUtils.LogDebug(TAG, "onDestroy 1");
            if (!mInProgressDestroy && TapClashIabService.getInstance().mWaitingServiceResponse)
            {
                SoomlaUtils.LogDebug(TAG, "onDestroy 2");
                TapClashIabService.getInstance().mWaitingServiceResponse = false;
                String err = "IabActivity is destroyed during purchase.";
                SoomlaUtils.LogError(TAG, err);

                // we're letting the helper take care of closing so there won't be any async process stuck in it.
                onActivityResult(10001, Activity.RESULT_CANCELED, null);

//                if (TapClashIabService.getInstance().mSavedOnPurchaseListener != null) {
//                    SoomlaUtils.LogDebug(TAG, "onDestroy 3");
//                    TapClashIabService.getInstance().mSavedOnPurchaseListener.fail(err);
//                    TapClashIabService.getInstance().mSavedOnPurchaseListener = null;
//                }
            }
            SoomlaUtils.LogDebug(TAG, "onDestroy 4");
            super.onDestroy();
        }
 
开发者ID:App47,项目名称:soomla-android-store-tapclash,代码行数:23,代码来源:TapClashIabService.java

示例7: onGoodBalanceChanged

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
/**
 * Receives the given <code>goodBalanceChangedEvent</code>. Upon notification, fetches the
 * good associated with the given <code>goodBalanceChangedEvent</code> and displays its price
 * and the balance.
 *
 * @param goodBalanceChangedEvent the event received
 */
@Subscribe
public void onGoodBalanceChanged(GoodBalanceChangedEvent goodBalanceChangedEvent) {
    VirtualGood good = null;
    try {
        good = (VirtualGood) StoreInfo.getVirtualItem(goodBalanceChangedEvent.getGoodItemId());
        int id = 0;
        for(int i=0; i<StoreInfo.getGoods().size(); i++) {
            if (StoreInfo.getGoods().get(i).getItemId().equals(good.getItemId())) {
                id = i;
                break;
            }
        }
        ListView list = (ListView) findViewById(R.id.list);
        TextView info = (TextView)list.getChildAt(id).findViewById(R.id.item_info);
        PurchaseWithVirtualItem pwvi = (PurchaseWithVirtualItem) good.getPurchaseType();
        info.setText("price: " + pwvi.getAmount() +
                " balance: " + goodBalanceChangedEvent.getBalance());
    } catch (VirtualItemNotFoundException e) {
        SoomlaUtils.LogDebug("StoreGoodsActivity", e.getMessage());
    }
}
 
开发者ID:soomla,项目名称:android-profile,代码行数:29,代码来源:StoreGoodsActivity.java

示例8: startIabHelper

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
/**
 * Create a new IAB helper and set it up.
 *
 * @param onIabSetupFinishedListener is a callback that lets users to add their own implementation for when the Iab is started
 */
private synchronized void startIabHelper(OnIabSetupFinishedListener onIabSetupFinishedListener) {
    if (isIabServiceInitialized())
    {
        SoomlaUtils.LogDebug(TAG, "The helper is started. Just running the post start function.");

        if (onIabSetupFinishedListener != null && onIabSetupFinishedListener.getIabInitListener() != null) {
            onIabSetupFinishedListener.getIabInitListener().success(true);
        }
        return;
    }

    SoomlaUtils.LogDebug(TAG, "Creating IAB helper.");
    mHelper = new NokiaIabHelper();

    SoomlaUtils.LogDebug(TAG, "IAB helper Starting setup.");
    mHelper.startSetup(onIabSetupFinishedListener);
}
 
开发者ID:Marneus68,项目名称:android-store-nokia-store,代码行数:23,代码来源:NokiaStoreIabService.java

示例9: onFetchSkusDetailsFinished

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
@Override
public void onFetchSkusDetailsFinished(IabResult result, IabInventory inventory) {
    SoomlaUtils.LogDebug(TAG, "Restore Purchases succeeded");
    if (result.getResponse() == IabResult.BILLING_RESPONSE_RESULT_OK && mFetchSkusDetailsListener != null) {

        // @lassic (May 1st): actually, here (query finished) it only makes sense to get the details
        // of the SKUs we already queried for
        List<String> skuList = inventory.getAllQueriedSkus(false);
        List<IabSkuDetails> skuDetails = new ArrayList<IabSkuDetails>();
        for (String sku : skuList) {
            IabSkuDetails skuDetail = inventory.getSkuDetails(sku);
            if (skuDetail != null) {
                skuDetails.add(skuDetail);
            }
        }

        this.mFetchSkusDetailsListener.success(skuDetails);
    } else {
        SoomlaUtils.LogError(TAG, "Wither mFetchSkusDetailsListener==null OR Fetching details error: " + result.getMessage());
        if (this.mFetchSkusDetailsListener != null) this.mFetchSkusDetailsListener.fail(result.getMessage());
    }
}
 
开发者ID:soomla,项目名称:android-store-amazon,代码行数:23,代码来源:AmazonIabService.java

示例10: onRestorePurchasessFinished

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
@Override
public void onRestorePurchasessFinished(IabResult result, IabInventory inventory) {
    SoomlaUtils.LogDebug(TAG, "Restore Purchases succeeded");
    if (result.getResponse() == IabResult.BILLING_RESPONSE_RESULT_OK && mRestorePurchasesListener != null) {
        // fetching owned items
        List<String> itemSkus = inventory.getAllOwnedSkus(IabHelper.ITEM_TYPE_INAPP);
        List<IabPurchase> purchases = new ArrayList<IabPurchase>();
        for (String sku : itemSkus) {
            IabPurchase purchase = inventory.getPurchase(sku);
            purchases.add(purchase);
        }

        this.mRestorePurchasesListener.success(purchases);
    } else {
        SoomlaUtils.LogError(TAG, "Wither mRestorePurchasesListener==null OR Restore purchases error: " + result.getMessage());
        if (this.mRestorePurchasesListener != null) this.mRestorePurchasesListener.fail(result.getMessage());
    }
}
 
开发者ID:soomla,项目名称:android-store-amazon,代码行数:19,代码来源:AmazonIabService.java

示例11: getContacts

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void getContacts(boolean fromStart, final SocialCallbacks.ContactsListener contactsListener) {
    if (!isInitialized) {
        return;
    }

    SoomlaUtils.LogDebug(TAG, "getContacts");

    RefProvider = getProvider();
    RefContactsListener = contactsListener;

    preformingAction = ACTION_GET_USER_PROFILE;

    try {
        twitter.getFriendsList(twitterScreenName, fromStart ? -1 : this.lastContactCursor);
        this.lastContactCursor = -1;
    } catch (Exception e) {
        failListener(ACTION_GET_USER_PROFILE, e.getMessage());
    }
}
 
开发者ID:soomla,项目名称:android-profile,代码行数:24,代码来源:SoomlaTwitter.java

示例12: onIabSetupFinished

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
@Override
public void onIabSetupFinished(IabResult result) {

    SoomlaUtils.LogDebug(TAG, "IAB helper Setup finished.");
    if (result.isFailure()) {
        if (mIabInitListener != null) mIabInitListener.fail(result.getMessage());
        return;
    }
    if (mIabInitListener != null) mIabInitListener.success(false);
}
 
开发者ID:App47,项目名称:soomla-android-store-tapclash,代码行数:11,代码来源:TapClashIabService.java

示例13: onActivityResult

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    SoomlaUtils.LogDebug(TAG, "onActivityResult 1");
    if (!TapClashIabService.getInstance().mHelper.handleActivityResult(requestCode, resultCode, data)) {
        SoomlaUtils.LogDebug(TAG, "onActivityResult 2");
        super.onActivityResult(requestCode, resultCode, data);
    }
    SoomlaUtils.LogDebug(TAG, "onActivityResult 3");
    finish();
}
 
开发者ID:App47,项目名称:soomla-android-store-tapclash,代码行数:11,代码来源:TapClashIabService.java

示例14: dispose

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
/**
 * Dispose of object, releasing resources. It's very important to call this
 * method when you are done with this object. It will release any resources
 * used by it such as service connections. Naturally, once the object is
 * disposed of, it can't be used again.
 */
public void dispose() {
    SoomlaUtils.LogDebug(TAG, "Disposing.");
    super.dispose();
    if (mServiceConn != null) {
        SoomlaUtils.LogDebug(TAG, "Unbinding from service.");
        if (SoomlaApp.getAppContext() != null && mService != null) SoomlaApp.getAppContext().unbindService(mServiceConn);
        mServiceConn = null;
        mService = null;
    }
}
 
开发者ID:App47,项目名称:soomla-android-store-tapclash,代码行数:17,代码来源:TapClashIabHelper.java

示例15: consume

import com.soomla.SoomlaUtils; //导入方法依赖的package包/类
/**
 * Consumes a given in-app product. Consuming can only be done on an item
 * that's owned, and as a result of consumption, the user will no longer own it.
 * This method may block or take long to return. Do not call from the UI thread.
 * For that, see {@link #consumeAsync}.
 *
 * @param itemInfo The PurchaseInfo that represents the item to consume.
 * @throws IabException if there is a problem during consumption.
 */
 public void consume(IabPurchase itemInfo) throws IabException {
     checkSetupDoneAndThrow("consume");

    if (!itemInfo.getItemType().equals(ITEM_TYPE_INAPP)) {
        throw new IabException(IabResult.IABHELPER_INVALID_CONSUMPTION,
                "Items of type '" + itemInfo.getItemType() + "' can't be consumed.");
    }

    try {
        String token = itemInfo.getToken();
        String sku = itemInfo.getSku();
        if (token == null || token.equals("")) {
           SoomlaUtils.LogError(TAG, "Can't consume "+ sku + ". No token.");
           throw new IabException(IabResult.IABHELPER_MISSING_TOKEN, "PurchaseInfo is missing token for sku: "
               + sku + " " + itemInfo);
        }

        SoomlaUtils.LogDebug(TAG, "Consuming sku: " + sku + ", token: " + token);
        int response = mService.consumePurchase(3, SoomlaApp.getAppContext().getPackageName(), token);
        if (response == IabResult.BILLING_RESPONSE_RESULT_OK) {
           SoomlaUtils.LogDebug(TAG, "Successfully consumed sku: " + sku);
        }
        else {
           SoomlaUtils.LogDebug(TAG, "Error consuming consuming sku " + sku + ". " + IabResult.getResponseDesc(response));
           throw new IabException(response, "Error consuming sku " + sku);
        }
    }
    catch (RemoteException e) {
        throw new IabException(IabResult.IABHELPER_REMOTE_EXCEPTION, "Remote exception while consuming. PurchaseInfo: " + itemInfo, e);
    }
}
 
开发者ID:App47,项目名称:soomla-android-store-tapclash,代码行数:41,代码来源:TapClashIabHelper.java


注:本文中的com.soomla.SoomlaUtils.LogDebug方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。