Exemplo n.º 1
0
 /**
  * Starts a new activity for the user to buy an item for sale. This method forwards the intent on
  * to the PurchaseObserver (if it exists) because we need to start the activity on the activity
  * stack of the application.
  *
  * @param pendingIntent a PendingIntent that we received from Android Market that will create the
  *     new buy page activity
  * @param intent an intent containing a request id in an extra field that will be passed to the
  *     buy page activity when it is created
  */
 public static void buyPageIntentResponse(PendingIntent pendingIntent, Intent intent) {
   if (sPurchaseObserver == null) {
     if (StoreConfig.debug) {
       Log.d(TAG, "UI is not running");
     }
     return;
   }
   sPurchaseObserver.startBuyPageActivity(pendingIntent, intent);
 }
Exemplo n.º 2
0
 /**
  * Notifies the application of the availability of the MarketBillingService. This method is called
  * in response to the application calling {@link BillingService#checkBillingSupported(String)}.
  *
  * @param supported true if in-app billing is supported.
  */
 public static void checkBillingSupportedResponse(boolean supported, String type) {
   if (sPurchaseObserver != null) {
     sPurchaseObserver.onBillingSupported(supported, type);
   }
 }
Exemplo n.º 3
0
 /**
  * This is called when we receive a response code from Android Market for a RestoreTransactions
  * request.
  *
  * @param context the context
  * @param request the RestoreTransactions request for which we received a response code
  * @param responseCode a response code from Market to indicate the state of the request
  */
 public static void responseCodeReceived(
     Context context, RestoreTransactions request, ResponseCode responseCode) {
   if (sPurchaseObserver != null) {
     sPurchaseObserver.onRestoreTransactionsResponse(request, responseCode);
   }
 }