No issue: Add number_of_app_launches custom attribute to nimbus messages.

pull/543/head
Arturo Mejia 2 years ago
parent 883401d8a4
commit 61807c5316

@ -6,6 +6,7 @@ package org.mozilla.fenix.gleanplumb
import android.content.Context
import org.json.JSONObject
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.utils.BrowsersCache
import java.text.SimpleDateFormat
import java.util.Locale
@ -27,7 +28,8 @@ object CustomAttributeProvider {
return JSONObject(
mapOf(
"is_default_browser_string" to BrowsersCache.all(context).isDefaultBrowser.toString(),
"date_string" to formatter.format(now.time)
"date_string" to formatter.format(now.time),
"number_of_app_launches" to context.settings().numberOfAppLaunches
)
)
}

@ -125,6 +125,7 @@ features:
NEVER: "false"
I_AM_DEFAULT_BROWSER: "is_default_browser_string == 'true'"
I_AM_NOT_DEFAULT_BROWSER: "is_default_browser_string == 'false'"
USER_ESTABLISHED_INSTALL: "number_of_app_launches >=4"
actions:
ENABLE_PRIVATE_BROWSING: ://enable_private_browsing
INSTALL_SEARCH_WIDGET: ://install_search_widget
@ -164,7 +165,7 @@ features:
default-browser:
text: default_browser_experiment_card_text
action: "MAKE_DEFAULT_BROWSER"
trigger: [ "I_AM_NOT_DEFAULT_BROWSER" ]
trigger: [ "I_AM_NOT_DEFAULT_BROWSER","USER_ESTABLISHED_INSTALL" ]
style: "DEFAULT"
button-label: preferences_set_as_default_browser

Loading…
Cancel
Save