Loading fake-store/src/main/java/com/android/vending/billing/InAppBillingService.java +18 −5 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ import android.os.IBinder; import android.os.RemoteException; import android.util.Log; import java.util.ArrayList; import java.util.List; /** Loading @@ -24,25 +25,35 @@ public class InAppBillingService extends Service { @Override public Bundle getSkuDetails(int apiVersion, String packageName, String type, Bundle skusBundle) throws RemoteException { Log.e("fakestore", "getsku"); return null; Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 0); data.putStringArrayList("DETAILS_LIST", new ArrayList<String>()); return data; } @Override public Bundle getBuyIntent(int apiVersion, String packageName, String sku, String type, String developerPayload) throws RemoteException { Log.e("fakestore", "getbuy"); return null; Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 4); return data; } @Override public Bundle getPurchases(int apiVersion, String packageName, String type, String continuationToken) throws RemoteException { Log.e("fakestore", "getpurchase"); return null; Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 0); data.putStringArrayList("INAPP_PURCHASE_ITEM_LIST", new ArrayList<String>()); data.putStringArrayList("INAPP_PURCHASE_DATA_LIST", new ArrayList<String>()); data.putStringArrayList("INAPP_DATA_SIGNATURE_LIST", new ArrayList<String>()); return data; } @Override public int consumePurchase(int apiVersion, String packageName, String purchaseToken) throws RemoteException { Log.e("fakestore", "consumepurchase"); return 0; return 8; } @Override Loading @@ -54,7 +65,9 @@ public class InAppBillingService extends Service { @Override public Bundle getBuyIntentToReplaceSkus(int apiVersion, String packageName, List<String> oldSkus, String newSku, String type, String developerPayload) throws RemoteException { Log.e("fakestore", "getbuyintenttoreplace"); return null; Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 4); return data; } }; Loading Loading
fake-store/src/main/java/com/android/vending/billing/InAppBillingService.java +18 −5 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ import android.os.IBinder; import android.os.RemoteException; import android.util.Log; import java.util.ArrayList; import java.util.List; /** Loading @@ -24,25 +25,35 @@ public class InAppBillingService extends Service { @Override public Bundle getSkuDetails(int apiVersion, String packageName, String type, Bundle skusBundle) throws RemoteException { Log.e("fakestore", "getsku"); return null; Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 0); data.putStringArrayList("DETAILS_LIST", new ArrayList<String>()); return data; } @Override public Bundle getBuyIntent(int apiVersion, String packageName, String sku, String type, String developerPayload) throws RemoteException { Log.e("fakestore", "getbuy"); return null; Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 4); return data; } @Override public Bundle getPurchases(int apiVersion, String packageName, String type, String continuationToken) throws RemoteException { Log.e("fakestore", "getpurchase"); return null; Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 0); data.putStringArrayList("INAPP_PURCHASE_ITEM_LIST", new ArrayList<String>()); data.putStringArrayList("INAPP_PURCHASE_DATA_LIST", new ArrayList<String>()); data.putStringArrayList("INAPP_DATA_SIGNATURE_LIST", new ArrayList<String>()); return data; } @Override public int consumePurchase(int apiVersion, String packageName, String purchaseToken) throws RemoteException { Log.e("fakestore", "consumepurchase"); return 0; return 8; } @Override Loading @@ -54,7 +65,9 @@ public class InAppBillingService extends Service { @Override public Bundle getBuyIntentToReplaceSkus(int apiVersion, String packageName, List<String> oldSkus, String newSku, String type, String developerPayload) throws RemoteException { Log.e("fakestore", "getbuyintenttoreplace"); return null; Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 4); return data; } }; Loading