コード例 #1
0
 @Override
 protected void onSaveInstanceState(final Bundle outState) {
   TestOuyaFacade test = IOuyaActivity.GetTestOuyaFacade();
   if (null != test) {
     test.onSaveInstanceState(outState);
   }
 }
コード例 #2
0
 @Override
 public void onReceive(Context context, Intent intent) {
   TestOuyaFacade test = IOuyaActivity.GetTestOuyaFacade();
   if (null != test) {
     test.requestReceipts();
   }
 }
コード例 #3
0
  @Override
  protected void onDestroy() {
    TestOuyaFacade test = IOuyaActivity.GetTestOuyaFacade();
    if (null != test) {
      test.onDestroy();
    }

    if (null != IOuyaActivity.GetUnityPlayer()) {
      IOuyaActivity.GetUnityPlayer().quit();
    }

    super.onDestroy();
  }
コード例 #4
0
 /**
  * Check for the result from a call through to the authentication intent. If the authentication
  * was successful then re-try the purchase.
  */
 @Override
 protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
   if (resultCode == RESULT_OK) {
     TestOuyaFacade test = IOuyaActivity.GetTestOuyaFacade();
     if (null != test) {
       switch (requestCode) {
         case TestOuyaFacade.GAMER_UUID_AUTHENTICATION_ACTIVITY_ID:
           test.fetchGamerUUID();
           break;
         case TestOuyaFacade.PURCHASE_AUTHENTICATION_ACTIVITY_ID:
           test.restartInterruptedPurchase();
           break;
       }
     }
   }
 }