diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java index 656c4e58e..ad5e8c35b 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java @@ -962,7 +962,7 @@ public final class ActFmSyncService { String purchaseToken = Preferences.getStringValue(BillingConstants.PREF_PURCHASE_TOKEN); String productId = Preferences.getStringValue(BillingConstants.PREF_PRODUCT_ID); try { - actFmInvoker.invoke("premium_update_android", "purchaseToken", purchaseToken, "productId", productId); + actFmInvoker.invoke("premium_update_android", "purchase_token", purchaseToken, "product_id", productId); Preferences.setBoolean(BillingConstants.PREF_NEEDS_SERVER_UPDATE, false); if (onSuccess != null) onSuccess.run(); diff --git a/astrid/src/com/todoroo/astrid/billing/BillingActivity.java b/astrid/src/com/todoroo/astrid/billing/BillingActivity.java index 5aa261019..2deb72b08 100644 --- a/astrid/src/com/todoroo/astrid/billing/BillingActivity.java +++ b/astrid/src/com/todoroo/astrid/billing/BillingActivity.java @@ -235,12 +235,22 @@ public class BillingActivity extends Activity { @Override public void run() { Preferences.setBoolean(ActFmPreferenceService.PREF_PREMIUM, true); - Toast.makeText(BillingActivity.this, R.string.premium_success, Toast.LENGTH_LONG).show(); + runOnUiThread(new Runnable() { + @Override + public void run() { + Toast.makeText(BillingActivity.this, R.string.premium_success, Toast.LENGTH_LONG).show(); + } + }); } }, new Runnable() { @Override public void run() { - Toast.makeText(BillingActivity.this, R.string.premium_success_with_server_error, Toast.LENGTH_LONG).show(); + runOnUiThread(new Runnable() { + @Override + public void run() { + Toast.makeText(BillingActivity.this, R.string.premium_success_with_server_error, Toast.LENGTH_LONG).show(); + } + }); } }); }