Пример #1
0
 private void handleCommand(Intent intent, int startId) {
   final Action action = getActionFromIntent(intent);
   if (action == null) {
     return;
   }
   switch (action) {
     case CHECK_BILLING_SUPPORTED:
       checkBillingSupported(startId);
       break;
     case REQUEST_PURCHASE:
       requestPurchase(intent, startId);
       break;
     case GET_PURCHASE_INFORMATION:
       getPurchaseInformation(intent, startId);
       break;
     case CONFIRM_NOTIFICATIONS:
       confirmNotifications(intent, startId);
       break;
     case RESTORE_TRANSACTIONS:
       restoreTransactions(intent, startId);
   }
 }