Skip to content

Commit

Permalink
Release 8.0.0
Browse files Browse the repository at this point in the history
Release 8.0.0
  • Loading branch information
SpertsyanKM authored Jul 5, 2024
2 parents 13d5b17 + feec9b7 commit acd2192
Show file tree
Hide file tree
Showing 47 changed files with 800 additions and 192 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ buildscript {
}

android {
compileSdk 33
compileSdk 34
defaultConfig {
applicationId "com.qonversion.sample"
minSdkVersion 19
targetSdkVersion 33
minSdkVersion 21
targetSdkVersion 34
versionCode 1
versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
230 changes: 230 additions & 0 deletions app/src/main/assets/qonversion_android_fallbacks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
{
"products": [
{
"id": "android_installment",
"duration": 1,
"store_id": "gb7_test_subscription",
"type": 1,
"base_plan_id": "monthly-installment"
},
{
"id": "android_prepaid_2",
"duration": null,
"store_id": "daniel_prepaid",
"type": 1,
"base_plan_id": "monthly"
},
{
"id": "dan_test",
"duration": null,
"store_id": "dan_test_annual",
"type": null
},
{
"id": "gb6_annual",
"duration": 4,
"store_id": "gb6_test",
"type": 0,
"base_plan_id": "annual"
},
{
"id": "gb6_monthly",
"duration": 1,
"store_id": "gb6_test",
"type": 0,
"base_plan_id": "monthly"
},
{
"id": "gb6_weekly",
"duration": 0,
"store_id": "gb6_test",
"type": 1,
"base_plan_id": "weekly"
},
{
"id": "android_prepaid",
"duration": 2,
"store_id": "gp5_test_subscription_4",
"type": 1,
"base_plan_id": "prepaid-3m"
},
{
"id": "weekly",
"duration": 0,
"store_id": "gp5_test_subscription_4",
"type": 1,
"base_plan_id": "monthly-2"
},
{
"id": "consumable",
"duration": null,
"store_id": "qonversion_inapp_sample",
"type": 2
},
{
"id": "subs_plus_trial",
"duration": 1,
"store_id": "gp5_test_subscription_4",
"type": 0
},
{
"id": "annual",
"duration": 4,
"store_id": "article_test_trial",
"type": 0
},
{
"id": "in_app",
"duration": null,
"store_id": "qonversion_sample_purchase",
"type": 2
}
],
"offerings": [
{
"id": "main",
"tag": 1,
"products": [
{
"id": "weekly",
"duration": 0,
"store_id": "gp5_test_subscription_4",
"type": 1,
"base_plan_id": "monthly-2"
},
{
"id": "annual",
"duration": 4,
"store_id": "article_test_trial",
"type": 0
},
{
"id": "consumable",
"duration": null,
"store_id": "qonversion_inapp_sample",
"type": 2
}
]
},
{
"id": "discounted_offer",
"tag": 0,
"products": []
}
],
"products_permissions": {
"android_installment": [
"standart"
],
"android_prepaid_2": [
"premium"
],
"dan_test": [
"test_permission"
],
"gb6_annual": [
"premium"
],
"gb6_monthly": [
"plus"
],
"gb6_weekly": [
"standart"
],
"android_prepaid": [
"premium"
],
"weekly": [
"plus"
],
"consumable": [],
"subs_plus_trial": [
"standart"
],
"annual": [
"standart",
"sample"
],
"in_app": [
"Premium Movies"
]
},
"remote_config_list": [
{
"experiment": null,
"payload": {
"CTA": "Start Trial",
"CTA_color": "#307BF6",
"main_image": "[IMAGE_URL]",
"product_id": "prod_7d_trial_5.99",
"show_close_button": true
},
"source": {
"assignment_type": "auto",
"context_key": "main_paywall",
"name": "default paywall",
"type": "remote_configuration",
"uid": "0dcb1bd9-9bc3-4668-84aa-4540d1042c5d"
}
},
{
"experiment": null,
"payload": {
"CTA": "Start you trial",
"CTA_color": "red",
"main_image": "111",
"product_id": "123123123123123",
"show_close_button": true
},
"source": {
"assignment_type": "auto",
"context_key": "trulala",
"name": "Default settings",
"type": "remote_configuration",
"uid": "12feb1dd-8096-47bc-a5a1-443fd2828ecc"
}
},
{
"experiment": null,
"payload": {
"test_key": "test_value"
},
"source": {
"assignment_type": "auto",
"context_key": "test_context_key",
"name": "Test with context key1",
"type": "remote_configuration",
"uid": "c5077ec4-acf4-41ea-8b43-05114be5d7ce"
}
},
{
"experiment": null,
"payload": {
"test_key_2": "test_value_2"
},
"source": {
"assignment_type": "auto",
"context_key": "test_context_key_2",
"name": "Test with context key2 - copy",
"type": "remote_configuration",
"uid": "1c000f2a-2f4b-4736-b5dd-75b13bf73deb"
}
},
{
"experiment": null,
"payload": {
"bool": true,
"json": {
"key": "value"
}
},
"source": {
"assignment_type": "auto",
"context_key": "swift_key ",
"name": "Swift",
"type": "remote_configuration",
"uid": "9f85d738-56d8-4f6c-b54a-c08658be2cb4"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.android.billingclient.api.BillingClientStateListener;
import com.android.billingclient.api.BillingFlowParams;
import com.android.billingclient.api.BillingResult;
import com.android.billingclient.api.PendingPurchasesParams;
import com.android.billingclient.api.ProductDetails;
import com.android.billingclient.api.QueryProductDetailsParams;
import com.qonversion.android.sdk.Qonversion;
Expand All @@ -34,7 +35,12 @@ public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableB

client = BillingClient
.newBuilder(this)
.enablePendingPurchases()
.enablePendingPurchases(
PendingPurchasesParams.newBuilder()
.enableOneTimeProducts()
.enablePrepaidPlans()
.build()
)
.setListener((billingResult, purchases) -> {
if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) {
if (purchases != null && !purchases.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.android.billingclient.api.BillingClient
import com.android.billingclient.api.BillingClientStateListener
import com.android.billingclient.api.BillingFlowParams
import com.android.billingclient.api.BillingResult
import com.android.billingclient.api.PendingPurchasesParams
import com.android.billingclient.api.ProductDetails
import com.android.billingclient.api.QueryProductDetailsParams
import com.qonversion.android.sdk.Qonversion
Expand All @@ -20,7 +21,12 @@ class ManualTrackingActivityKt : AppCompatActivity() {
super.onCreate(savedInstanceState, persistentState)
client = BillingClient
.newBuilder(this)
.enablePendingPurchases()
.enablePendingPurchases(
PendingPurchasesParams.newBuilder()
.enableOneTimeProducts()
.enablePrepaidPlans()
.build()
)
.setListener { billingResult, purchases ->
if (billingResult.responseCode == BillingClient.BillingResponseCode.OK) {
if (!purchases.isNullOrEmpty()) {
Expand Down
Loading

0 comments on commit acd2192

Please sign in to comment.