瀏覽代碼

moved to gplay only

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 2 年之前
父節點
當前提交
331f5b2371

+ 1 - 2
app/build.gradle

@@ -366,6 +366,7 @@ dependencies {
 
     // upon each update first test: new registration, receive push
     gplayImplementation "com.google.firebase:firebase-messaging:23.1.2"
+    gplayImplementation 'com.google.android.play:review-ktx:2.0.0'
 
     implementation 'com.github.nextcloud.android-common:ui:0.10.0'
 
@@ -373,8 +374,6 @@ dependencies {
     kapt "androidx.room:room-compiler:$roomVersion"
     androidTestImplementation "androidx.room:room-testing:$roomVersion"
 
-    // Play In-App Review
-    implementation 'com.google.android.play:review-ktx:2.0.0'
     implementation "io.coil-kt:coil:2.2.2"
 }
 

+ 34 - 0
app/src/generic/java/com/owncloud/android/app_review/InAppReviewHelperImpl.kt

@@ -0,0 +1,34 @@
+/*
+ * Nextcloud Android client application
+ *
+ * @author Tobias Kaminsky
+ * Copyright (C) 2023 Tobias Kaminsky
+ * Copyright (C) 2023 Nextcloud GmbH
+ *  
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *  
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *  
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+package com.owncloud.android.app_review
+
+import androidx.appcompat.app.AppCompatActivity
+import com.nextcloud.client.preferences.AppPreferences
+
+class InAppReviewHelperImpl(appPreferences: AppPreferences) :
+    InAppReviewHelper {
+    override fun resetAndIncrementAppRestartCounter() {
+    }
+
+    override fun showInAppReview(activity: AppCompatActivity) {
+    }
+}

+ 21 - 5
app/src/main/java/com/nmc/android/app_review/InAppReviewHelperImpl.kt → app/src/gplay/java/com/owncloud/android/app_review/InAppReviewHelperImpl.kt

@@ -1,3 +1,24 @@
+/*
+ * Nextcloud Android client application
+ *
+ * @author Tobias Kaminsky
+ * Copyright (C) 2023 Tobias Kaminsky
+ * Copyright (C) 2023 Nextcloud GmbH
+ *  
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *  
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *  
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
 package com.nmc.android.app_review
 
 import androidx.appcompat.app.AppCompatActivity
@@ -29,11 +50,9 @@ class InAppReviewHelperImpl(val appPreferences: AppPreferences) : InAppReviewHel
             } else {
                 resetReviewShownModel()
             }
-
         } else {
             resetReviewShownModel()
         }
-
     }
 
     private fun resetReviewShownModel() {
@@ -57,7 +76,6 @@ class InAppReviewHelperImpl(val appPreferences: AppPreferences) : InAppReviewHel
         }
     }
 
-
     private fun doAppReview(activity: AppCompatActivity) {
         val manager = ReviewManagerFactory.create(activity)
         val request: Task<ReviewInfo> = manager.requestReviewFlow()
@@ -98,10 +116,8 @@ class InAppReviewHelperImpl(val appPreferences: AppPreferences) : InAppReviewHel
             it.lastReviewShownDate = System.currentTimeMillis().getFormattedStringDate(DATE_TIME_FORMAT)
             appPreferences.setInAppReviewData(it)
         }
-
     }
 
-
     companion object {
         private val TAG = InAppReviewHelperImpl::class.java.simpleName
         const val YEAR_FORMAT = "yyyy"

+ 34 - 0
app/src/huawei/java/com/owncloud/android/app_review/InAppReviewHelperImpl.kt

@@ -0,0 +1,34 @@
+/*
+ * Nextcloud Android client application
+ *
+ * @author Tobias Kaminsky
+ * Copyright (C) 2023 Tobias Kaminsky
+ * Copyright (C) 2023 Nextcloud GmbH
+ *  
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *  
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *  
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+package com.owncloud.android.app_review
+
+import androidx.appcompat.app.AppCompatActivity
+import com.nextcloud.client.preferences.AppPreferences
+
+class InAppReviewHelperImpl(appPreferences: AppPreferences) :
+    InAppReviewHelper {
+    override fun resetAndIncrementAppRestartCounter() {
+    }
+
+    override fun showInAppReview(activity: AppCompatActivity) {
+    }
+}

+ 2 - 1
app/src/main/java/com/nmc/android/app_review/InAppReviewModule.kt

@@ -2,6 +2,7 @@ package com.nmc.android.app_review
 
 
 import com.nextcloud.client.preferences.AppPreferences
+import com.owncloud.android.app_review.InAppReviewHelperImpl
 import dagger.Module
 import dagger.Provides
 import javax.inject.Singleton
@@ -14,4 +15,4 @@ class InAppReviewModule {
     internal fun providesInAppReviewHelper(appPreferences: AppPreferences): InAppReviewHelper {
         return InAppReviewHelperImpl(appPreferences)
     }
-}
+}

+ 36 - 0
app/src/qa/java/com/owncloud/android/app_review/InAppReviewHelperImpl.kt

@@ -0,0 +1,36 @@
+/*
+ *
+ * Nextcloud Android client application
+ *
+ * @author Tobias Kaminsky
+ * Copyright (C) 2023 Tobias Kaminsky
+ * Copyright (C) 2023 Nextcloud GmbH
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+package com.owncloud.android.app_review
+
+import androidx.appcompat.app.AppCompatActivity
+import com.nextcloud.client.preferences.AppPreferences
+import com.nmc.android.app_review.InAppReviewHelper
+
+class InAppReviewHelperImpl(appPreferences: AppPreferences) :
+    InAppReviewHelper {
+    override fun resetAndIncrementAppRestartCounter() {
+    }
+
+    override fun showInAppReview(activity: AppCompatActivity) {
+    }
+}

+ 35 - 0
app/src/versionDev/java/com/owncloud/android/app_review/InAppReviewHelperImpl.kt

@@ -0,0 +1,35 @@
+/*
+ *
+ * Nextcloud Android client application
+ *
+ * @author Tobias Kaminsky
+ * Copyright (C) 2023 Tobias Kaminsky
+ * Copyright (C) 2023 Nextcloud GmbH
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+package com.owncloud.android.app_review
+
+import androidx.appcompat.app.AppCompatActivity
+import com.nextcloud.client.preferences.AppPreferences
+
+class InAppReviewHelperImpl(appPreferences: AppPreferences) :
+    InAppReviewHelper {
+    override fun resetAndIncrementAppRestartCounter() {
+    }
+
+    override fun showInAppReview(activity: AppCompatActivity) {
+    }
+}