mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-03 13:54:09 +00:00
IAB supscriptions
This commit is contained in:
parent
2c1456a420
commit
a74dbb7d56
2 changed files with 10 additions and 10 deletions
|
@ -159,25 +159,25 @@ public class ActivityPro extends AppCompatActivity {
|
|||
PendingIntent pi = null;
|
||||
if (view == btnLog) {
|
||||
id = SKU_LOG_ID;
|
||||
pi = iab.getBuyIntent(SKU_LOG);
|
||||
pi = iab.getBuyIntent(SKU_LOG, false);
|
||||
} else if (view == btnFilter) {
|
||||
id = SKU_FILTER_ID;
|
||||
pi = iab.getBuyIntent(SKU_FILTER);
|
||||
pi = iab.getBuyIntent(SKU_FILTER, false);
|
||||
} else if (view == btnNotify) {
|
||||
id = SKU_NOTIFY_ID;
|
||||
pi = iab.getBuyIntent(SKU_NOTIFY);
|
||||
pi = iab.getBuyIntent(SKU_NOTIFY, false);
|
||||
} else if (view == btnSpeed) {
|
||||
id = SKU_SPEED_ID;
|
||||
pi = iab.getBuyIntent(SKU_SPEED);
|
||||
pi = iab.getBuyIntent(SKU_SPEED, false);
|
||||
} else if (view == btnTheme) {
|
||||
id = SKU_THEME_ID;
|
||||
pi = iab.getBuyIntent(SKU_THEME);
|
||||
pi = iab.getBuyIntent(SKU_THEME, false);
|
||||
} else if (view == btnAll) {
|
||||
id = SKU_PRO1_ID;
|
||||
pi = iab.getBuyIntent(SKU_PRO1);
|
||||
pi = iab.getBuyIntent(SKU_PRO1, false);
|
||||
} else if (view == btnDev) {
|
||||
id = SKU_SUPPORT1_ID;
|
||||
pi = iab.getBuyIntent(SKU_SUPPORT1);
|
||||
pi = iab.getBuyIntent(SKU_SUPPORT1, true);
|
||||
}
|
||||
|
||||
if (id > 0 && pi != null)
|
||||
|
|
|
@ -148,11 +148,11 @@ public class IAB implements ServiceConnection {
|
|||
return (details == null ? new ArrayList<String>() : details);
|
||||
}
|
||||
|
||||
public PendingIntent getBuyIntent(String sku) throws RemoteException {
|
||||
public PendingIntent getBuyIntent(String sku, boolean subscription) throws RemoteException {
|
||||
if (service == null)
|
||||
return null;
|
||||
Bundle bundle = service.getBuyIntent(IAB_VERSION, context.getPackageName(), sku, "inapp", "netguard");
|
||||
Log.i(TAG, "getBuyIntent");
|
||||
Bundle bundle = service.getBuyIntent(IAB_VERSION, context.getPackageName(), sku, subscription ? "subs" : "inapp", "netguard");
|
||||
Log.i(TAG, "getBuyIntent sku=" + sku + " subscription=" + subscription);
|
||||
Util.logBundle(bundle);
|
||||
int response = (bundle == null ? -1 : bundle.getInt("RESPONSE_CODE", -1));
|
||||
Log.i(TAG, "Response=" + getResult(response));
|
||||
|
|
Loading…
Reference in a new issue