android billing

This commit is contained in:
Sergey Solovyev 2012-01-29 21:19:13 +04:00
parent eae4726686
commit 899caa1546
2 changed files with 1 additions and 13 deletions

View File

@ -42,19 +42,7 @@ public class CalculatorPreferencesActivity extends PreferenceActivity implements
// observer must be set before net.robotmedia.billing.BillingController.checkBillingSupported()
BillingController.registerObserver(this);
// check billing support one more time as user can turn on internet while he is in current activity
switch (BillingController.checkBillingSupported(CalculatorPreferencesActivity.this)) {
case UNKNOWN:
// unknown => will wait the invocation of onBillingChecked()
Log.d(CalculatorPreferencesActivity.class.getName(), "Billing state in unknown - waiting!");
break;
case SUPPORTED:
onBillingChecked(true);
break;
case UNSUPPORTED:
onBillingChecked(false);
break;
}
BillingController.checkBillingSupported(CalculatorPreferencesActivity.this);
final SharedPreferences preferences = getPreferenceManager().getSharedPreferences();
preferences.registerOnSharedPreferenceChangeListener(this);

Binary file not shown.