notify some users about the Clock app

This commit is contained in:
tibbi 2018-03-30 23:39:00 +02:00
parent 4c865de301
commit b97ab1d795
2 changed files with 7 additions and 6 deletions

View File

@ -14,6 +14,7 @@ import android.view.ViewGroup
import android.widget.FrameLayout
import com.simplemobiletools.commons.dialogs.CreateNewFolderDialog
import com.simplemobiletools.commons.dialogs.FilePickerDialog
import com.simplemobiletools.commons.dialogs.NewAppDialog
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.PERMISSION_READ_STORAGE
@ -42,7 +43,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
private val PICK_MEDIA = 2
private val PICK_WALLPAPER = 3
private val LAST_MEDIA_CHECK_PERIOD = 3000L
private val CONTACTS_PACKAGE = "com.simplemobiletools.contacts"
private val NEW_APP_PACKAGE = "com.simplemobiletools.clock"
lateinit var mDirs: ArrayList<Directory>
@ -101,11 +102,11 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
mIsPasswordProtectionPending = config.appPasswordProtectionOn
setupLatestMediaId()
// notify the users about the Contacts app
/*if (System.currentTimeMillis() < 1521015000000 && !config.wasNewAppShown && config.appRunCount > 100 && config.appRunCount % 50 != 0 && !isPackageInstalled(CONTACTS_PACKAGE)) {
// notify some users about the Clock app
if (System.currentTimeMillis() < 1523750400000 && !config.wasNewAppShown && config.appRunCount > 100 && config.appRunCount % 50 != 0 && !isPackageInstalled(NEW_APP_PACKAGE)) {
config.wasNewAppShown = true
NewAppDialog(this, CONTACTS_PACKAGE, "Simple Contacts")
}*/
NewAppDialog(this, NEW_APP_PACKAGE, "Simple Clock")
}
}
override fun onStart() {

View File

@ -47,7 +47,7 @@ const val ONE_FINGER_ZOOM = "one_finger_zoom"
const val ALLOW_INSTANT_CHANGE = "allow_instant_change"
const val REPLACE_ZOOMABLE_IMAGES = "replace_zoomable_images"
const val DO_EXTRA_CHECK = "do_extra_check"
const val WAS_NEW_APP_SHOWN = "was_new_app_shown"
const val WAS_NEW_APP_SHOWN = "was_new_app_shown_clock"
// slideshow
const val SLIDESHOW_INTERVAL = "slideshow_interval"