Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions sample/src/main/java/io/qonversion/sample/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ public void onCreate() {
Qonversion.initialize(qonversionConfigBuilder.build());
NoCodes.initialize(noCodesConfigBuilder.build());

Qonversion.getSharedInstance().syncHistoricalData();

AppsFlyerConversionListener conversionListener = new AppsFlyerConversionListener() {
@Override
public void onConversionDataSuccess(final Map<String, Object> conversionData) {
Expand Down
9 changes: 0 additions & 9 deletions sdk/src/main/java/com/qonversion/android/sdk/Qonversion.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,6 @@ interface Qonversion {
}
}

/**
* Call this function to sync the subscriber data with the first launch
* when Qonversion is implemented.
*
* You don't need to care about single call of this function during the application lifetime.
* Qonversion will take care about it.
*/
fun syncHistoricalData()

/**
* Make a purchase and validate it through server-to-server using Qonversion's Backend
* @param context current activity context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ internal object Constants {
const val PREFS_PARTNER_IDENTITY_ID_KEY = "$PREFS_PREFIX.partnerIdentityUserID"
const val USER_ID_PREFIX = "QON"
const val USER_ID_SEPARATOR = "_"
const val IS_HISTORICAL_DATA_SYNCED = "$PREFS_PREFIX.is_historical_data_synced"
const val INTERNAL_SERVER_ERROR_MIN = 500
const val INTERNAL_SERVER_ERROR_MAX = 599
const val PRICE_MICROS_DIVIDER: Double = 1000000.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,27 +128,6 @@ internal class QonversionInternal(
attributionManager.onAppForeground()
}

override fun syncHistoricalData() {
val isHistoricalDataSynced: Boolean =
sharedPreferencesCache.getBool(Constants.IS_HISTORICAL_DATA_SYNCED)
if (isHistoricalDataSynced) {
return
}

productCenterManager.restore(
RequestTrigger.SyncHistoricalData,
callback = object : QonversionEntitlementsCallback {
override fun onSuccess(entitlements: Map<String, QEntitlement>) {
sharedPreferencesCache.putBool(Constants.IS_HISTORICAL_DATA_SYNCED, true)
}

override fun onError(error: QonversionError) {
logger.error("Historical data sync failed.")
}
}
)
}

override fun purchase(
context: Activity,
product: QProduct,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ internal enum class RequestTrigger(val key: String) {
Purchase("Purchase"),
UserProperties("UserProperties"),
Restore("Restore"),
SyncHistoricalData("SyncHistoricalData"),
SyncPurchases("SyncPurchases"),
ActualizePermissions("ActualizePermissions"),
Logout("Logout"),
Expand Down