@Override protected void onSaveInstanceState(final Bundle outState) { TestOuyaFacade test = IOuyaActivity.GetTestOuyaFacade(); if (null != test) { test.onSaveInstanceState(outState); } }
@Override public void onReceive(Context context, Intent intent) { TestOuyaFacade test = IOuyaActivity.GetTestOuyaFacade(); if (null != test) { test.requestReceipts(); } }
@Override protected void onDestroy() { TestOuyaFacade test = IOuyaActivity.GetTestOuyaFacade(); if (null != test) { test.onDestroy(); } if (null != IOuyaActivity.GetUnityPlayer()) { IOuyaActivity.GetUnityPlayer().quit(); } super.onDestroy(); }
/** * 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; } } } }