[{"data":1,"prerenderedAt":5581},["ShallowReactive",2],{"navigation_docs":3,"-sdks-mobile-android":148,"-sdks-mobile-android-surround":4019,"sdks\u002Fandroid\u002Finstall":4022,"sdks\u002Fandroid\u002Fconfigure":4276,"sdks\u002Fandroid\u002Fsimple-usage":4498,"sdks\u002Fandroid\u002Fuser-context":4895},[4,30,138],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15,20,25],{"title":11,"path":12,"stem":13,"icon":14},"Quickstart","\u002Fgetting-started\u002Fquickstart","1.getting-started\u002F1.quickstart","i-lucide-fast-forward",{"title":16,"path":17,"stem":18,"icon":19},"Core Concepts","\u002Fgetting-started\u002Fcore-concepts","1.getting-started\u002F2.core-concepts","i-lucide-workflow",{"title":21,"path":22,"stem":23,"icon":24},"Configs Anatomy","\u002Fgetting-started\u002Fconfigs","1.getting-started\u002F3.configs","i-lucide-file-cog",{"title":26,"path":27,"stem":28,"icon":29},"Architecture","\u002Fgetting-started\u002Farchitecture","1.getting-started\u002F4.architecture","i-lucide-layers",{"title":31,"defaultOpen":32,"path":33,"stem":34,"children":35,"page":6},"SDKs",true,"\u002Fsdks","2.sdks",[36,41,67,92,108],{"title":37,"path":38,"stem":39,"icon":40},"Available SDKs","\u002Fsdks\u002Favailable-sdks","2.sdks\u002F1.available-sdks","i-lucide-list",{"title":42,"icon":43,"defaultOpen":32,"path":44,"stem":45,"children":46,"page":6},"Browser SDKs","i-lucide-monitor","\u002Fsdks\u002Fbrowser","2.sdks\u002F2.browser",[47,52,57,62],{"title":48,"path":49,"stem":50,"icon":51},"Javascript","\u002Fsdks\u002Fbrowser\u002Fjavascript","2.sdks\u002F2.browser\u002F1.javascript","cd-logos-javascript",{"title":53,"path":54,"stem":55,"icon":56},"React","\u002Fsdks\u002Fbrowser\u002Freact","2.sdks\u002F2.browser\u002F2.react","cd-logos-react-light",{"title":58,"path":59,"stem":60,"icon":61},"Vue","\u002Fsdks\u002Fbrowser\u002Fvue","2.sdks\u002F2.browser\u002F3.vue","cd-logos-vue",{"title":63,"path":64,"stem":65,"icon":66},"OpenFeature Web","\u002Fsdks\u002Fbrowser\u002Fopenfeature-web","2.sdks\u002F2.browser\u002F4.openfeature-web","cd-logos-openfeature",{"title":68,"icon":69,"defaultOpen":32,"path":70,"stem":71,"children":72,"page":6},"Mobile SDKs","i-lucide-smartphone","\u002Fsdks\u002Fmobile","2.sdks\u002F3.mobile",[73,77,82,87],{"title":74,"path":75,"stem":76,"icon":56},"React Native","\u002Fsdks\u002Fmobile\u002Freact-native","2.sdks\u002F3.mobile\u002F1.react-native",{"title":78,"path":79,"stem":80,"icon":81},"Flutter","\u002Fsdks\u002Fmobile\u002Fflutter","2.sdks\u002F3.mobile\u002F2.flutter","cd-logos-flutter",{"title":83,"path":84,"stem":85,"icon":86},"Swift","\u002Fsdks\u002Fmobile\u002Fswift","2.sdks\u002F3.mobile\u002F3.swift","cd-logos-swift",{"title":88,"path":89,"stem":90,"icon":91},"Android","\u002Fsdks\u002Fmobile\u002Fandroid","2.sdks\u002F3.mobile\u002F4.android","cd-logos-android",{"title":93,"icon":94,"defaultOpen":32,"path":95,"stem":96,"children":97,"page":6},"Meta-framework SDKs","i-lucide-monitor-smartphone","\u002Fsdks\u002Fmeta","2.sdks\u002F4.meta",[98,103],{"title":99,"path":100,"stem":101,"icon":102},"Next.js","\u002Fsdks\u002Fmeta\u002Fnextjs","2.sdks\u002F4.meta\u002F1.nextjs","cd-logos-nextjs",{"title":104,"path":105,"stem":106,"icon":107},"Nuxt","\u002Fsdks\u002Fmeta\u002Fnuxt","2.sdks\u002F4.meta\u002F2.nuxt","cd-logos-nuxt",{"title":109,"icon":110,"defaultOpen":32,"path":111,"stem":112,"children":113,"page":6},"Server SDKs","i-lucide-server","\u002Fsdks\u002Fserver","2.sdks\u002F5.server",[114,119,123,128,133],{"title":115,"path":116,"stem":117,"icon":118},"Node.js","\u002Fsdks\u002Fserver\u002Fnode-js","2.sdks\u002F5.server\u002F1.node-js","cd-logos-nodejs",{"title":120,"path":121,"stem":122,"icon":66},"OpenFeature Node.js","\u002Fsdks\u002Fserver\u002Fopenfeature-node","2.sdks\u002F5.server\u002F2.openfeature-node",{"title":124,"path":125,"stem":126,"icon":127},"Python","\u002Fsdks\u002Fserver\u002Fpython","2.sdks\u002F5.server\u002F3.python","cd-logos-python",{"title":129,"path":130,"stem":131,"icon":132},"Java","\u002Fsdks\u002Fserver\u002Fjava","2.sdks\u002F5.server\u002F4.java","cd-logos-java",{"title":134,"path":135,"stem":136,"icon":137},".NET","\u002Fsdks\u002Fserver\u002Fdotnet","2.sdks\u002F5.server\u002F5.dotnet","cd-logos-dotnet",{"title":139,"defaultOpen":32,"path":140,"stem":141,"children":142,"page":6},"Integrations","\u002Fintegrations","3.integrations",[143],{"title":144,"path":145,"stem":146,"icon":147},"Terraform","\u002Fintegrations\u002Fterraform","3.integrations\u002F1.terraform","cd-logos-terraform",{"id":149,"title":150,"body":151,"description":325,"extension":4013,"links":4014,"meta":4015,"navigation":4016,"path":89,"seo":4017,"stem":90,"__hash__":4018},"docs\u002F2.sdks\u002F3.mobile\u002F4.android.md","Android SDK",{"type":152,"value":153,"toc":3991},"minimark",[154,158,164,169,173,185,242,249,252,256,264,268,272,286,289,293,308,315,877,893,903,908,923,929,935,938,1102,1107,1125,1128,1249,1267,1270,1593,1598,1604,1729,1941,1947,1951,1973,2391,2394,2474,2484,2592,2678,2686,2690,2716,2748,2751,2754,2845,2851,2855,2877,3137,3141,3147,3154,3281,3287,3460,3469,3476,3480,3483,3669,3673,3676,3687,3704,3837,3849,3853,3856,3860,3875,3880,3907,3913,3929,3936,3954,3962,3977,3981,3984,3987],[155,156],"div",{"hidden":32,"dataTitleIcon":157},"android",[159,160],"external-badges",{"package-url":161,"registry":162,"repo":163},"https:\u002F\u002Fcentral.sonatype.com\u002Fartifact\u002Fcom.configdirector\u002Fconfigdirector-android","maven","android-sdk",[165,166,168],"h2",{"id":167},"introduction","Introduction",[170,171,172],"p",{},"The Android SDK is intended to be used by Android applications. It evaluates your configs against a user context, keeps them current as they change in the dashboard, and hands your UI values it can re-render from.",[170,174,175,176,180,181,184],{},"It is written in Kotlin and is meant to be used from Kotlin and Java alike. Every API has a form that works without coroutines, and the Kotlin conveniences — ",[177,178,179],"code",{},"suspend"," functions, ",[177,182,183],{},"Flow",", and typed extensions — sit on top of it. It ships as two artifacts:",[186,187,188,207],"table",{},[189,190,191],"thead",{},[192,193,194,198,201,204],"tr",{},[195,196,197],"th",{},"Artifact",[195,199,200],{},"Contents",[195,202,203],{},"Minimum SDK",[195,205,206],{},"Java bytecode",[208,209,210,227],"tbody",{},[192,211,212,218,221,224],{},[213,214,215],"td",{},[177,216,217],{},"com.configdirector:configdirector-android",[213,219,220],{},"The SDK",[213,222,223],{},"21",[213,225,226],{},"8",[192,228,229,234,237,239],{},[213,230,231],{},[177,232,233],{},"com.configdirector:configdirector-android-compose",[213,235,236],{},"Optional Jetpack Compose bindings",[213,238,223],{},[213,240,241],{},"11",[170,243,244,245,248],{},"The Compose artifact depends only on the Compose runtime, so it does not pull ",[177,246,247],{},"compose-ui"," or Material into an application that does not already have them.",[170,250,251],{},"Config evaluation is synchronous and reads config state the client already holds in memory, which is what makes it safe to call from a composable or from a view binding. Telemetry about those evaluations is aggregated and reported on its own coroutine, so evaluating a config never waits on the network.",[165,253,255],{"id":254},"installation","Installation",[170,257,258,259],{},"The SDK can be installed from Maven Central: ",[260,261,161],"a",{"href":161,"rel":262},[263],"nofollow",[265,266],"content-partial",{"name":267},"sdks\u002Fandroid\u002Finstall",[165,269,271],{"id":270},"configure-and-initialize-the-client","Configure and initialize the client",[273,274,275,283],"ol",{},[276,277,278,279,282],"li",{},"Create an instance of the client providing an Android context and your client SDK key. You can retrieve a client SDK key under your project settings in the ",[177,280,281],{},"Environments & SDK Keys"," tab.",[276,284,285],{},"Initialize the client to initiate its connection lifecycle.",[265,287],{"name":288},"sdks\u002Fandroid\u002Fconfigure",[290,291,292],"note",{},"Before the client is initialized, config values will evaluate to the default value provided in code.",[170,294,295,296,299,300,303,304,307],{},"The constructor throws a ",[177,297,298],{},"ConfigDirectorValidationException"," in only two cases, both of which are programming errors rather than runtime conditions: a blank client SDK key, and an option that cannot be used, such as a negative timeout or a base URL that is not absolute. Connection failures are not thrown — ",[177,301,302],{},"initialize"," returns normally whether or not config state arrived, and ",[177,305,306],{},"isReady"," tells you which happened.",[170,309,310,311,314],{},"Most applications create a single client instance and initialize it during startup. That usually means owning it in the ",[177,312,313],{},"Application",", so every screen shares one client:",[316,317,318,562],"code-group",{},[319,320,326],"pre",{"className":321,"code":322,"filename":323,"language":324,"meta":325,"style":325},"language-kotlin shiki shiki-themes material-theme-lighter github-light github-dark","import android.app.Application\nimport com.configdirector.ConfigDirectorClient\nimport com.configdirector.ConfigDirectorContext\nimport kotlinx.coroutines.MainScope\nimport kotlinx.coroutines.launch\n\nclass MyApplication : Application() {\n\n    lateinit var client: ConfigDirectorClient\n        private set\n\n    override fun onCreate() {\n        super.onCreate()\n\n        client = ConfigDirectorClient(this, \"YOUR-CLIENT-SDK-KEY\")\n\n        MainScope().launch {\n            client.initialize(ConfigDirectorContext.build { id(\"user-123\") })\n        }\n    }\n}\n","MyApplication.kt","kotlin","",[177,327,328,341,349,357,365,373,379,397,402,418,427,432,447,463,468,496,501,516,544,550,556],{"__ignoreMap":325},[329,330,333,337],"span",{"class":331,"line":332},"line",1,[329,334,336],{"class":335},"smGrS","import",[329,338,340],{"class":339},"sbgvK"," android.app.Application\n",[329,342,344,346],{"class":331,"line":343},2,[329,345,336],{"class":335},[329,347,348],{"class":339}," com.configdirector.ConfigDirectorClient\n",[329,350,352,354],{"class":331,"line":351},3,[329,353,336],{"class":335},[329,355,356],{"class":339}," com.configdirector.ConfigDirectorContext\n",[329,358,360,362],{"class":331,"line":359},4,[329,361,336],{"class":335},[329,363,364],{"class":339}," kotlinx.coroutines.MainScope\n",[329,366,368,370],{"class":331,"line":367},5,[329,369,336],{"class":335},[329,371,372],{"class":339}," kotlinx.coroutines.launch\n",[329,374,376],{"class":331,"line":375},6,[329,377,378],{"emptyLinePlaceholder":32},"\n",[329,380,382,385,388,392,394],{"class":331,"line":381},7,[329,383,384],{"class":335},"class",[329,386,387],{"class":339}," MyApplication",[329,389,391],{"class":390},"su5hD"," : ",[329,393,313],{"class":339},[329,395,396],{"class":390},"() {\n",[329,398,400],{"class":331,"line":399},8,[329,401,378],{"emptyLinePlaceholder":32},[329,403,405,409,412,415],{"class":331,"line":404},9,[329,406,408],{"class":407},"sbsja","    lateinit",[329,410,411],{"class":335}," var",[329,413,414],{"class":390}," client: ",[329,416,417],{"class":339},"ConfigDirectorClient\n",[329,419,421,424],{"class":331,"line":420},10,[329,422,423],{"class":407},"        private",[329,425,426],{"class":407}," set\n",[329,428,430],{"class":331,"line":429},11,[329,431,378],{"emptyLinePlaceholder":32},[329,433,435,438,441,445],{"class":331,"line":434},12,[329,436,437],{"class":407},"    override",[329,439,440],{"class":335}," fun",[329,442,444],{"class":443},"sGLFI"," onCreate",[329,446,396],{"class":390},[329,448,450,454,457,460],{"class":331,"line":449},13,[329,451,453],{"class":452},"s39Yj","        super",[329,455,456],{"class":390},".",[329,458,459],{"class":443},"onCreate",[329,461,462],{"class":390},"()\n",[329,464,466],{"class":331,"line":465},14,[329,467,378],{"emptyLinePlaceholder":32},[329,469,471,474,477,480,483,486,489,493],{"class":331,"line":470},15,[329,472,473],{"class":390},"        client ",[329,475,476],{"class":335},"=",[329,478,479],{"class":443}," ConfigDirectorClient",[329,481,482],{"class":390},"(",[329,484,485],{"class":452},"this",[329,487,488],{"class":390},", ",[329,490,492],{"class":491},"s_sjI","\"YOUR-CLIENT-SDK-KEY\"",[329,494,495],{"class":390},")\n",[329,497,499],{"class":331,"line":498},16,[329,500,378],{"emptyLinePlaceholder":32},[329,502,504,507,510,513],{"class":331,"line":503},17,[329,505,506],{"class":443},"        MainScope",[329,508,509],{"class":390},"().",[329,511,512],{"class":443},"launch",[329,514,515],{"class":390}," {\n",[329,517,519,522,524,527,530,533,536,538,541],{"class":331,"line":518},18,[329,520,521],{"class":390},"            client.",[329,523,302],{"class":443},[329,525,526],{"class":390},"(ConfigDirectorContext.",[329,528,529],{"class":443},"build",[329,531,532],{"class":390}," { ",[329,534,535],{"class":443},"id",[329,537,482],{"class":390},[329,539,540],{"class":491},"\"user-123\"",[329,542,543],{"class":390},") })\n",[329,545,547],{"class":331,"line":546},19,[329,548,549],{"class":390},"        }\n",[329,551,553],{"class":331,"line":552},20,[329,554,555],{"class":390},"    }\n",[329,557,559],{"class":331,"line":558},21,[329,560,561],{"class":390},"}\n",[319,563,568],{"className":564,"code":565,"filename":566,"language":567,"meta":325,"style":325},"language-java shiki shiki-themes material-theme-lighter github-light github-dark","import android.app.Application;\nimport com.configdirector.ConfigDirectorClient;\nimport com.configdirector.ConfigDirectorContext;\n\npublic class MyApplication extends Application {\n\n  private ConfigDirectorClient client;\n\n  @Override\n  public void onCreate() {\n    super.onCreate();\n\n    client = new ConfigDirectorClient(this, \"YOUR-CLIENT-SDK-KEY\");\n\n    client.initialize(\n        ConfigDirectorContext.builder().id(\"user-123\").build(),\n        () -> Log.i(\"MyApp\", \"ConfigDirector ready: \" + client.isReady()));\n  }\n\n  public ConfigDirectorClient getClient() {\n    return client;\n  }\n}\n","MyApplication.java","java",[177,569,570,592,611,628,632,650,654,666,670,678,693,706,710,743,747,759,790,836,841,845,858,867,872],{"__ignoreMap":325},[329,571,572,575,579,582,585,587,589],{"class":331,"line":332},[329,573,336],{"class":574},"sw1J6",[329,576,578],{"class":577},"s_bVq"," android",[329,580,456],{"class":581},"sP7_E",[329,583,584],{"class":577},"app",[329,586,456],{"class":581},[329,588,313],{"class":577},[329,590,591],{"class":581},";\n",[329,593,594,596,599,601,604,606,609],{"class":331,"line":343},[329,595,336],{"class":574},[329,597,598],{"class":577}," com",[329,600,456],{"class":581},[329,602,603],{"class":577},"configdirector",[329,605,456],{"class":581},[329,607,608],{"class":577},"ConfigDirectorClient",[329,610,591],{"class":581},[329,612,613,615,617,619,621,623,626],{"class":331,"line":351},[329,614,336],{"class":574},[329,616,598],{"class":577},[329,618,456],{"class":581},[329,620,603],{"class":577},[329,622,456],{"class":581},[329,624,625],{"class":577},"ConfigDirectorContext",[329,627,591],{"class":581},[329,629,630],{"class":331,"line":359},[329,631,378],{"emptyLinePlaceholder":32},[329,633,634,637,640,642,645,648],{"class":331,"line":367},[329,635,636],{"class":407},"public",[329,638,639],{"class":407}," class",[329,641,387],{"class":339},[329,643,644],{"class":407}," extends",[329,646,647],{"class":339}," Application",[329,649,515],{"class":581},[329,651,652],{"class":331,"line":375},[329,653,378],{"emptyLinePlaceholder":32},[329,655,656,659,661,664],{"class":331,"line":381},[329,657,658],{"class":407},"  private",[329,660,479],{"class":577},[329,662,663],{"class":390}," client",[329,665,591],{"class":581},[329,667,668],{"class":331,"line":399},[329,669,378],{"emptyLinePlaceholder":32},[329,671,672,675],{"class":331,"line":404},[329,673,674],{"class":581},"  @",[329,676,677],{"class":407},"Override\n",[329,679,680,683,686,688,691],{"class":331,"line":420},[329,681,682],{"class":407},"  public",[329,684,685],{"class":407}," void",[329,687,444],{"class":443},[329,689,690],{"class":581},"()",[329,692,515],{"class":581},[329,694,695,699,701,703],{"class":331,"line":429},[329,696,698],{"class":697},"s_hVV","    super",[329,700,456],{"class":581},[329,702,459],{"class":443},[329,704,705],{"class":581},"();\n",[329,707,708],{"class":331,"line":434},[329,709,378],{"emptyLinePlaceholder":32},[329,711,712,715,717,721,723,725,727,730,734,737,740],{"class":331,"line":449},[329,713,714],{"class":390},"    client ",[329,716,476],{"class":335},[329,718,720],{"class":719},"sVHd0"," new",[329,722,479],{"class":443},[329,724,482],{"class":581},[329,726,485],{"class":452},[329,728,729],{"class":581},",",[329,731,733],{"class":732},"sjJ54"," \"",[329,735,736],{"class":491},"YOUR-CLIENT-SDK-KEY",[329,738,739],{"class":732},"\"",[329,741,742],{"class":581},");\n",[329,744,745],{"class":331,"line":465},[329,746,378],{"emptyLinePlaceholder":32},[329,748,749,752,754,756],{"class":331,"line":470},[329,750,751],{"class":390},"    client",[329,753,456],{"class":581},[329,755,302],{"class":443},[329,757,758],{"class":581},"(\n",[329,760,761,764,766,769,771,773,775,777,780,782,785,787],{"class":331,"line":498},[329,762,763],{"class":390},"        ConfigDirectorContext",[329,765,456],{"class":581},[329,767,768],{"class":443},"builder",[329,770,509],{"class":581},[329,772,535],{"class":443},[329,774,482],{"class":581},[329,776,739],{"class":732},[329,778,779],{"class":491},"user-123",[329,781,739],{"class":732},[329,783,784],{"class":581},").",[329,786,529],{"class":443},[329,788,789],{"class":581},"(),\n",[329,791,792,795,798,801,803,806,808,810,813,815,817,819,822,824,827,829,831,833],{"class":331,"line":503},[329,793,794],{"class":581},"        ()",[329,796,797],{"class":407}," ->",[329,799,800],{"class":390}," Log",[329,802,456],{"class":581},[329,804,805],{"class":443},"i",[329,807,482],{"class":581},[329,809,739],{"class":732},[329,811,812],{"class":491},"MyApp",[329,814,739],{"class":732},[329,816,729],{"class":581},[329,818,733],{"class":732},[329,820,821],{"class":491},"ConfigDirector ready: ",[329,823,739],{"class":732},[329,825,826],{"class":335}," +",[329,828,663],{"class":390},[329,830,456],{"class":581},[329,832,306],{"class":443},[329,834,835],{"class":581},"()));\n",[329,837,838],{"class":331,"line":518},[329,839,840],{"class":581},"  }\n",[329,842,843],{"class":331,"line":546},[329,844,378],{"emptyLinePlaceholder":32},[329,846,847,849,851,854,856],{"class":331,"line":552},[329,848,682],{"class":407},[329,850,479],{"class":577},[329,852,853],{"class":443}," getClient",[329,855,690],{"class":581},[329,857,515],{"class":581},[329,859,860,863,865],{"class":331,"line":558},[329,861,862],{"class":719},"    return",[329,864,663],{"class":390},[329,866,591],{"class":581},[329,868,870],{"class":331,"line":869},22,[329,871,840],{"class":581},[329,873,875],{"class":331,"line":874},23,[329,876,561],{"class":581},[290,878,879,880,882,883,456],{},"The client watches the application behind the context it was given so it can release its network connection while the app is backgrounded. Pass it any context — the application behind it is what matters. If the context does not belong to an ",[177,881,313],{},", the SDK logs a warning and leaves the connection running for you to manage with ",[260,884,886,889,890],{"href":885},"#pausenetwork-and-resumenetwork",[177,887,888],{},"pauseNetwork()"," and ",[177,891,892],{},"resumeNetwork()",[170,894,895,896,902],{},"Nothing needs to close the client: it lives as long as the process, and Android reclaims everything when the process ends. Call ",[260,897,899],{"href":898},"#close",[177,900,901],{},"close()"," when an application wants the client gone before that, on sign-out for instance.",[904,905,907],"h3",{"id":906},"additional-configuration-options","Additional configuration options",[170,909,910,911,914,915,918,919,922],{},"These options can be passed in to ",[177,912,913],{},"ClientOptions",", which is built with ",[177,916,917],{},"ClientOptions.build { }"," from Kotlin and ",[177,920,921],{},"ClientOptions.builder()"," from Java. They are read once when the client is created; changing them afterwards has no effect.",[924,925,927],"h4",{"id":926},"metadata",[177,928,926],{},[170,930,931,932,934],{},"The ",[177,933,926],{}," option allows you to provide your application's name and version. These values can be used in targeting rules conditionals. For example, if a certain feature should only be enabled starting with a certain version of your application.",[170,936,937],{},"Whichever of the two you leave unset is left out of what the SDK sends, so set both if you intend to target on them.",[316,939,940,1008],{},[319,941,944],{"className":321,"code":942,"filename":943,"language":324,"meta":325,"style":325},"val client = ConfigDirectorClient(\n    applicationContext,\n    \"YOUR-CLIENT-SDK-KEY\",\n    ClientOptions.build {\n        metadata(\"YOUR-APP-NAME\", \"1.0.2\")\n    },\n)\n","ConfigDirectorSetup.kt",[177,945,946,960,965,973,982,999,1004],{"__ignoreMap":325},[329,947,948,951,954,956,958],{"class":331,"line":332},[329,949,950],{"class":335},"val",[329,952,953],{"class":390}," client ",[329,955,476],{"class":335},[329,957,479],{"class":443},[329,959,758],{"class":390},[329,961,962],{"class":331,"line":343},[329,963,964],{"class":390},"    applicationContext,\n",[329,966,967,970],{"class":331,"line":351},[329,968,969],{"class":491},"    \"YOUR-CLIENT-SDK-KEY\"",[329,971,972],{"class":390},",\n",[329,974,975,978,980],{"class":331,"line":359},[329,976,977],{"class":390},"    ClientOptions.",[329,979,529],{"class":443},[329,981,515],{"class":390},[329,983,984,987,989,992,994,997],{"class":331,"line":367},[329,985,986],{"class":443},"        metadata",[329,988,482],{"class":390},[329,990,991],{"class":491},"\"YOUR-APP-NAME\"",[329,993,488],{"class":390},[329,995,996],{"class":491},"\"1.0.2\"",[329,998,495],{"class":390},[329,1000,1001],{"class":331,"line":375},[329,1002,1003],{"class":390},"    },\n",[329,1005,1006],{"class":331,"line":381},[329,1007,495],{"class":390},[319,1009,1012],{"className":564,"code":1010,"filename":1011,"language":567,"meta":325,"style":325},"ConfigDirectorClient client = new ConfigDirectorClient(\n    getApplicationContext(),\n    \"YOUR-CLIENT-SDK-KEY\",\n    ClientOptions.builder()\n        .metadata(new Metadata(\"YOUR-APP-NAME\", \"1.0.2\"))\n        .build());\n","ConfigDirectorSetup.java",[177,1013,1014,1028,1035,1046,1057,1093],{"__ignoreMap":325},[329,1015,1016,1018,1020,1022,1024,1026],{"class":331,"line":332},[329,1017,608],{"class":577},[329,1019,953],{"class":390},[329,1021,476],{"class":335},[329,1023,720],{"class":719},[329,1025,479],{"class":443},[329,1027,758],{"class":581},[329,1029,1030,1033],{"class":331,"line":343},[329,1031,1032],{"class":443},"    getApplicationContext",[329,1034,789],{"class":581},[329,1036,1037,1040,1042,1044],{"class":331,"line":351},[329,1038,1039],{"class":732},"    \"",[329,1041,736],{"class":491},[329,1043,739],{"class":732},[329,1045,972],{"class":581},[329,1047,1048,1051,1053,1055],{"class":331,"line":359},[329,1049,1050],{"class":390},"    ClientOptions",[329,1052,456],{"class":581},[329,1054,768],{"class":443},[329,1056,462],{"class":581},[329,1058,1059,1062,1064,1066,1069,1072,1074,1076,1079,1081,1083,1085,1088,1090],{"class":331,"line":367},[329,1060,1061],{"class":581},"        .",[329,1063,926],{"class":443},[329,1065,482],{"class":581},[329,1067,1068],{"class":719},"new",[329,1070,1071],{"class":443}," Metadata",[329,1073,482],{"class":581},[329,1075,739],{"class":732},[329,1077,1078],{"class":491},"YOUR-APP-NAME",[329,1080,739],{"class":732},[329,1082,729],{"class":581},[329,1084,733],{"class":732},[329,1086,1087],{"class":491},"1.0.2",[329,1089,739],{"class":732},[329,1091,1092],{"class":581},"))\n",[329,1094,1095,1097,1099],{"class":331,"line":375},[329,1096,1061],{"class":581},[329,1098,529],{"class":443},[329,1100,1101],{"class":581},"());\n",[924,1103,1105],{"id":1104},"logger",[177,1106,1104],{},[170,1108,1109,1110,1113,1114,1116,1117,1120,1121,1124],{},"By default, the SDK logs to logcat under the ",[177,1111,1112],{},"ConfigDirector"," tag, and it is set to log warnings and errors only. You can configure a ",[177,1115,1104],{}," by either creating an ",[177,1118,1119],{},"AndroidLogger"," with a different log level, or by implementing the ",[177,1122,1123],{},"ConfigDirectorLogger"," interface to provide your own logger. The interface can be used to create an adapter to another logging library.",[170,1126,1127],{},"Configure the default logger to a different level:",[316,1129,1130,1178],{},[319,1131,1133],{"className":321,"code":1132,"filename":943,"language":324,"meta":325,"style":325},"val client = ConfigDirectorClient(\n    applicationContext,\n    \"YOUR-CLIENT-SDK-KEY\",\n    ClientOptions.build { logger(AndroidLogger(LogLevel.DEBUG)) },\n)\n",[177,1134,1135,1147,1151,1157,1174],{"__ignoreMap":325},[329,1136,1137,1139,1141,1143,1145],{"class":331,"line":332},[329,1138,950],{"class":335},[329,1140,953],{"class":390},[329,1142,476],{"class":335},[329,1144,479],{"class":443},[329,1146,758],{"class":390},[329,1148,1149],{"class":331,"line":343},[329,1150,964],{"class":390},[329,1152,1153,1155],{"class":331,"line":351},[329,1154,969],{"class":491},[329,1156,972],{"class":390},[329,1158,1159,1161,1163,1165,1167,1169,1171],{"class":331,"line":359},[329,1160,977],{"class":390},[329,1162,529],{"class":443},[329,1164,532],{"class":390},[329,1166,1104],{"class":443},[329,1168,482],{"class":390},[329,1170,1119],{"class":443},[329,1172,1173],{"class":390},"(LogLevel.DEBUG)) },\n",[329,1175,1176],{"class":331,"line":367},[329,1177,495],{"class":390},[319,1179,1181],{"className":564,"code":1180,"filename":1011,"language":567,"meta":325,"style":325},"ConfigDirectorClient client = new ConfigDirectorClient(\n    getApplicationContext(),\n    \"YOUR-CLIENT-SDK-KEY\",\n    ClientOptions.builder().logger(new AndroidLogger(LogLevel.DEBUG)).build());\n",[177,1182,1183,1197,1203,1213],{"__ignoreMap":325},[329,1184,1185,1187,1189,1191,1193,1195],{"class":331,"line":332},[329,1186,608],{"class":577},[329,1188,953],{"class":390},[329,1190,476],{"class":335},[329,1192,720],{"class":719},[329,1194,479],{"class":443},[329,1196,758],{"class":581},[329,1198,1199,1201],{"class":331,"line":343},[329,1200,1032],{"class":443},[329,1202,789],{"class":581},[329,1204,1205,1207,1209,1211],{"class":331,"line":351},[329,1206,1039],{"class":732},[329,1208,736],{"class":491},[329,1210,739],{"class":732},[329,1212,972],{"class":581},[329,1214,1215,1217,1219,1221,1223,1225,1227,1229,1232,1234,1237,1239,1242,1245,1247],{"class":331,"line":359},[329,1216,1050],{"class":390},[329,1218,456],{"class":581},[329,1220,768],{"class":443},[329,1222,509],{"class":581},[329,1224,1104],{"class":443},[329,1226,482],{"class":581},[329,1228,1068],{"class":719},[329,1230,1231],{"class":443}," AndroidLogger",[329,1233,482],{"class":581},[329,1235,1236],{"class":390},"LogLevel",[329,1238,456],{"class":581},[329,1240,1241],{"class":390},"DEBUG",[329,1243,1244],{"class":581},")).",[329,1246,529],{"class":443},[329,1248,1101],{"class":581},[170,1250,1251,1252,488,1255,488,1258,1261,1262,889,1265,456],{},"The available levels are ",[177,1253,1254],{},"OFF",[177,1256,1257],{},"ERROR",[177,1259,1260],{},"WARN"," (the default), ",[177,1263,1264],{},"INFO",[177,1266,1241],{},[170,1268,1269],{},"Implement your own logger adapter:",[316,1271,1272,1427],{},[319,1273,1276],{"className":321,"code":1274,"filename":1275,"language":324,"meta":325,"style":325},"import com.configdirector.ConfigDirectorLogger\nimport com.configdirector.LogLevel\n\nclass MyLogger : ConfigDirectorLogger {\n    \u002F\u002F Messages more verbose than this level are never passed to `log`.\n    override val level: LogLevel = LogLevel.INFO\n\n    override fun log(level: LogLevel, message: String, error: Throwable?) {\n        \u002F\u002F your specific logging library implementation here\n    }\n}\n\nval client = ConfigDirectorClient(\n    applicationContext,\n    \"YOUR-CLIENT-SDK-KEY\",\n    ClientOptions.build { logger(MyLogger()) },\n)\n","MyLogger.kt",[177,1277,1278,1285,1292,1296,1309,1315,1333,1337,1366,1371,1375,1379,1383,1395,1399,1405,1423],{"__ignoreMap":325},[329,1279,1280,1282],{"class":331,"line":332},[329,1281,336],{"class":335},[329,1283,1284],{"class":339}," com.configdirector.ConfigDirectorLogger\n",[329,1286,1287,1289],{"class":331,"line":343},[329,1288,336],{"class":335},[329,1290,1291],{"class":339}," com.configdirector.LogLevel\n",[329,1293,1294],{"class":331,"line":351},[329,1295,378],{"emptyLinePlaceholder":32},[329,1297,1298,1300,1303,1305,1307],{"class":331,"line":359},[329,1299,384],{"class":335},[329,1301,1302],{"class":339}," MyLogger",[329,1304,391],{"class":390},[329,1306,1123],{"class":339},[329,1308,515],{"class":390},[329,1310,1311],{"class":331,"line":367},[329,1312,1314],{"class":1313},"sutJx","    \u002F\u002F Messages more verbose than this level are never passed to `log`.\n",[329,1316,1317,1319,1322,1325,1327,1330],{"class":331,"line":375},[329,1318,437],{"class":407},[329,1320,1321],{"class":335}," val",[329,1323,1324],{"class":390}," level: ",[329,1326,1236],{"class":339},[329,1328,1329],{"class":335}," =",[329,1331,1332],{"class":390}," LogLevel.INFO\n",[329,1334,1335],{"class":331,"line":381},[329,1336,378],{"emptyLinePlaceholder":32},[329,1338,1339,1341,1343,1346,1349,1351,1354,1357,1360,1363],{"class":331,"line":399},[329,1340,437],{"class":407},[329,1342,440],{"class":335},[329,1344,1345],{"class":443}," log",[329,1347,1348],{"class":390},"(level: ",[329,1350,1236],{"class":339},[329,1352,1353],{"class":390},", message: ",[329,1355,1356],{"class":339},"String",[329,1358,1359],{"class":390},", error: ",[329,1361,1362],{"class":339},"Throwable",[329,1364,1365],{"class":390},"?) {\n",[329,1367,1368],{"class":331,"line":404},[329,1369,1370],{"class":1313},"        \u002F\u002F your specific logging library implementation here\n",[329,1372,1373],{"class":331,"line":420},[329,1374,555],{"class":390},[329,1376,1377],{"class":331,"line":429},[329,1378,561],{"class":390},[329,1380,1381],{"class":331,"line":434},[329,1382,378],{"emptyLinePlaceholder":32},[329,1384,1385,1387,1389,1391,1393],{"class":331,"line":449},[329,1386,950],{"class":335},[329,1388,953],{"class":390},[329,1390,476],{"class":335},[329,1392,479],{"class":443},[329,1394,758],{"class":390},[329,1396,1397],{"class":331,"line":465},[329,1398,964],{"class":390},[329,1400,1401,1403],{"class":331,"line":470},[329,1402,969],{"class":491},[329,1404,972],{"class":390},[329,1406,1407,1409,1411,1413,1415,1417,1420],{"class":331,"line":498},[329,1408,977],{"class":390},[329,1410,529],{"class":443},[329,1412,532],{"class":390},[329,1414,1104],{"class":443},[329,1416,482],{"class":390},[329,1418,1419],{"class":443},"MyLogger",[329,1421,1422],{"class":390},"()) },\n",[329,1424,1425],{"class":331,"line":503},[329,1426,495],{"class":390},[319,1428,1431],{"className":564,"code":1429,"filename":1430,"language":567,"meta":325,"style":325},"import com.configdirector.ConfigDirectorLogger;\nimport com.configdirector.LogLevel;\n\npublic final class MyLogger implements ConfigDirectorLogger {\n\n  \u002F\u002F Messages more verbose than this level are never passed to `log`.\n  @Override\n  public LogLevel getLevel() {\n    return LogLevel.INFO;\n  }\n\n  @Override\n  public void log(LogLevel level, String message, Throwable error) {\n    \u002F\u002F your specific logging library implementation here\n  }\n}\n","MyLogger.java",[177,1432,1433,1449,1465,1469,1488,1492,1497,1503,1517,1529,1533,1537,1543,1580,1585,1589],{"__ignoreMap":325},[329,1434,1435,1437,1439,1441,1443,1445,1447],{"class":331,"line":332},[329,1436,336],{"class":574},[329,1438,598],{"class":577},[329,1440,456],{"class":581},[329,1442,603],{"class":577},[329,1444,456],{"class":581},[329,1446,1123],{"class":577},[329,1448,591],{"class":581},[329,1450,1451,1453,1455,1457,1459,1461,1463],{"class":331,"line":343},[329,1452,336],{"class":574},[329,1454,598],{"class":577},[329,1456,456],{"class":581},[329,1458,603],{"class":577},[329,1460,456],{"class":581},[329,1462,1236],{"class":577},[329,1464,591],{"class":581},[329,1466,1467],{"class":331,"line":351},[329,1468,378],{"emptyLinePlaceholder":32},[329,1470,1471,1473,1476,1478,1480,1483,1486],{"class":331,"line":359},[329,1472,636],{"class":407},[329,1474,1475],{"class":407}," final",[329,1477,639],{"class":407},[329,1479,1302],{"class":339},[329,1481,1482],{"class":407}," implements",[329,1484,1485],{"class":339}," ConfigDirectorLogger",[329,1487,515],{"class":581},[329,1489,1490],{"class":331,"line":367},[329,1491,378],{"emptyLinePlaceholder":32},[329,1493,1494],{"class":331,"line":375},[329,1495,1496],{"class":1313},"  \u002F\u002F Messages more verbose than this level are never passed to `log`.\n",[329,1498,1499,1501],{"class":331,"line":381},[329,1500,674],{"class":581},[329,1502,677],{"class":407},[329,1504,1505,1507,1510,1513,1515],{"class":331,"line":399},[329,1506,682],{"class":407},[329,1508,1509],{"class":577}," LogLevel",[329,1511,1512],{"class":443}," getLevel",[329,1514,690],{"class":581},[329,1516,515],{"class":581},[329,1518,1519,1521,1523,1525,1527],{"class":331,"line":404},[329,1520,862],{"class":719},[329,1522,1509],{"class":390},[329,1524,456],{"class":581},[329,1526,1264],{"class":390},[329,1528,591],{"class":581},[329,1530,1531],{"class":331,"line":420},[329,1532,840],{"class":581},[329,1534,1535],{"class":331,"line":429},[329,1536,378],{"emptyLinePlaceholder":32},[329,1538,1539,1541],{"class":331,"line":434},[329,1540,674],{"class":581},[329,1542,677],{"class":407},[329,1544,1545,1547,1549,1551,1553,1555,1559,1561,1564,1567,1569,1572,1575,1578],{"class":331,"line":449},[329,1546,682],{"class":407},[329,1548,685],{"class":407},[329,1550,1345],{"class":443},[329,1552,482],{"class":581},[329,1554,1236],{"class":577},[329,1556,1558],{"class":1557},"s99_P"," level",[329,1560,729],{"class":581},[329,1562,1563],{"class":577}," String",[329,1565,1566],{"class":1557}," message",[329,1568,729],{"class":581},[329,1570,1571],{"class":577}," Throwable",[329,1573,1574],{"class":1557}," error",[329,1576,1577],{"class":581},")",[329,1579,515],{"class":581},[329,1581,1582],{"class":331,"line":465},[329,1583,1584],{"class":1313},"    \u002F\u002F your specific logging library implementation here\n",[329,1586,1587],{"class":331,"line":470},[329,1588,840],{"class":581},[329,1590,1591],{"class":331,"line":498},[329,1592,561],{"class":581},[924,1594,1596],{"id":1595},"connection",[177,1597,1595],{},[170,1599,1600,1603],{},[177,1601,1602],{},"ConnectionOptions"," accepts five optional values:",[1605,1606,1607,1643,1665,1693,1716],"ul",{},[276,1608,1609,1612],{},[177,1610,1611],{},"mode",[1605,1613,1614,1633,1638],{},[276,1615,1616,1617,1620,1621,1624,1625,1628,1629,1632],{},"The connection mode, which can be ",[177,1618,1619],{},"ConnectionMode.STREAMING"," or ",[177,1622,1623],{},"ConnectionMode.POLLING",". It is recommended to use the default of ",[177,1626,1627],{},"STREAMING"," unless you have a specific need to use ",[177,1630,1631],{},"POLLING"," instead.",[276,1634,1635,1637],{},[177,1636,1627],{}," holds a connection open and receives changes as they happen, reconnecting on its own with a backoff.",[276,1639,1640,1641],{},"Defaults to ",[177,1642,1619],{},[276,1644,1645,1648],{},[177,1646,1647],{},"pollingIntervalMillis",[1605,1649,1650,1659],{},[276,1651,1652,1653,1655,1656,1658],{},"How often to re-fetch config state when ",[177,1654,1611],{}," is ",[177,1657,1623],{},". It has no effect in any other mode. It must be positive.",[276,1660,1640,1661,1664],{},[177,1662,1663],{},"60_000"," (60 seconds)",[276,1666,1667,1670],{},[177,1668,1669],{},"timeoutMillis",[1605,1671,1672,1681,1687],{},[276,1673,1674,1675,1677,1678,1680],{},"The timeout to be used in initialization and when updating the context. This is how long ",[177,1676,302],{}," will wait for data from ConfigDirector services before returning. If the timeout is reached, ",[177,1679,302],{}," will return but the client will still be in an unready status and returning default values. The client will continue to attempt to connect and retrieve config values in the background.",[276,1682,1683,1684,1686],{},"If your application is used in environments where the users frequently have poor or no connection, you may want to use a lower timeout, or simply don't await the ",[177,1685,302],{}," call.",[276,1688,1640,1689,1692],{},[177,1690,1691],{},"3_000"," (3 seconds)",[276,1694,1695,1698],{},[177,1696,1697],{},"pausesWhileBackgrounded",[1605,1699,1700,1711],{},[276,1701,1702,1703,1706,1707,889,1709,456],{},"Whether to pause the connection while the app is in the background and resume it when the app returns to the foreground. Android stops background connections on its own, so this is enabled by default. Set it to ",[177,1704,1705],{},"false"," to manage the connection yourself with ",[177,1708,888],{},[177,1710,892],{},[276,1712,1640,1713],{},[177,1714,1715],{},"true",[276,1717,1718,1721],{},[177,1719,1720],{},"baseUrl",[1605,1722,1723,1726],{},[276,1724,1725],{},"The base URL used to connect to ConfigDirector services.",[276,1727,1728],{},"This should only be provided if your environment requires you to configure a proxy server in order to connect to ConfigDirector services.",[316,1730,1731,1818],{},[319,1732,1734],{"className":321,"code":1733,"filename":943,"language":324,"meta":325,"style":325},"val client = ConfigDirectorClient(\n    applicationContext,\n    \"YOUR-CLIENT-SDK-KEY\",\n    ClientOptions.build {\n        connection {\n            mode(ConnectionMode.POLLING)\n            pollingIntervalMillis(600_000L)\n            timeoutMillis(2_000L)\n        }\n    },\n)\n",[177,1735,1736,1748,1752,1758,1766,1773,1781,1794,1806,1810,1814],{"__ignoreMap":325},[329,1737,1738,1740,1742,1744,1746],{"class":331,"line":332},[329,1739,950],{"class":335},[329,1741,953],{"class":390},[329,1743,476],{"class":335},[329,1745,479],{"class":443},[329,1747,758],{"class":390},[329,1749,1750],{"class":331,"line":343},[329,1751,964],{"class":390},[329,1753,1754,1756],{"class":331,"line":351},[329,1755,969],{"class":491},[329,1757,972],{"class":390},[329,1759,1760,1762,1764],{"class":331,"line":359},[329,1761,977],{"class":390},[329,1763,529],{"class":443},[329,1765,515],{"class":390},[329,1767,1768,1771],{"class":331,"line":367},[329,1769,1770],{"class":443},"        connection",[329,1772,515],{"class":390},[329,1774,1775,1778],{"class":331,"line":375},[329,1776,1777],{"class":443},"            mode",[329,1779,1780],{"class":390},"(ConnectionMode.POLLING)\n",[329,1782,1783,1786,1788,1792],{"class":331,"line":381},[329,1784,1785],{"class":443},"            pollingIntervalMillis",[329,1787,482],{"class":390},[329,1789,1791],{"class":1790},"srdBf","600_000L",[329,1793,495],{"class":390},[329,1795,1796,1799,1801,1804],{"class":331,"line":399},[329,1797,1798],{"class":443},"            timeoutMillis",[329,1800,482],{"class":390},[329,1802,1803],{"class":1790},"2_000L",[329,1805,495],{"class":390},[329,1807,1808],{"class":331,"line":404},[329,1809,549],{"class":390},[329,1811,1812],{"class":331,"line":420},[329,1813,1003],{"class":390},[329,1815,1816],{"class":331,"line":429},[329,1817,495],{"class":390},[319,1819,1821],{"className":564,"code":1820,"filename":1011,"language":567,"meta":325,"style":325},"ConfigDirectorClient client = new ConfigDirectorClient(\n    getApplicationContext(),\n    \"YOUR-CLIENT-SDK-KEY\",\n    ClientOptions.builder()\n        .connection(\n            ConnectionOptions.builder()\n                .mode(ConnectionMode.POLLING)\n                .pollingIntervalMillis(600_000L)\n                .timeoutMillis(2_000L)\n                .build())\n        .build());\n",[177,1822,1823,1837,1843,1853,1863,1871,1882,1900,1912,1924,1933],{"__ignoreMap":325},[329,1824,1825,1827,1829,1831,1833,1835],{"class":331,"line":332},[329,1826,608],{"class":577},[329,1828,953],{"class":390},[329,1830,476],{"class":335},[329,1832,720],{"class":719},[329,1834,479],{"class":443},[329,1836,758],{"class":581},[329,1838,1839,1841],{"class":331,"line":343},[329,1840,1032],{"class":443},[329,1842,789],{"class":581},[329,1844,1845,1847,1849,1851],{"class":331,"line":351},[329,1846,1039],{"class":732},[329,1848,736],{"class":491},[329,1850,739],{"class":732},[329,1852,972],{"class":581},[329,1854,1855,1857,1859,1861],{"class":331,"line":359},[329,1856,1050],{"class":390},[329,1858,456],{"class":581},[329,1860,768],{"class":443},[329,1862,462],{"class":581},[329,1864,1865,1867,1869],{"class":331,"line":367},[329,1866,1061],{"class":581},[329,1868,1595],{"class":443},[329,1870,758],{"class":581},[329,1872,1873,1876,1878,1880],{"class":331,"line":375},[329,1874,1875],{"class":390},"            ConnectionOptions",[329,1877,456],{"class":581},[329,1879,768],{"class":443},[329,1881,462],{"class":581},[329,1883,1884,1887,1889,1891,1894,1896,1898],{"class":331,"line":381},[329,1885,1886],{"class":581},"                .",[329,1888,1611],{"class":443},[329,1890,482],{"class":581},[329,1892,1893],{"class":390},"ConnectionMode",[329,1895,456],{"class":581},[329,1897,1631],{"class":390},[329,1899,495],{"class":581},[329,1901,1902,1904,1906,1908,1910],{"class":331,"line":399},[329,1903,1886],{"class":581},[329,1905,1647],{"class":443},[329,1907,482],{"class":581},[329,1909,1791],{"class":1790},[329,1911,495],{"class":581},[329,1913,1914,1916,1918,1920,1922],{"class":331,"line":404},[329,1915,1886],{"class":581},[329,1917,1669],{"class":443},[329,1919,482],{"class":581},[329,1921,1803],{"class":1790},[329,1923,495],{"class":581},[329,1925,1926,1928,1930],{"class":331,"line":420},[329,1927,1886],{"class":581},[329,1929,529],{"class":443},[329,1931,1932],{"class":581},"())\n",[329,1934,1935,1937,1939],{"class":331,"line":429},[329,1936,1061],{"class":581},[329,1938,529],{"class":443},[329,1940,1101],{"class":581},[170,1942,1943,1944,1946],{},"Settings are checked as they are built, so an unusable one throws a ",[177,1945,298],{}," where it was written rather than becoming a client that quietly never updates.",[904,1948,1950],{"id":1949},"events","Events",[170,1952,1953,1954,1957,1958,1961,1962,1965,1966,889,1969,1972],{},"Events notify you of some key actions from the client. ",[177,1955,1956],{},"addEventListener"," registers a listener for the client's lifecycle changes, and ",[177,1959,1960],{},"addEvaluationListener"," registers one for every individual config evaluation. Both are called on the main thread, and both return a ",[177,1963,1964],{},"Subscription"," you close to stop listening. Kotlin callers have the same two as flows, ",[177,1967,1968],{},"client.events",[177,1970,1971],{},"client.evaluations","; each collection is independent, so several parts of your app can observe them at once, and every flow completes when the client is closed.",[316,1974,1975,2147],{},[319,1976,1978],{"className":321,"code":1977,"filename":943,"language":324,"meta":325,"style":325},"import com.configdirector.ClientEvent\nimport com.configdirector.events\n\nlifecycleScope.launch {\n    client.events.collect { event ->\n        when (event) {\n            is ClientEvent.Ready -> Log.i(\"MyApp\", \"Client is ready after ${event.reason}\")\n            is ClientEvent.ConfigsUpdated -> Log.i(\"MyApp\", \"Configs updated: ${event.keys}\")\n            is ClientEvent.ContextUpdated -> Log.i(\"MyApp\", \"Context updated: ${event.context?.id}\")\n        }\n    }\n}\n",[177,1979,1980,1987,1994,1998,2007,2021,2029,2069,2102,2135,2139,2143],{"__ignoreMap":325},[329,1981,1982,1984],{"class":331,"line":332},[329,1983,336],{"class":335},[329,1985,1986],{"class":339}," com.configdirector.ClientEvent\n",[329,1988,1989,1991],{"class":331,"line":343},[329,1990,336],{"class":335},[329,1992,1993],{"class":339}," com.configdirector.events\n",[329,1995,1996],{"class":331,"line":351},[329,1997,378],{"emptyLinePlaceholder":32},[329,1999,2000,2003,2005],{"class":331,"line":359},[329,2001,2002],{"class":390},"lifecycleScope.",[329,2004,512],{"class":443},[329,2006,515],{"class":390},[329,2008,2009,2012,2015,2018],{"class":331,"line":367},[329,2010,2011],{"class":390},"    client.events.",[329,2013,2014],{"class":443},"collect",[329,2016,2017],{"class":390}," { event ",[329,2019,2020],{"class":407},"->\n",[329,2022,2023,2026],{"class":331,"line":375},[329,2024,2025],{"class":719},"        when",[329,2027,2028],{"class":390}," (event) {\n",[329,2030,2031,2034,2037,2040,2043,2045,2047,2050,2052,2055,2058,2062,2065,2067],{"class":331,"line":381},[329,2032,2033],{"class":335},"            is",[329,2035,2036],{"class":390}," ClientEvent.Ready ",[329,2038,2039],{"class":407},"->",[329,2041,2042],{"class":390}," Log.",[329,2044,805],{"class":443},[329,2046,482],{"class":390},[329,2048,2049],{"class":491},"\"MyApp\"",[329,2051,488],{"class":390},[329,2053,2054],{"class":491},"\"Client is ready after ",[329,2056,2057],{"class":732},"${",[329,2059,2061],{"class":2060},"sfo-9","event.reason",[329,2063,2064],{"class":732},"}",[329,2066,739],{"class":491},[329,2068,495],{"class":390},[329,2070,2071,2073,2076,2078,2080,2082,2084,2086,2088,2091,2093,2096,2098,2100],{"class":331,"line":399},[329,2072,2033],{"class":335},[329,2074,2075],{"class":390}," ClientEvent.ConfigsUpdated ",[329,2077,2039],{"class":407},[329,2079,2042],{"class":390},[329,2081,805],{"class":443},[329,2083,482],{"class":390},[329,2085,2049],{"class":491},[329,2087,488],{"class":390},[329,2089,2090],{"class":491},"\"Configs updated: ",[329,2092,2057],{"class":732},[329,2094,2095],{"class":2060},"event.keys",[329,2097,2064],{"class":732},[329,2099,739],{"class":491},[329,2101,495],{"class":390},[329,2103,2104,2106,2109,2111,2113,2115,2117,2119,2121,2124,2126,2129,2131,2133],{"class":331,"line":404},[329,2105,2033],{"class":335},[329,2107,2108],{"class":390}," ClientEvent.ContextUpdated ",[329,2110,2039],{"class":407},[329,2112,2042],{"class":390},[329,2114,805],{"class":443},[329,2116,482],{"class":390},[329,2118,2049],{"class":491},[329,2120,488],{"class":390},[329,2122,2123],{"class":491},"\"Context updated: ",[329,2125,2057],{"class":732},[329,2127,2128],{"class":2060},"event.context?.id",[329,2130,2064],{"class":732},[329,2132,739],{"class":491},[329,2134,495],{"class":390},[329,2136,2137],{"class":331,"line":420},[329,2138,549],{"class":390},[329,2140,2141],{"class":331,"line":429},[329,2142,555],{"class":390},[329,2144,2145],{"class":331,"line":434},[329,2146,561],{"class":390},[319,2148,2150],{"className":564,"code":2149,"filename":1011,"language":567,"meta":325,"style":325},"import com.configdirector.ClientEvent;\nimport com.configdirector.Subscription;\n\nSubscription subscription = client.addEventListener(event -> {\n  if (event instanceof ClientEvent.Ready) {\n    Log.i(\"MyApp\", \"Client is ready after \" + ((ClientEvent.Ready) event).getReason());\n  } else if (event instanceof ClientEvent.ConfigsUpdated) {\n    Log.i(\"MyApp\", \"Configs updated: \" + ((ClientEvent.ConfigsUpdated) event).getKeys());\n  }\n});\n\n\u002F\u002F Close the subscription to stop listening\nsubscription.close();\n",[177,2151,2152,2169,2185,2189,2213,2238,2287,2315,2361,2365,2370,2374,2379],{"__ignoreMap":325},[329,2153,2154,2156,2158,2160,2162,2164,2167],{"class":331,"line":332},[329,2155,336],{"class":574},[329,2157,598],{"class":577},[329,2159,456],{"class":581},[329,2161,603],{"class":577},[329,2163,456],{"class":581},[329,2165,2166],{"class":577},"ClientEvent",[329,2168,591],{"class":581},[329,2170,2171,2173,2175,2177,2179,2181,2183],{"class":331,"line":343},[329,2172,336],{"class":574},[329,2174,598],{"class":577},[329,2176,456],{"class":581},[329,2178,603],{"class":577},[329,2180,456],{"class":581},[329,2182,1964],{"class":577},[329,2184,591],{"class":581},[329,2186,2187],{"class":331,"line":351},[329,2188,378],{"emptyLinePlaceholder":32},[329,2190,2191,2193,2196,2198,2200,2202,2204,2206,2209,2211],{"class":331,"line":359},[329,2192,1964],{"class":577},[329,2194,2195],{"class":390}," subscription ",[329,2197,476],{"class":335},[329,2199,663],{"class":390},[329,2201,456],{"class":581},[329,2203,1956],{"class":443},[329,2205,482],{"class":581},[329,2207,2208],{"class":390},"event ",[329,2210,2039],{"class":407},[329,2212,515],{"class":581},[329,2214,2215,2218,2221,2223,2226,2229,2231,2234,2236],{"class":331,"line":367},[329,2216,2217],{"class":719},"  if",[329,2219,2220],{"class":581}," (",[329,2222,2208],{"class":390},[329,2224,2225],{"class":335},"instanceof",[329,2227,2228],{"class":390}," ClientEvent",[329,2230,456],{"class":581},[329,2232,2233],{"class":390},"Ready",[329,2235,1577],{"class":581},[329,2237,515],{"class":581},[329,2239,2240,2243,2245,2247,2249,2251,2253,2255,2257,2259,2262,2264,2266,2269,2271,2273,2275,2277,2280,2282,2285],{"class":331,"line":375},[329,2241,2242],{"class":390},"    Log",[329,2244,456],{"class":581},[329,2246,805],{"class":443},[329,2248,482],{"class":581},[329,2250,739],{"class":732},[329,2252,812],{"class":491},[329,2254,739],{"class":732},[329,2256,729],{"class":581},[329,2258,733],{"class":732},[329,2260,2261],{"class":491},"Client is ready after ",[329,2263,739],{"class":732},[329,2265,826],{"class":335},[329,2267,2268],{"class":581}," ((",[329,2270,2166],{"class":390},[329,2272,456],{"class":581},[329,2274,2233],{"class":390},[329,2276,1577],{"class":581},[329,2278,2279],{"class":390}," event",[329,2281,784],{"class":581},[329,2283,2284],{"class":443},"getReason",[329,2286,1101],{"class":581},[329,2288,2289,2292,2295,2298,2300,2302,2304,2306,2308,2311,2313],{"class":331,"line":381},[329,2290,2291],{"class":581},"  }",[329,2293,2294],{"class":719}," else",[329,2296,2297],{"class":719}," if",[329,2299,2220],{"class":581},[329,2301,2208],{"class":390},[329,2303,2225],{"class":335},[329,2305,2228],{"class":390},[329,2307,456],{"class":581},[329,2309,2310],{"class":390},"ConfigsUpdated",[329,2312,1577],{"class":581},[329,2314,515],{"class":581},[329,2316,2317,2319,2321,2323,2325,2327,2329,2331,2333,2335,2338,2340,2342,2344,2346,2348,2350,2352,2354,2356,2359],{"class":331,"line":399},[329,2318,2242],{"class":390},[329,2320,456],{"class":581},[329,2322,805],{"class":443},[329,2324,482],{"class":581},[329,2326,739],{"class":732},[329,2328,812],{"class":491},[329,2330,739],{"class":732},[329,2332,729],{"class":581},[329,2334,733],{"class":732},[329,2336,2337],{"class":491},"Configs updated: ",[329,2339,739],{"class":732},[329,2341,826],{"class":335},[329,2343,2268],{"class":581},[329,2345,2166],{"class":390},[329,2347,456],{"class":581},[329,2349,2310],{"class":390},[329,2351,1577],{"class":581},[329,2353,2279],{"class":390},[329,2355,784],{"class":581},[329,2357,2358],{"class":443},"getKeys",[329,2360,1101],{"class":581},[329,2362,2363],{"class":331,"line":404},[329,2364,840],{"class":581},[329,2366,2367],{"class":331,"line":420},[329,2368,2369],{"class":581},"});\n",[329,2371,2372],{"class":331,"line":429},[329,2373,378],{"emptyLinePlaceholder":32},[329,2375,2376],{"class":331,"line":434},[329,2377,2378],{"class":1313},"\u002F\u002F Close the subscription to stop listening\n",[329,2380,2381,2384,2386,2389],{"class":331,"line":449},[329,2382,2383],{"class":390},"subscription",[329,2385,456],{"class":581},[329,2387,2388],{"class":443},"close",[329,2390,705],{"class":581},[170,2392,2393],{},"The following events are published to an event listener:",[1605,2395,2396,2428,2448],{},[276,2397,2398,2403],{},[177,2399,2402],{"className":2400},[2401],"font-semibold","ClientEvent.Ready",[1605,2404,2405,2408],{},[276,2406,2407],{},"Emitted when the client is initialized, or after reconnection due to a context update or a resumed network connection. When this event is emitted it means the client has received a payload from the ConfigDirector servers and is ready to evaluate configs.",[276,2409,2410,2413,2414,2417,2418,488,2421,2424,2425,456],{},[177,2411,2412],{},"reason"," - A ",[177,2415,2416],{},"ConnectReason",", the action that triggered the client to connect\u002Freconnect, which can be ",[177,2419,2420],{},"ConnectReason.INITIALIZATION",[177,2422,2423],{},"ConnectReason.CONTEXT_UPDATE",", or ",[177,2426,2427],{},"ConnectReason.NETWORK_RESUME",[276,2429,2430,2434],{},[177,2431,2433],{"className":2432},[2401],"ClientEvent.ConfigsUpdated",[1605,2435,2436,2439],{},[276,2437,2438],{},"Emitted when a payload is received from the ConfigDirector servers with config data. It is emitted during initialization or context update when an entire config payload is received. After initialization or context update, it is emitted when updates are pushed from the server (or discovered via polling if that connection mode is used).",[276,2440,2441,2413,2444,2447],{},[177,2442,2443],{},"keys",[177,2445,2446],{},"List\u003CString>"," listing the config keys that were included in the payload from the server. On a delta update, these are only the configs that changed.",[276,2449,2450,2454],{},[177,2451,2453],{"className":2452},[2401],"ClientEvent.ContextUpdated",[1605,2455,2456,2462],{},[276,2457,2458,2459,2461],{},"Emitted whenever the user context takes effect, including during initialization. It is emitted before ",[177,2460,2402],{},", therefore should not be relied upon as a lifecycle event but rather as an informational event to track updates to the user context.",[276,2463,2464,2467,2468,2470,2471,456],{},[177,2465,2466],{},"context"," - The ",[177,2469,625],{}," the client is now evaluating against. It can be ",[177,2472,2473],{},"null",[170,2475,2476,2477,2480,2481,2483],{},"An evaluation listener is handed a ",[177,2478,2479],{},"ConfigEvaluation"," every time a config is evaluated, which can be useful for debugging what a screen actually read, and for capturing additional context for analytics events. This includes every read through a getter and every re-evaluation a watch makes. A ",[177,2482,2479],{}," carries:",[1605,2485,2486,2492,2510,2523,2529,2535],{},[276,2487,2488,2491],{},[177,2489,2490],{},"key: String"," - The config key that was evaluated.",[276,2493,2494,2497,2498,488,2501,488,2503,1620,2506,2509],{},[177,2495,2496],{},"value: Any"," - The value the config evaluated to. It can be the default value provided by the caller, for example if the config was evaluated before the client was initialized. It is a ",[177,2499,2500],{},"Boolean",[177,2502,1356],{},[177,2504,2505],{},"Integer",[177,2507,2508],{},"Double",", matching the accessor the config was read with.",[276,2511,2512,2515,2516,2519,2520,2522],{},[177,2513,2514],{},"valueId: String?"," - The value ID, which is a stable hash of the value that can be used for analytics or other third parties rather than sending the ",[177,2517,2518],{},"value",". This can be useful for large values, like a JSON config, or to avoid disclosing the values themselves to third parties. It is ",[177,2521,2473],{}," if the evaluation had to fall back to the default value.",[276,2524,2525,2528],{},[177,2526,2527],{},"isDefaultValue: Boolean"," - Whether or not the evaluation fell back to the default value provided in code.",[276,2530,2531,2534],{},[177,2532,2533],{},"context: ConfigDirectorContext?"," - The context the config was evaluated against, if one was set.",[276,2536,2537,2540,2541,2544,2545,2547,2548],{},[177,2538,2539],{},"reason: EvaluationReason"," - The reason for the evaluation resolution. In the case the config successfully evaluated based on server-provided targeting rules, it will be ",[177,2542,2543],{},"FOUND_MATCH",". If the evaluation had to fall back to the default value, the ",[177,2546,2412],{}," will encode why the fallback was required:\n",[1605,2549,2550,2556,2562,2568,2574,2580,2586],{},[276,2551,2552,2555],{},[177,2553,2554],{},"CLIENT_NOT_READY"," - The evaluation happened before the client finished initialization.",[276,2557,2558,2561],{},[177,2559,2560],{},"CONFIG_STATE_MISSING"," - The requested config key was not present in the payload received from the server. This could be due to an incorrect config key, or a config that was not enabled to be available to client SDKs.",[276,2563,2564,2567],{},[177,2565,2566],{},"VALUE_MISSING"," - The config had no value for the current context.",[276,2569,2570,2573],{},[177,2571,2572],{},"INVALID_NUMBER"," - The config was requested as a number but the value received from the server could not be converted to a number.",[276,2575,2576,2579],{},[177,2577,2578],{},"INVALID_BOOLEAN"," - The config was requested as a boolean but the value received from the server could not be converted to a boolean.",[276,2581,2582,2585],{},[177,2583,2584],{},"INVALID_JSON"," - The config was requested as JSON but the value received from the server could not be read as a JSON document.",[276,2587,2588,2591],{},[177,2589,2590],{},"TYPE_MISMATCH"," - The config was requested with a data type that did not match the type of the config and no reasonable type conversion was possible.",[319,2593,2595],{"className":321,"code":2594,"filename":943,"language":324,"meta":325,"style":325},"import com.configdirector.evaluations\n\nlifecycleScope.launch {\n    client.evaluations\n        .filter { it.isDefaultValue }\n        .collect { Log.w(\"MyApp\", \"'${it.key}' fell back to its default: ${it.reason.wireName}\") }\n}\n",[177,2596,2597,2604,2608,2616,2621,2631,2674],{"__ignoreMap":325},[329,2598,2599,2601],{"class":331,"line":332},[329,2600,336],{"class":335},[329,2602,2603],{"class":339}," com.configdirector.evaluations\n",[329,2605,2606],{"class":331,"line":343},[329,2607,378],{"emptyLinePlaceholder":32},[329,2609,2610,2612,2614],{"class":331,"line":351},[329,2611,2002],{"class":390},[329,2613,512],{"class":443},[329,2615,515],{"class":390},[329,2617,2618],{"class":331,"line":359},[329,2619,2620],{"class":390},"    client.evaluations\n",[329,2622,2623,2625,2628],{"class":331,"line":367},[329,2624,1061],{"class":390},[329,2626,2627],{"class":443},"filter",[329,2629,2630],{"class":390}," { it.isDefaultValue }\n",[329,2632,2633,2635,2637,2640,2643,2645,2647,2649,2652,2654,2657,2659,2662,2664,2667,2669,2671],{"class":331,"line":375},[329,2634,1061],{"class":390},[329,2636,2014],{"class":443},[329,2638,2639],{"class":390}," { Log.",[329,2641,2642],{"class":443},"w",[329,2644,482],{"class":390},[329,2646,2049],{"class":491},[329,2648,488],{"class":390},[329,2650,2651],{"class":491},"\"'",[329,2653,2057],{"class":732},[329,2655,2656],{"class":2060},"it.key",[329,2658,2064],{"class":732},[329,2660,2661],{"class":491},"' fell back to its default: ",[329,2663,2057],{"class":732},[329,2665,2666],{"class":2060},"it.reason.wireName",[329,2668,2064],{"class":732},[329,2670,739],{"class":491},[329,2672,2673],{"class":390},") }\n",[329,2675,2676],{"class":331,"line":381},[329,2677,561],{"class":390},[2679,2680,2681,2682,2685],"warning",{},"Do not read a config from an evaluation listener, and do not drive state from ",[177,2683,2684],{},"evaluations"," that a composable reads a config from. The read publishes another evaluation, which recomposes, which reads the config again.",[165,2687,2689],{"id":2688},"retrieve-config-values","Retrieve config values",[170,2691,2692,2693,488,2696,488,2699,488,2702,488,2705,889,2708,2711,2712,2715],{},"To synchronously retrieve config values, use the client's typed getters: ",[177,2694,2695],{},"getBoolean",[177,2697,2698],{},"getString",[177,2700,2701],{},"getInt",[177,2703,2704],{},"getDouble",[177,2706,2707],{},"getJsonObject",[177,2709,2710],{},"getJsonArray",". Each requires two arguments. The first argument is the config key, and the second is the default value to be returned if the client has not yet received config values from ConfigDirector services. Kotlin callers also have ",[177,2713,2714],{},"client.value(key, default)",", which takes the type from the default value.",[170,2717,2718,2719,488,2722,488,2725,488,2728,488,2731,889,2734,2737,2738,2740,2741,2744,2745,2747],{},"You can also subscribe to config value changes via the matching watches: ",[177,2720,2721],{},"watchBoolean",[177,2723,2724],{},"watchString",[177,2726,2727],{},"watchInt",[177,2729,2730],{},"watchDouble",[177,2732,2733],{},"watchJsonObject",[177,2735,2736],{},"watchJsonArray",". Each takes the config key, the default value, and a listener that is handed the config's current value straight away and then every time the evaluated value changes, whether because it was edited in the ConfigDirector dashboard or because the context was updated. Consecutive identical values are not delivered again. Close the returned ",[177,2739,1964],{}," to stop watching. In Kotlin, ",[177,2742,2743],{},"client.values(key, default)"," is the same thing as a ",[177,2746,183],{},", and cancelling the collector stops watching.",[265,2749],{"name":2750},"sdks\u002Fandroid\u002Fsimple-usage",[170,2752,2753],{},"There is one getter and one watch per type a config can be read as, so a default value of any other type is a compile error rather than a failure at runtime. If the served value does not match the type it is read as, the SDK will attempt to convert it. If the conversion fails, it will return the default value. Mismatched types at runtime are captured by the telemetry collector and will surface as warnings in the ConfigDirector dashboard.",[319,2755,2758],{"className":321,"code":2756,"filename":2757,"language":324,"meta":325,"style":325},"client.getString(\"my-string-config-key\", \"Default\")\n\nclient.getInt(\"my-integer-config-key\", 100)\n\nclient.getDouble(\"my-decimal-config-key\", 1.5)\n\nclient.getBoolean(\"my-boolean-config-key\", false)\n","MainActivity.kt",[177,2759,2760,2779,2783,2801,2805,2823,2827],{"__ignoreMap":325},[329,2761,2762,2765,2767,2769,2772,2774,2777],{"class":331,"line":332},[329,2763,2764],{"class":390},"client.",[329,2766,2698],{"class":443},[329,2768,482],{"class":390},[329,2770,2771],{"class":491},"\"my-string-config-key\"",[329,2773,488],{"class":390},[329,2775,2776],{"class":491},"\"Default\"",[329,2778,495],{"class":390},[329,2780,2781],{"class":331,"line":343},[329,2782,378],{"emptyLinePlaceholder":32},[329,2784,2785,2787,2789,2791,2794,2796,2799],{"class":331,"line":351},[329,2786,2764],{"class":390},[329,2788,2701],{"class":443},[329,2790,482],{"class":390},[329,2792,2793],{"class":491},"\"my-integer-config-key\"",[329,2795,488],{"class":390},[329,2797,2798],{"class":1790},"100",[329,2800,495],{"class":390},[329,2802,2803],{"class":331,"line":359},[329,2804,378],{"emptyLinePlaceholder":32},[329,2806,2807,2809,2811,2813,2816,2818,2821],{"class":331,"line":367},[329,2808,2764],{"class":390},[329,2810,2704],{"class":443},[329,2812,482],{"class":390},[329,2814,2815],{"class":491},"\"my-decimal-config-key\"",[329,2817,488],{"class":390},[329,2819,2820],{"class":1790},"1.5",[329,2822,495],{"class":390},[329,2824,2825],{"class":331,"line":375},[329,2826,378],{"emptyLinePlaceholder":32},[329,2828,2829,2831,2833,2835,2838,2840,2843],{"class":331,"line":381},[329,2830,2764],{"class":390},[329,2832,2695],{"class":443},[329,2834,482],{"class":390},[329,2836,2837],{"class":491},"\"my-boolean-config-key\"",[329,2839,488],{"class":390},[329,2841,1705],{"class":2842},"syTEX",[329,2844,495],{"class":390},[170,2846,2847,2848,2850],{},"Every config can be read as a string, including a JSON config's raw document. A value written as a decimal and read with ",[177,2849,2701],{}," is truncated.",[904,2852,2854],{"id":2853},"json-configs","JSON configs",[170,2856,2857,2858,1620,2860,2862,2863,488,2865,488,2868,488,2870,488,2873,2876],{},"A config declared as JSON in the ConfigDirector dashboard is read with ",[177,2859,2707],{},[177,2861,2710],{},", depending on the shape of its document. The values inside are ",[177,2864,1356],{},[177,2866,2867],{},"Number",[177,2869,2500],{},[177,2871,2872],{},"List",[177,2874,2875],{},"Map",", or null, and the document cannot be modified. Only a JSON config reads as one; read any other config as a string to get its raw value.",[316,2878,2879,2978],{},[319,2880,2882],{"className":321,"code":2881,"filename":2757,"language":324,"meta":325,"style":325},"val theme = client.getJsonObject(\"theme\", mapOf(\"primary\" to \"#101010\"))\nval primary = theme[\"primary\"] as? String\n\nval regions = client.getJsonArray(\"regions\", listOf(\"us-east\"))\n",[177,2883,2884,2921,2944,2948],{"__ignoreMap":325},[329,2885,2886,2888,2891,2893,2896,2898,2900,2903,2905,2908,2910,2913,2916,2919],{"class":331,"line":332},[329,2887,950],{"class":335},[329,2889,2890],{"class":390}," theme ",[329,2892,476],{"class":335},[329,2894,2895],{"class":390}," client.",[329,2897,2707],{"class":443},[329,2899,482],{"class":390},[329,2901,2902],{"class":491},"\"theme\"",[329,2904,488],{"class":390},[329,2906,2907],{"class":443},"mapOf",[329,2909,482],{"class":390},[329,2911,2912],{"class":491},"\"primary\"",[329,2914,2915],{"class":390}," to ",[329,2917,2918],{"class":491},"\"#101010\"",[329,2920,1092],{"class":390},[329,2922,2923,2925,2928,2930,2933,2935,2938,2941],{"class":331,"line":343},[329,2924,950],{"class":335},[329,2926,2927],{"class":390}," primary ",[329,2929,476],{"class":335},[329,2931,2932],{"class":390}," theme[",[329,2934,2912],{"class":491},[329,2936,2937],{"class":390},"] ",[329,2939,2940],{"class":335},"as",[329,2942,2943],{"class":390},"? String\n",[329,2945,2946],{"class":331,"line":351},[329,2947,378],{"emptyLinePlaceholder":32},[329,2949,2950,2952,2955,2957,2959,2961,2963,2966,2968,2971,2973,2976],{"class":331,"line":359},[329,2951,950],{"class":335},[329,2953,2954],{"class":390}," regions ",[329,2956,476],{"class":335},[329,2958,2895],{"class":390},[329,2960,2710],{"class":443},[329,2962,482],{"class":390},[329,2964,2965],{"class":491},"\"regions\"",[329,2967,488],{"class":390},[329,2969,2970],{"class":443},"listOf",[329,2972,482],{"class":390},[329,2974,2975],{"class":491},"\"us-east\"",[329,2977,1092],{"class":390},[319,2979,2982],{"className":564,"code":2980,"filename":2981,"language":567,"meta":325,"style":325},"Map\u003CString, Object> theme = client.getJsonObject(\"theme\", Map.of(\"primary\", \"#101010\"));\nString primary = (String) theme.get(\"primary\");\n\nList\u003CObject> regions = client.getJsonArray(\"regions\", List.of(\"us-east\"));\n","MainActivity.java",[177,2983,2984,3051,3083,3087],{"__ignoreMap":325},[329,2985,2986,2988,2991,2993,2995,2998,3001,3003,3005,3007,3009,3011,3013,3015,3018,3020,3022,3025,3027,3030,3032,3034,3037,3039,3041,3043,3046,3048],{"class":331,"line":332},[329,2987,2875],{"class":577},[329,2989,2990],{"class":581},"\u003C",[329,2992,1356],{"class":407},[329,2994,729],{"class":581},[329,2996,2997],{"class":407}," Object",[329,2999,3000],{"class":581},">",[329,3002,2890],{"class":390},[329,3004,476],{"class":335},[329,3006,663],{"class":390},[329,3008,456],{"class":581},[329,3010,2707],{"class":443},[329,3012,482],{"class":581},[329,3014,739],{"class":732},[329,3016,3017],{"class":491},"theme",[329,3019,739],{"class":732},[329,3021,729],{"class":581},[329,3023,3024],{"class":390}," Map",[329,3026,456],{"class":581},[329,3028,3029],{"class":443},"of",[329,3031,482],{"class":581},[329,3033,739],{"class":732},[329,3035,3036],{"class":491},"primary",[329,3038,739],{"class":732},[329,3040,729],{"class":581},[329,3042,733],{"class":732},[329,3044,3045],{"class":491},"#101010",[329,3047,739],{"class":732},[329,3049,3050],{"class":581},"));\n",[329,3052,3053,3055,3057,3059,3061,3063,3065,3068,3070,3073,3075,3077,3079,3081],{"class":331,"line":343},[329,3054,1356],{"class":577},[329,3056,2927],{"class":390},[329,3058,476],{"class":335},[329,3060,2220],{"class":581},[329,3062,1356],{"class":390},[329,3064,1577],{"class":581},[329,3066,3067],{"class":390}," theme",[329,3069,456],{"class":581},[329,3071,3072],{"class":443},"get",[329,3074,482],{"class":581},[329,3076,739],{"class":732},[329,3078,3036],{"class":491},[329,3080,739],{"class":732},[329,3082,742],{"class":581},[329,3084,3085],{"class":331,"line":351},[329,3086,378],{"emptyLinePlaceholder":32},[329,3088,3089,3091,3093,3096,3098,3100,3102,3104,3106,3108,3110,3112,3115,3117,3119,3122,3124,3126,3128,3130,3133,3135],{"class":331,"line":359},[329,3090,2872],{"class":577},[329,3092,2990],{"class":581},[329,3094,3095],{"class":407},"Object",[329,3097,3000],{"class":581},[329,3099,2954],{"class":390},[329,3101,476],{"class":335},[329,3103,663],{"class":390},[329,3105,456],{"class":581},[329,3107,2710],{"class":443},[329,3109,482],{"class":581},[329,3111,739],{"class":732},[329,3113,3114],{"class":491},"regions",[329,3116,739],{"class":732},[329,3118,729],{"class":581},[329,3120,3121],{"class":390}," List",[329,3123,456],{"class":581},[329,3125,3029],{"class":443},[329,3127,482],{"class":581},[329,3129,739],{"class":732},[329,3131,3132],{"class":491},"us-east",[329,3134,739],{"class":732},[329,3136,3050],{"class":581},[904,3138,3140],{"id":3139},"reading-configs-in-jetpack-compose","Reading configs in Jetpack Compose",[170,3142,931,3143,3146],{},[177,3144,3145],{},"configdirector-android-compose"," artifact reads configs as Compose state, so a composable recomposes on its own whenever an evaluated value changes.",[170,3148,3149,3150,3153],{},"Wrap your content in a ",[177,3151,3152],{},"ConfigDirectorProvider"," and every binding below it reads from that client:",[319,3155,3157],{"className":321,"code":3156,"filename":2757,"language":324,"meta":325,"style":325},"import com.configdirector.compose.ConfigDirectorProvider\n\nclass MainActivity : ComponentActivity() {\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n\n        val client = (application as MyApplication).client\n        setContent {\n            ConfigDirectorProvider(client) {\n                MaterialTheme { HomeScreen() }\n            }\n        }\n    }\n}\n",[177,3158,3159,3166,3170,3184,3188,3204,3215,3219,3236,3243,3251,3264,3269,3273,3277],{"__ignoreMap":325},[329,3160,3161,3163],{"class":331,"line":332},[329,3162,336],{"class":335},[329,3164,3165],{"class":339}," com.configdirector.compose.ConfigDirectorProvider\n",[329,3167,3168],{"class":331,"line":343},[329,3169,378],{"emptyLinePlaceholder":32},[329,3171,3172,3174,3177,3179,3182],{"class":331,"line":351},[329,3173,384],{"class":335},[329,3175,3176],{"class":339}," MainActivity",[329,3178,391],{"class":390},[329,3180,3181],{"class":339},"ComponentActivity",[329,3183,396],{"class":390},[329,3185,3186],{"class":331,"line":359},[329,3187,378],{"emptyLinePlaceholder":32},[329,3189,3190,3192,3194,3196,3199,3202],{"class":331,"line":367},[329,3191,437],{"class":407},[329,3193,440],{"class":335},[329,3195,444],{"class":443},[329,3197,3198],{"class":390},"(savedInstanceState: ",[329,3200,3201],{"class":339},"Bundle",[329,3203,1365],{"class":390},[329,3205,3206,3208,3210,3212],{"class":331,"line":375},[329,3207,453],{"class":452},[329,3209,456],{"class":390},[329,3211,459],{"class":443},[329,3213,3214],{"class":390},"(savedInstanceState)\n",[329,3216,3217],{"class":331,"line":381},[329,3218,378],{"emptyLinePlaceholder":32},[329,3220,3221,3224,3226,3228,3231,3233],{"class":331,"line":399},[329,3222,3223],{"class":335},"        val",[329,3225,953],{"class":390},[329,3227,476],{"class":335},[329,3229,3230],{"class":390}," (application ",[329,3232,2940],{"class":335},[329,3234,3235],{"class":390}," MyApplication).client\n",[329,3237,3238,3241],{"class":331,"line":404},[329,3239,3240],{"class":443},"        setContent",[329,3242,515],{"class":390},[329,3244,3245,3248],{"class":331,"line":420},[329,3246,3247],{"class":443},"            ConfigDirectorProvider",[329,3249,3250],{"class":390},"(client) {\n",[329,3252,3253,3256,3258,3261],{"class":331,"line":429},[329,3254,3255],{"class":443},"                MaterialTheme",[329,3257,532],{"class":390},[329,3259,3260],{"class":443},"HomeScreen",[329,3262,3263],{"class":390},"() }\n",[329,3265,3266],{"class":331,"line":434},[329,3267,3268],{"class":390},"            }\n",[329,3270,3271],{"class":331,"line":449},[329,3272,549],{"class":390},[329,3274,3275],{"class":331,"line":465},[329,3276,555],{"class":390},[329,3278,3279],{"class":331,"line":470},[329,3280,561],{"class":390},[170,3282,3283,3286],{},[177,3284,3285],{},"configValue"," then reads a config anywhere inside it, with one overload per type a config can be read as. Until the client is ready, and for a value that cannot be read as the requested type, it is the default value:",[319,3288,3291],{"className":321,"code":3289,"filename":3290,"language":324,"meta":325,"style":325},"import com.configdirector.compose.configContext\nimport com.configdirector.compose.configValue\nimport com.configdirector.compose.isClientReady\n\n@Composable\nfun HomeScreen() {\n    val darkMode = configValue(\"dark-mode\", false)\n    val greeting = configValue(\"greeting\", \"Hello\")\n\n    \u002F\u002F Recomposes when config state arrives, which is useful to show a loading\n    \u002F\u002F state rather than flashing the in-code default value on a slow connection.\n    if (!isClientReady()) {\n        LoadingScreen()\n        return\n    }\n\n    Text(text = greeting, color = if (darkMode) Color.White else Color.Black)\n}\n","HomeScreen.kt",[177,3292,3293,3300,3307,3314,3318,3323,3333,3357,3380,3384,3389,3394,3410,3417,3422,3426,3430,3456],{"__ignoreMap":325},[329,3294,3295,3297],{"class":331,"line":332},[329,3296,336],{"class":335},[329,3298,3299],{"class":339}," com.configdirector.compose.configContext\n",[329,3301,3302,3304],{"class":331,"line":343},[329,3303,336],{"class":335},[329,3305,3306],{"class":339}," com.configdirector.compose.configValue\n",[329,3308,3309,3311],{"class":331,"line":351},[329,3310,336],{"class":335},[329,3312,3313],{"class":339}," com.configdirector.compose.isClientReady\n",[329,3315,3316],{"class":331,"line":359},[329,3317,378],{"emptyLinePlaceholder":32},[329,3319,3320],{"class":331,"line":367},[329,3321,3322],{"class":339},"@Composable\n",[329,3324,3325,3328,3331],{"class":331,"line":375},[329,3326,3327],{"class":335},"fun",[329,3329,3330],{"class":443}," HomeScreen",[329,3332,396],{"class":390},[329,3334,3335,3338,3341,3343,3346,3348,3351,3353,3355],{"class":331,"line":381},[329,3336,3337],{"class":335},"    val",[329,3339,3340],{"class":390}," darkMode ",[329,3342,476],{"class":335},[329,3344,3345],{"class":443}," configValue",[329,3347,482],{"class":390},[329,3349,3350],{"class":491},"\"dark-mode\"",[329,3352,488],{"class":390},[329,3354,1705],{"class":2842},[329,3356,495],{"class":390},[329,3358,3359,3361,3364,3366,3368,3370,3373,3375,3378],{"class":331,"line":399},[329,3360,3337],{"class":335},[329,3362,3363],{"class":390}," greeting ",[329,3365,476],{"class":335},[329,3367,3345],{"class":443},[329,3369,482],{"class":390},[329,3371,3372],{"class":491},"\"greeting\"",[329,3374,488],{"class":390},[329,3376,3377],{"class":491},"\"Hello\"",[329,3379,495],{"class":390},[329,3381,3382],{"class":331,"line":404},[329,3383,378],{"emptyLinePlaceholder":32},[329,3385,3386],{"class":331,"line":420},[329,3387,3388],{"class":1313},"    \u002F\u002F Recomposes when config state arrives, which is useful to show a loading\n",[329,3390,3391],{"class":331,"line":429},[329,3392,3393],{"class":1313},"    \u002F\u002F state rather than flashing the in-code default value on a slow connection.\n",[329,3395,3396,3399,3401,3404,3407],{"class":331,"line":434},[329,3397,3398],{"class":719},"    if",[329,3400,2220],{"class":390},[329,3402,3403],{"class":335},"!",[329,3405,3406],{"class":443},"isClientReady",[329,3408,3409],{"class":390},"()) {\n",[329,3411,3412,3415],{"class":331,"line":449},[329,3413,3414],{"class":443},"        LoadingScreen",[329,3416,462],{"class":390},[329,3418,3419],{"class":331,"line":465},[329,3420,3421],{"class":719},"        return\n",[329,3423,3424],{"class":331,"line":470},[329,3425,555],{"class":390},[329,3427,3428],{"class":331,"line":498},[329,3429,378],{"emptyLinePlaceholder":32},[329,3431,3432,3435,3438,3440,3443,3445,3447,3450,3453],{"class":331,"line":503},[329,3433,3434],{"class":443},"    Text",[329,3436,3437],{"class":390},"(text ",[329,3439,476],{"class":335},[329,3441,3442],{"class":390}," greeting, color ",[329,3444,476],{"class":335},[329,3446,2297],{"class":719},[329,3448,3449],{"class":390}," (darkMode) Color.White ",[329,3451,3452],{"class":719},"else",[329,3454,3455],{"class":390}," Color.Black)\n",[329,3457,3458],{"class":331,"line":518},[329,3459,561],{"class":390},[170,3461,3462,889,3465,3468],{},[177,3463,3464],{},"isClientReady()",[177,3466,3467],{},"configContext()"," expose the client's readiness and its current context as state, recomposing when either changes.",[290,3470,3471,3472,3475],{},"Each binding takes the client from ",[177,3473,3474],{},"LocalConfigDirectorClient"," unless one is passed to it explicitly. Reading a binding with no provider above it in the tree fails rather than serving default values that look like real ones.",[904,3477,3479],{"id":3478},"reading-configs-with-framework-views","Reading configs with framework views",[170,3481,3482],{},"With framework views, register a watch when the view is created and close its subscription when the view goes away:",[319,3484,3486],{"className":321,"code":3485,"filename":2757,"language":324,"meta":325,"style":325},"class MainActivity : AppCompatActivity() {\n\n    private var subscription: Subscription? = null\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n\n        val client = (application as MyApplication).client\n        subscription = client.watchBoolean(\"dark-mode\", false) { darkMode ->\n            \u002F\u002F Called on the main thread with the current value, and on every change.\n            findViewById\u003CSwitch>(R.id.dark_mode).isChecked = darkMode\n        }\n    }\n\n    override fun onDestroy() {\n        subscription?.close()\n        super.onDestroy()\n    }\n}\n",[177,3487,3488,3501,3505,3525,3529,3543,3553,3557,3571,3595,3600,3618,3622,3626,3630,3641,3650,3661,3665],{"__ignoreMap":325},[329,3489,3490,3492,3494,3496,3499],{"class":331,"line":332},[329,3491,384],{"class":335},[329,3493,3176],{"class":339},[329,3495,391],{"class":390},[329,3497,3498],{"class":339},"AppCompatActivity",[329,3500,396],{"class":390},[329,3502,3503],{"class":331,"line":343},[329,3504,378],{"emptyLinePlaceholder":32},[329,3506,3507,3510,3512,3515,3517,3520,3522],{"class":331,"line":351},[329,3508,3509],{"class":407},"    private",[329,3511,411],{"class":335},[329,3513,3514],{"class":390}," subscription: ",[329,3516,1964],{"class":339},[329,3518,3519],{"class":390},"? ",[329,3521,476],{"class":335},[329,3523,3524],{"class":452}," null\n",[329,3526,3527],{"class":331,"line":359},[329,3528,378],{"emptyLinePlaceholder":32},[329,3530,3531,3533,3535,3537,3539,3541],{"class":331,"line":367},[329,3532,437],{"class":407},[329,3534,440],{"class":335},[329,3536,444],{"class":443},[329,3538,3198],{"class":390},[329,3540,3201],{"class":339},[329,3542,1365],{"class":390},[329,3544,3545,3547,3549,3551],{"class":331,"line":375},[329,3546,453],{"class":452},[329,3548,456],{"class":390},[329,3550,459],{"class":443},[329,3552,3214],{"class":390},[329,3554,3555],{"class":331,"line":381},[329,3556,378],{"emptyLinePlaceholder":32},[329,3558,3559,3561,3563,3565,3567,3569],{"class":331,"line":399},[329,3560,3223],{"class":335},[329,3562,953],{"class":390},[329,3564,476],{"class":335},[329,3566,3230],{"class":390},[329,3568,2940],{"class":335},[329,3570,3235],{"class":390},[329,3572,3573,3576,3578,3580,3582,3584,3586,3588,3590,3593],{"class":331,"line":404},[329,3574,3575],{"class":390},"        subscription ",[329,3577,476],{"class":335},[329,3579,2895],{"class":390},[329,3581,2721],{"class":443},[329,3583,482],{"class":390},[329,3585,3350],{"class":491},[329,3587,488],{"class":390},[329,3589,1705],{"class":2842},[329,3591,3592],{"class":390},") { darkMode ",[329,3594,2020],{"class":407},[329,3596,3597],{"class":331,"line":420},[329,3598,3599],{"class":1313},"            \u002F\u002F Called on the main thread with the current value, and on every change.\n",[329,3601,3602,3605,3607,3610,3613,3615],{"class":331,"line":429},[329,3603,3604],{"class":443},"            findViewById",[329,3606,2990],{"class":390},[329,3608,3609],{"class":339},"Switch",[329,3611,3612],{"class":390},">(R.id.dark_mode).isChecked ",[329,3614,476],{"class":335},[329,3616,3617],{"class":390}," darkMode\n",[329,3619,3620],{"class":331,"line":434},[329,3621,549],{"class":390},[329,3623,3624],{"class":331,"line":449},[329,3625,555],{"class":390},[329,3627,3628],{"class":331,"line":465},[329,3629,378],{"emptyLinePlaceholder":32},[329,3631,3632,3634,3636,3639],{"class":331,"line":470},[329,3633,437],{"class":407},[329,3635,440],{"class":335},[329,3637,3638],{"class":443}," onDestroy",[329,3640,396],{"class":390},[329,3642,3643,3646,3648],{"class":331,"line":498},[329,3644,3645],{"class":390},"        subscription?.",[329,3647,2388],{"class":443},[329,3649,462],{"class":390},[329,3651,3652,3654,3656,3659],{"class":331,"line":503},[329,3653,453],{"class":452},[329,3655,456],{"class":390},[329,3657,3658],{"class":443},"onDestroy",[329,3660,462],{"class":390},[329,3662,3663],{"class":331,"line":518},[329,3664,555],{"class":390},[329,3666,3667],{"class":331,"line":546},[329,3668,561],{"class":390},[165,3670,3672],{"id":3671},"update-the-user-context","Update the user context",[265,3674],{"name":3675},"sdks\u002Fandroid\u002Fuser-context",[290,3677,3678,3679,3682,3683,3686],{},"In client SDKs (browser and mobile), updating the user context re-establishes a new connection to ConfigDirector servers with the new context. While the new connection is in flight, config values will continue to evaluate to the currently cached values from the prior user context.",[3680,3681],"br",{},"\nAwaiting ",[177,3684,3685],{},"updateContext"," will wait until the new config values are downloaded or the connection times out. In the case of a timeout, the client will continue to attempt to connect with the new context in the background.",[170,3688,3689,3690,488,3692,488,3694,488,3696,488,3698,3700,3701,3703],{},"Traits are JSON-shaped values: ",[177,3691,1356],{},[177,3693,2867],{},[177,3695,2500],{},[177,3697,2872],{},[177,3699,2875],{},", or null. A trait of any other type could never match a targeting rule, so building the context throws a ",[177,3702,298],{}," rather than sending something the server cannot evaluate.",[319,3705,3707],{"className":321,"code":3706,"filename":2757,"language":324,"meta":325,"style":325},"client.updateContext(\n    ConfigDirectorContext.build {\n        id(\"user-123\")\n        name(\"Ada Lovelace\")\n        traits(\n            mapOf(\n                \"plan\" to \"pro\",\n                \"seats\" to 12,\n                \"beta\" to true,\n                \"regions\" to listOf(\"us-east\", \"eu-west\"),\n            ),\n        )\n    },\n)\n",[177,3708,3709,3717,3726,3737,3749,3756,3763,3775,3787,3798,3819,3824,3829,3833],{"__ignoreMap":325},[329,3710,3711,3713,3715],{"class":331,"line":332},[329,3712,2764],{"class":390},[329,3714,3685],{"class":443},[329,3716,758],{"class":390},[329,3718,3719,3722,3724],{"class":331,"line":343},[329,3720,3721],{"class":390},"    ConfigDirectorContext.",[329,3723,529],{"class":443},[329,3725,515],{"class":390},[329,3727,3728,3731,3733,3735],{"class":331,"line":351},[329,3729,3730],{"class":443},"        id",[329,3732,482],{"class":390},[329,3734,540],{"class":491},[329,3736,495],{"class":390},[329,3738,3739,3742,3744,3747],{"class":331,"line":359},[329,3740,3741],{"class":443},"        name",[329,3743,482],{"class":390},[329,3745,3746],{"class":491},"\"Ada Lovelace\"",[329,3748,495],{"class":390},[329,3750,3751,3754],{"class":331,"line":367},[329,3752,3753],{"class":443},"        traits",[329,3755,758],{"class":390},[329,3757,3758,3761],{"class":331,"line":375},[329,3759,3760],{"class":443},"            mapOf",[329,3762,758],{"class":390},[329,3764,3765,3768,3770,3773],{"class":331,"line":381},[329,3766,3767],{"class":491},"                \"plan\"",[329,3769,2915],{"class":390},[329,3771,3772],{"class":491},"\"pro\"",[329,3774,972],{"class":390},[329,3776,3777,3780,3782,3785],{"class":331,"line":399},[329,3778,3779],{"class":491},"                \"seats\"",[329,3781,2915],{"class":390},[329,3783,3784],{"class":1790},"12",[329,3786,972],{"class":390},[329,3788,3789,3792,3794,3796],{"class":331,"line":404},[329,3790,3791],{"class":491},"                \"beta\"",[329,3793,2915],{"class":390},[329,3795,1715],{"class":2842},[329,3797,972],{"class":390},[329,3799,3800,3803,3805,3807,3809,3811,3813,3816],{"class":331,"line":420},[329,3801,3802],{"class":491},"                \"regions\"",[329,3804,2915],{"class":390},[329,3806,2970],{"class":443},[329,3808,482],{"class":390},[329,3810,2975],{"class":491},[329,3812,488],{"class":390},[329,3814,3815],{"class":491},"\"eu-west\"",[329,3817,3818],{"class":390},"),\n",[329,3820,3821],{"class":331,"line":429},[329,3822,3823],{"class":390},"            ),\n",[329,3825,3826],{"class":331,"line":434},[329,3827,3828],{"class":390},"        )\n",[329,3830,3831],{"class":331,"line":449},[329,3832,1003],{"class":390},[329,3834,3835],{"class":331,"line":465},[329,3836,495],{"class":390},[170,3838,3839,3840,2915,3843,3845,3846,3848],{},"For a signed-out user, set ",[177,3841,3842],{},"anonymous",[177,3844,1715],{},". The values are still used to evaluate targeting rules, but the context is not persisted and does not appear in the dashboard. Leaving ",[177,3847,535],{}," unset lets the SDK generate a random identifier for it — note that this value segments users in percentage rollouts, so changing it can move a user into a different percentile.",[165,3850,3852],{"id":3851},"other-useful-client-features","Other useful client features",[170,3854,3855],{},"The client provides additional properties and methods.",[904,3857,3858],{"id":2466},[177,3859,2466],{},[170,3861,3862,3863,3865,3866,3868,3869,3871,3872,3874],{},"Returns the current user context (which may be ",[177,3864,2473],{},"). When calling ",[177,3867,3685],{},", the ",[177,3870,2466],{}," is not immediately updated. The ",[177,3873,2466],{}," is updated after the new connection for the new context succeeds (or times out and goes on retry).",[904,3876,3878],{"id":3877},"isready",[177,3879,306],{},[170,3881,3882,3883,3885,3886,3888,3889,3891,3892,3894,3895,3897,3898,3900,3901,3903,3904,3906],{},"Returns a ",[177,3884,2500],{}," indicating if the client has been successfully initialized and is ready to evaluate configs for the given user context. It is initially ",[177,3887,1705],{}," and becomes ",[177,3890,1715],{}," after ",[177,3893,302],{}," succeeds.\nUpon calling ",[177,3896,3685],{}," it becomes ",[177,3899,1705],{}," again and it is set to ",[177,3902,1715],{}," once ",[177,3905,3685],{}," succeeds.",[904,3908,3910],{"id":3909},"isinitializing",[177,3911,3912],{},"isInitializing",[170,3914,3882,3915,3917,3918,3920,3921,3891,3923,3925,3926,3928],{},[177,3916,2500],{}," indicating whether the client is currently initializing. It is ",[177,3919,1705],{}," on creation, ",[177,3922,1715],{},[177,3924,302],{}," is called, and ",[177,3927,1705],{}," again once initialization completes. This is useful to show a loading state instead of transitioning from the in-code default value to the evaluated value on a slow connection.",[904,3930,3932,889,3934],{"id":3931},"pausenetwork-and-resumenetwork",[177,3933,888],{},[177,3935,892],{},[170,3937,3938,3940,3941,3943,3944,1620,3946,3948,3949,1655,3951,3953],{},[177,3939,888],{}," releases the network connection without discarding config state, watches, or listeners, and ",[177,3942,892],{}," re-establishes it using the last context given to ",[177,3945,302],{},[177,3947,3685],{},". Reads keep serving the last config state the client received, and ",[177,3950,306],{},[177,3952,1705],{}," until the connection is back.",[170,3955,3956,3957,2915,3959,3961],{},"The client already does this on its own while the app is backgrounded, so these are only needed if you set ",[177,3958,1697],{},[177,3960,1705],{}," in order to manage the connection yourself.",[170,3963,3964,3967,3968,3970,3971,3973,3974,456],{},[177,3965,3966],{},"resumeNetwork"," has the same two forms as ",[177,3969,302],{},": a ",[177,3972,179],{}," function for Kotlin, and one taking a ",[177,3975,3976],{},"CompletionCallback",[904,3978,3979],{"id":2388},[177,3980,901],{},[170,3982,3983],{},"Closes the connection, every watch, and every listener registration, and reports whatever telemetry is left. The client cannot be used afterwards: it stops receiving config state and never becomes ready again, though reads keep serving the last config state it received.",[170,3985,3986],{},"Most applications never need to call it — the client lives as long as the process, and Android reclaims everything when the process ends. Call it when an application wants the client gone before that, on sign-out for instance.",[3988,3989,3990],"style",{},"html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_bVq, html code.shiki .s_bVq{--shiki-light:#9C3EDA;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s_hVV, html code.shiki .s_hVV{--shiki-light:#90A4AE;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .s99_P, html code.shiki .s99_P{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#E36209;--shiki-default-font-style:inherit;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sfo-9, html code.shiki .sfo-9{--shiki-light:#90A4AE;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .syTEX, html code.shiki .syTEX{--shiki-light:#FF5370;--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":325,"searchDepth":343,"depth":343,"links":3992},[3993,3994,3995,3999,4004,4005],{"id":167,"depth":343,"text":168},{"id":254,"depth":343,"text":255},{"id":270,"depth":343,"text":271,"children":3996},[3997,3998],{"id":906,"depth":351,"text":907},{"id":1949,"depth":351,"text":1950},{"id":2688,"depth":343,"text":2689,"children":4000},[4001,4002,4003],{"id":2853,"depth":351,"text":2854},{"id":3139,"depth":351,"text":3140},{"id":3478,"depth":351,"text":3479},{"id":3671,"depth":343,"text":3672},{"id":3851,"depth":343,"text":3852,"children":4006},[4007,4008,4009,4010,4012],{"id":2466,"depth":351,"text":2466},{"id":3877,"depth":351,"text":306},{"id":3909,"depth":351,"text":3912},{"id":3931,"depth":351,"text":4011},"pauseNetwork() and resumeNetwork()",{"id":2388,"depth":351,"text":901},"md",null,{},{"title":88,"icon":91},{"title":150,"description":325},"7tO9cNl_Yy3_TGARCn47WPx3uITG15KT2VEe8QewNkQ",[4020,4021],{"title":83,"path":84,"stem":85,"description":325,"icon":86,"children":-1},{"title":99,"path":100,"stem":101,"description":325,"icon":102,"children":-1},{"id":4023,"title":4024,"body":4025,"description":325,"extension":4013,"links":4014,"meta":4271,"navigation":6,"path":4272,"seo":4273,"stem":4274,"__hash__":4275},"docs\u002F_partials\u002Fsdks\u002Fandroid\u002Finstall.md","Install",{"type":152,"value":4026,"toc":4269},[4027,4259,4266],[316,4028,4029,4078,4128],{},[319,4030,4033],{"className":321,"code":4031,"filename":4032,"language":324,"meta":325,"style":325},"dependencies {\n    implementation(\"com.configdirector:configdirector-android:1.2.0\")\n\n    \u002F\u002F Optional, for Jetpack Compose applications\n    implementation(\"com.configdirector:configdirector-android-compose:1.2.0\")\n}\n","build.gradle.kts",[177,4034,4035,4042,4054,4058,4063,4074],{"__ignoreMap":325},[329,4036,4037,4040],{"class":331,"line":332},[329,4038,4039],{"class":443},"dependencies",[329,4041,515],{"class":390},[329,4043,4044,4047,4049,4052],{"class":331,"line":343},[329,4045,4046],{"class":443},"    implementation",[329,4048,482],{"class":390},[329,4050,4051],{"class":491},"\"com.configdirector:configdirector-android:1.2.0\"",[329,4053,495],{"class":390},[329,4055,4056],{"class":331,"line":351},[329,4057,378],{"emptyLinePlaceholder":32},[329,4059,4060],{"class":331,"line":359},[329,4061,4062],{"class":1313},"    \u002F\u002F Optional, for Jetpack Compose applications\n",[329,4064,4065,4067,4069,4072],{"class":331,"line":367},[329,4066,4046],{"class":443},[329,4068,482],{"class":390},[329,4070,4071],{"class":491},"\"com.configdirector:configdirector-android-compose:1.2.0\"",[329,4073,495],{"class":390},[329,4075,4076],{"class":331,"line":375},[329,4077,561],{"class":390},[319,4079,4084],{"className":4080,"code":4081,"filename":4082,"language":4083,"meta":325,"style":325},"language-groovy shiki shiki-themes material-theme-lighter github-light github-dark","dependencies {\n    implementation 'com.configdirector:configdirector-android:1.2.0'\n\n    \u002F\u002F Optional, for Jetpack Compose applications\n    implementation 'com.configdirector:configdirector-android-compose:1.2.0'\n}\n","build.gradle","groovy",[177,4085,4086,4091,4105,4109,4113,4124],{"__ignoreMap":325},[329,4087,4088],{"class":331,"line":332},[329,4089,4090],{"class":390},"dependencies {\n",[329,4092,4093,4096,4099,4102],{"class":331,"line":343},[329,4094,4095],{"class":390},"    implementation ",[329,4097,4098],{"class":732},"'",[329,4100,4101],{"class":491},"com.configdirector:configdirector-android:1.2.0",[329,4103,4104],{"class":732},"'\n",[329,4106,4107],{"class":331,"line":351},[329,4108,378],{"emptyLinePlaceholder":32},[329,4110,4111],{"class":331,"line":359},[329,4112,4062],{"class":1313},[329,4114,4115,4117,4119,4122],{"class":331,"line":367},[329,4116,4095],{"class":390},[329,4118,4098],{"class":732},[329,4120,4121],{"class":491},"com.configdirector:configdirector-android-compose:1.2.0",[329,4123,4104],{"class":732},[329,4125,4126],{"class":331,"line":375},[329,4127,561],{"class":390},[319,4129,4134],{"className":4130,"code":4131,"filename":4132,"language":4133,"meta":325,"style":325},"language-toml shiki shiki-themes material-theme-lighter github-light github-dark","[versions]\nconfigdirector = \"1.2.0\"\n\n[libraries]\nconfigdirector-android = { module = \"com.configdirector:configdirector-android\", version.ref = \"configdirector\" }\n# Optional, for Jetpack Compose applications\nconfigdirector-android-compose = { module = \"com.configdirector:configdirector-android-compose\", version.ref = \"configdirector\" }\n","libs.versions.toml","toml",[177,4135,4136,4147,4162,4166,4175,4217,4222],{"__ignoreMap":325},[329,4137,4138,4141,4144],{"class":331,"line":332},[329,4139,4140],{"class":581},"[",[329,4142,4143],{"class":339},"versions",[329,4145,4146],{"class":581},"]\n",[329,4148,4149,4152,4154,4156,4159],{"class":331,"line":343},[329,4150,4151],{"class":390},"configdirector ",[329,4153,476],{"class":581},[329,4155,733],{"class":732},[329,4157,4158],{"class":491},"1.2.0",[329,4160,4161],{"class":732},"\"\n",[329,4163,4164],{"class":331,"line":351},[329,4165,378],{"emptyLinePlaceholder":32},[329,4167,4168,4170,4173],{"class":331,"line":359},[329,4169,4140],{"class":581},[329,4171,4172],{"class":339},"libraries",[329,4174,4146],{"class":581},[329,4176,4177,4180,4182,4185,4188,4190,4192,4194,4196,4198,4201,4203,4206,4208,4210,4212,4214],{"class":331,"line":367},[329,4178,4179],{"class":390},"configdirector-android ",[329,4181,476],{"class":581},[329,4183,4184],{"class":581}," {",[329,4186,4187],{"class":390}," module ",[329,4189,476],{"class":581},[329,4191,733],{"class":732},[329,4193,217],{"class":491},[329,4195,739],{"class":732},[329,4197,729],{"class":581},[329,4199,4200],{"class":390}," version",[329,4202,456],{"class":581},[329,4204,4205],{"class":390},"ref ",[329,4207,476],{"class":581},[329,4209,733],{"class":732},[329,4211,603],{"class":491},[329,4213,739],{"class":732},[329,4215,4216],{"class":581}," }\n",[329,4218,4219],{"class":331,"line":375},[329,4220,4221],{"class":1313},"# Optional, for Jetpack Compose applications\n",[329,4223,4224,4227,4229,4231,4233,4235,4237,4239,4241,4243,4245,4247,4249,4251,4253,4255,4257],{"class":331,"line":381},[329,4225,4226],{"class":390},"configdirector-android-compose ",[329,4228,476],{"class":581},[329,4230,4184],{"class":581},[329,4232,4187],{"class":390},[329,4234,476],{"class":581},[329,4236,733],{"class":732},[329,4238,233],{"class":491},[329,4240,739],{"class":732},[329,4242,729],{"class":581},[329,4244,4200],{"class":390},[329,4246,456],{"class":581},[329,4248,4205],{"class":390},[329,4250,476],{"class":581},[329,4252,733],{"class":732},[329,4254,603],{"class":491},[329,4256,739],{"class":732},[329,4258,4216],{"class":581},[170,4260,4261,4262,4265],{},"The SDK declares the ",[177,4263,4264],{},"INTERNET"," permission, which is merged into your application's manifest, so there is nothing to add there.",[3988,4267,4268],{},"html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":325,"searchDepth":343,"depth":343,"links":4270},[],{},"\u002F_partials\u002Fsdks\u002Fandroid\u002Finstall",{"description":325},"_partials\u002Fsdks\u002Fandroid\u002Finstall","iOqZ4ThqaYY2TYhSJhM6GkTxji--LhkCdRZmbGrKUfk",{"id":4277,"title":4278,"body":4279,"description":325,"extension":4013,"links":4014,"meta":4493,"navigation":6,"path":4494,"seo":4495,"stem":4496,"__hash__":4497},"docs\u002F_partials\u002Fsdks\u002Fandroid\u002Fconfigure.md","Configure",{"type":152,"value":4280,"toc":4491},[4281,4474,4477,4488],[316,4282,4283,4347],{},[319,4284,4286],{"className":321,"code":4285,"filename":943,"language":324,"meta":325,"style":325},"import com.configdirector.ConfigDirectorClient\n\n\u002F\u002F Creating the client makes no network calls. It throws only when the SDK key is\n\u002F\u002F blank or an option holds an unusable value.\nval client = ConfigDirectorClient(applicationContext, \"YOUR-CLIENT-SDK-KEY\")\n\n\u002F\u002F Connects and waits until config values are received, or until it times out.\n\u002F\u002F After a timeout the client keeps trying to connect in the background.\nclient.initialize()\n",[177,4287,4288,4294,4298,4303,4308,4325,4329,4334,4339],{"__ignoreMap":325},[329,4289,4290,4292],{"class":331,"line":332},[329,4291,336],{"class":335},[329,4293,348],{"class":339},[329,4295,4296],{"class":331,"line":343},[329,4297,378],{"emptyLinePlaceholder":32},[329,4299,4300],{"class":331,"line":351},[329,4301,4302],{"class":1313},"\u002F\u002F Creating the client makes no network calls. It throws only when the SDK key is\n",[329,4304,4305],{"class":331,"line":359},[329,4306,4307],{"class":1313},"\u002F\u002F blank or an option holds an unusable value.\n",[329,4309,4310,4312,4314,4316,4318,4321,4323],{"class":331,"line":367},[329,4311,950],{"class":335},[329,4313,953],{"class":390},[329,4315,476],{"class":335},[329,4317,479],{"class":443},[329,4319,4320],{"class":390},"(applicationContext, ",[329,4322,492],{"class":491},[329,4324,495],{"class":390},[329,4326,4327],{"class":331,"line":375},[329,4328,378],{"emptyLinePlaceholder":32},[329,4330,4331],{"class":331,"line":381},[329,4332,4333],{"class":1313},"\u002F\u002F Connects and waits until config values are received, or until it times out.\n",[329,4335,4336],{"class":331,"line":399},[329,4337,4338],{"class":1313},"\u002F\u002F After a timeout the client keeps trying to connect in the background.\n",[329,4340,4341,4343,4345],{"class":331,"line":404},[329,4342,2764],{"class":390},[329,4344,302],{"class":443},[329,4346,462],{"class":390},[319,4348,4350],{"className":564,"code":4349,"filename":1011,"language":567,"meta":325,"style":325},"import com.configdirector.ConfigDirectorClient;\n\n\u002F\u002F Creating the client makes no network calls. It throws only when the SDK key is\n\u002F\u002F blank or an option holds an unusable value.\nConfigDirectorClient client = new ConfigDirectorClient(getApplicationContext(), \"YOUR-CLIENT-SDK-KEY\");\n\n\u002F\u002F Connects, and calls back on the main thread once config values are received or\n\u002F\u002F the attempt times out. After a timeout the client keeps trying in the background.\nclient.initialize(null, () -> Log.i(\"MyApp\", \"ConfigDirector ready: \" + client.isReady()));\n",[177,4351,4352,4368,4372,4376,4380,4408,4412,4417,4422],{"__ignoreMap":325},[329,4353,4354,4356,4358,4360,4362,4364,4366],{"class":331,"line":332},[329,4355,336],{"class":574},[329,4357,598],{"class":577},[329,4359,456],{"class":581},[329,4361,603],{"class":577},[329,4363,456],{"class":581},[329,4365,608],{"class":577},[329,4367,591],{"class":581},[329,4369,4370],{"class":331,"line":343},[329,4371,378],{"emptyLinePlaceholder":32},[329,4373,4374],{"class":331,"line":351},[329,4375,4302],{"class":1313},[329,4377,4378],{"class":331,"line":359},[329,4379,4307],{"class":1313},[329,4381,4382,4384,4386,4388,4390,4392,4394,4397,4400,4402,4404,4406],{"class":331,"line":367},[329,4383,608],{"class":577},[329,4385,953],{"class":390},[329,4387,476],{"class":335},[329,4389,720],{"class":719},[329,4391,479],{"class":443},[329,4393,482],{"class":581},[329,4395,4396],{"class":443},"getApplicationContext",[329,4398,4399],{"class":581},"(),",[329,4401,733],{"class":732},[329,4403,736],{"class":491},[329,4405,739],{"class":732},[329,4407,742],{"class":581},[329,4409,4410],{"class":331,"line":375},[329,4411,378],{"emptyLinePlaceholder":32},[329,4413,4414],{"class":331,"line":381},[329,4415,4416],{"class":1313},"\u002F\u002F Connects, and calls back on the main thread once config values are received or\n",[329,4418,4419],{"class":331,"line":399},[329,4420,4421],{"class":1313},"\u002F\u002F the attempt times out. After a timeout the client keeps trying in the background.\n",[329,4423,4424,4427,4429,4431,4433,4435,4437,4440,4442,4444,4446,4448,4450,4452,4454,4456,4458,4460,4462,4464,4466,4468,4470,4472],{"class":331,"line":404},[329,4425,4426],{"class":390},"client",[329,4428,456],{"class":581},[329,4430,302],{"class":443},[329,4432,482],{"class":581},[329,4434,2473],{"class":452},[329,4436,729],{"class":581},[329,4438,4439],{"class":581}," ()",[329,4441,797],{"class":407},[329,4443,800],{"class":390},[329,4445,456],{"class":581},[329,4447,805],{"class":443},[329,4449,482],{"class":581},[329,4451,739],{"class":732},[329,4453,812],{"class":491},[329,4455,739],{"class":732},[329,4457,729],{"class":581},[329,4459,733],{"class":732},[329,4461,821],{"class":491},[329,4463,739],{"class":732},[329,4465,826],{"class":335},[329,4467,663],{"class":390},[329,4469,456],{"class":581},[329,4471,306],{"class":443},[329,4473,835],{"class":581},[170,4475,4476],{},"The client is thread safe. Create one and share it for the lifetime of the app.",[170,4478,4479,4481,4482,4484,4485,4487],{},[177,4480,302],{}," is a ",[177,4483,179],{}," function in Kotlin, so it is called from a coroutine. The overload taking a ",[177,4486,3976],{}," is the one to use from Java, and from anywhere in Kotlin that has no coroutine to run in.",[3988,4489,4490],{},"html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_bVq, html code.shiki .s_bVq{--shiki-light:#9C3EDA;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":325,"searchDepth":343,"depth":343,"links":4492},[],{},"\u002F_partials\u002Fsdks\u002Fandroid\u002Fconfigure",{"description":325},"_partials\u002Fsdks\u002Fandroid\u002Fconfigure","saltM8NmZ--PnC__lbfCQzUejS_6gh60AHP5MfdXI6o",{"id":4499,"title":4500,"body":4501,"description":325,"extension":4013,"links":4014,"meta":4890,"navigation":6,"path":4891,"seo":4892,"stem":4893,"__hash__":4894},"docs\u002F_partials\u002Fsdks\u002Fandroid\u002Fsimple-usage.md","Simple Usage",{"type":152,"value":4502,"toc":4888},[4503,4885],[316,4504,4505,4639,4808],{},[319,4506,4508],{"className":321,"code":4507,"filename":2757,"language":324,"meta":325,"style":325},"import com.configdirector.value\nimport com.configdirector.values\n\n\u002F\u002F Retrieve the current value. The default value decides the type the config\n\u002F\u002F is read as, and is returned until the client is ready.\nval darkMode = client.value(\"my-config-key\", false)\n\n\u002F\u002F Subscribe to value updates. The flow emits the current value right away\n\u002F\u002F and then every time the evaluated value changes.\nlifecycleScope.launch {\n    client.values(\"my-config-key\", false).collect { darkMode ->\n        Log.i(\"MyApp\", \"Value updated: $darkMode\")\n    }\n}\n",[177,4509,4510,4517,4524,4528,4533,4538,4561,4565,4570,4575,4583,4608,4631,4635],{"__ignoreMap":325},[329,4511,4512,4514],{"class":331,"line":332},[329,4513,336],{"class":335},[329,4515,4516],{"class":339}," com.configdirector.value\n",[329,4518,4519,4521],{"class":331,"line":343},[329,4520,336],{"class":335},[329,4522,4523],{"class":339}," com.configdirector.values\n",[329,4525,4526],{"class":331,"line":351},[329,4527,378],{"emptyLinePlaceholder":32},[329,4529,4530],{"class":331,"line":359},[329,4531,4532],{"class":1313},"\u002F\u002F Retrieve the current value. The default value decides the type the config\n",[329,4534,4535],{"class":331,"line":367},[329,4536,4537],{"class":1313},"\u002F\u002F is read as, and is returned until the client is ready.\n",[329,4539,4540,4542,4544,4546,4548,4550,4552,4555,4557,4559],{"class":331,"line":375},[329,4541,950],{"class":335},[329,4543,3340],{"class":390},[329,4545,476],{"class":335},[329,4547,2895],{"class":390},[329,4549,2518],{"class":443},[329,4551,482],{"class":390},[329,4553,4554],{"class":491},"\"my-config-key\"",[329,4556,488],{"class":390},[329,4558,1705],{"class":2842},[329,4560,495],{"class":390},[329,4562,4563],{"class":331,"line":381},[329,4564,378],{"emptyLinePlaceholder":32},[329,4566,4567],{"class":331,"line":399},[329,4568,4569],{"class":1313},"\u002F\u002F Subscribe to value updates. The flow emits the current value right away\n",[329,4571,4572],{"class":331,"line":404},[329,4573,4574],{"class":1313},"\u002F\u002F and then every time the evaluated value changes.\n",[329,4576,4577,4579,4581],{"class":331,"line":420},[329,4578,2002],{"class":390},[329,4580,512],{"class":443},[329,4582,515],{"class":390},[329,4584,4585,4588,4591,4593,4595,4597,4599,4601,4603,4606],{"class":331,"line":429},[329,4586,4587],{"class":390},"    client.",[329,4589,4590],{"class":443},"values",[329,4592,482],{"class":390},[329,4594,4554],{"class":491},[329,4596,488],{"class":390},[329,4598,1705],{"class":2842},[329,4600,784],{"class":390},[329,4602,2014],{"class":443},[329,4604,4605],{"class":390}," { darkMode ",[329,4607,2020],{"class":407},[329,4609,4610,4613,4615,4617,4619,4621,4624,4627,4629],{"class":331,"line":434},[329,4611,4612],{"class":390},"        Log.",[329,4614,805],{"class":443},[329,4616,482],{"class":390},[329,4618,2049],{"class":491},[329,4620,488],{"class":390},[329,4622,4623],{"class":491},"\"Value updated: ",[329,4625,4626],{"class":697},"$darkMode",[329,4628,739],{"class":491},[329,4630,495],{"class":390},[329,4632,4633],{"class":331,"line":449},[329,4634,555],{"class":390},[329,4636,4637],{"class":331,"line":465},[329,4638,561],{"class":390},[319,4640,4642],{"className":564,"code":4641,"filename":2981,"language":567,"meta":325,"style":325},"import com.configdirector.Subscription;\n\n\u002F\u002F Retrieve the current value. There is a getter per type a config can be read\n\u002F\u002F as, and each returns the default value until the client is ready.\nboolean darkMode = client.getBoolean(\"my-config-key\", false);\n\n\u002F\u002F Subscribe to value updates. The listener is called on the main thread with the\n\u002F\u002F current value, and then every time the evaluated value changes.\nSubscription subscription = client.watchBoolean(\n    \"my-config-key\",\n    false,\n    value -> Log.i(\"MyApp\", \"Value updated: \" + value));\n\n\u002F\u002F Close the subscription to stop watching\nsubscription.close();\n",[177,4643,4644,4660,4664,4669,4674,4705,4709,4714,4719,4735,4745,4752,4789,4793,4798],{"__ignoreMap":325},[329,4645,4646,4648,4650,4652,4654,4656,4658],{"class":331,"line":332},[329,4647,336],{"class":574},[329,4649,598],{"class":577},[329,4651,456],{"class":581},[329,4653,603],{"class":577},[329,4655,456],{"class":581},[329,4657,1964],{"class":577},[329,4659,591],{"class":581},[329,4661,4662],{"class":331,"line":343},[329,4663,378],{"emptyLinePlaceholder":32},[329,4665,4666],{"class":331,"line":351},[329,4667,4668],{"class":1313},"\u002F\u002F Retrieve the current value. There is a getter per type a config can be read\n",[329,4670,4671],{"class":331,"line":359},[329,4672,4673],{"class":1313},"\u002F\u002F as, and each returns the default value until the client is ready.\n",[329,4675,4676,4679,4681,4683,4685,4687,4689,4691,4693,4696,4698,4700,4703],{"class":331,"line":367},[329,4677,4678],{"class":407},"boolean",[329,4680,3340],{"class":390},[329,4682,476],{"class":335},[329,4684,663],{"class":390},[329,4686,456],{"class":581},[329,4688,2695],{"class":443},[329,4690,482],{"class":581},[329,4692,739],{"class":732},[329,4694,4695],{"class":491},"my-config-key",[329,4697,739],{"class":732},[329,4699,729],{"class":581},[329,4701,4702],{"class":452}," false",[329,4704,742],{"class":581},[329,4706,4707],{"class":331,"line":375},[329,4708,378],{"emptyLinePlaceholder":32},[329,4710,4711],{"class":331,"line":381},[329,4712,4713],{"class":1313},"\u002F\u002F Subscribe to value updates. The listener is called on the main thread with the\n",[329,4715,4716],{"class":331,"line":399},[329,4717,4718],{"class":1313},"\u002F\u002F current value, and then every time the evaluated value changes.\n",[329,4720,4721,4723,4725,4727,4729,4731,4733],{"class":331,"line":404},[329,4722,1964],{"class":577},[329,4724,2195],{"class":390},[329,4726,476],{"class":335},[329,4728,663],{"class":390},[329,4730,456],{"class":581},[329,4732,2721],{"class":443},[329,4734,758],{"class":581},[329,4736,4737,4739,4741,4743],{"class":331,"line":420},[329,4738,1039],{"class":732},[329,4740,4695],{"class":491},[329,4742,739],{"class":732},[329,4744,972],{"class":581},[329,4746,4747,4750],{"class":331,"line":429},[329,4748,4749],{"class":452},"    false",[329,4751,972],{"class":581},[329,4753,4754,4757,4759,4761,4763,4765,4767,4769,4771,4773,4775,4777,4780,4782,4784,4787],{"class":331,"line":434},[329,4755,4756],{"class":390},"    value ",[329,4758,2039],{"class":407},[329,4760,800],{"class":390},[329,4762,456],{"class":581},[329,4764,805],{"class":443},[329,4766,482],{"class":581},[329,4768,739],{"class":732},[329,4770,812],{"class":491},[329,4772,739],{"class":732},[329,4774,729],{"class":581},[329,4776,733],{"class":732},[329,4778,4779],{"class":491},"Value updated: ",[329,4781,739],{"class":732},[329,4783,826],{"class":335},[329,4785,4786],{"class":390}," value",[329,4788,3050],{"class":581},[329,4790,4791],{"class":331,"line":449},[329,4792,378],{"emptyLinePlaceholder":32},[329,4794,4795],{"class":331,"line":465},[329,4796,4797],{"class":1313},"\u002F\u002F Close the subscription to stop watching\n",[329,4799,4800,4802,4804,4806],{"class":331,"line":470},[329,4801,2383],{"class":390},[329,4803,456],{"class":581},[329,4805,2388],{"class":443},[329,4807,705],{"class":581},[319,4809,4812],{"className":321,"code":4810,"filename":4811,"language":324,"meta":325,"style":325},"import com.configdirector.compose.configValue\n\n@Composable\nfun SampleScreen() {\n    \u002F\u002F Recomposes whenever the evaluated value changes.\n    val darkMode = configValue(\"my-config-key\", false)\n\n    Text(\"my-config-key: $darkMode\")\n}\n","SampleScreen.kt (Compose)",[177,4813,4814,4820,4824,4828,4837,4842,4862,4866,4881],{"__ignoreMap":325},[329,4815,4816,4818],{"class":331,"line":332},[329,4817,336],{"class":335},[329,4819,3306],{"class":339},[329,4821,4822],{"class":331,"line":343},[329,4823,378],{"emptyLinePlaceholder":32},[329,4825,4826],{"class":331,"line":351},[329,4827,3322],{"class":339},[329,4829,4830,4832,4835],{"class":331,"line":359},[329,4831,3327],{"class":335},[329,4833,4834],{"class":443}," SampleScreen",[329,4836,396],{"class":390},[329,4838,4839],{"class":331,"line":367},[329,4840,4841],{"class":1313},"    \u002F\u002F Recomposes whenever the evaluated value changes.\n",[329,4843,4844,4846,4848,4850,4852,4854,4856,4858,4860],{"class":331,"line":375},[329,4845,3337],{"class":335},[329,4847,3340],{"class":390},[329,4849,476],{"class":335},[329,4851,3345],{"class":443},[329,4853,482],{"class":390},[329,4855,4554],{"class":491},[329,4857,488],{"class":390},[329,4859,1705],{"class":2842},[329,4861,495],{"class":390},[329,4863,4864],{"class":331,"line":381},[329,4865,378],{"emptyLinePlaceholder":32},[329,4867,4868,4870,4872,4875,4877,4879],{"class":331,"line":399},[329,4869,3434],{"class":443},[329,4871,482],{"class":390},[329,4873,4874],{"class":491},"\"my-config-key: ",[329,4876,4626],{"class":697},[329,4878,739],{"class":491},[329,4880,495],{"class":390},[329,4882,4883],{"class":331,"line":404},[329,4884,561],{"class":390},[3988,4886,4887],{},"html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .syTEX, html code.shiki .syTEX{--shiki-light:#FF5370;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_hVV, html code.shiki .s_hVV{--shiki-light:#90A4AE;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_bVq, html code.shiki .s_bVq{--shiki-light:#9C3EDA;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":325,"searchDepth":343,"depth":343,"links":4889},[],{},"\u002F_partials\u002Fsdks\u002Fandroid\u002Fsimple-usage",{"description":325},"_partials\u002Fsdks\u002Fandroid\u002Fsimple-usage","CdJY7QPnDLtXK9tkpEbTXobq8Lc63QFZ7y3CZ_t3UwM",{"id":4896,"title":4897,"body":4898,"description":4902,"extension":4013,"links":4014,"meta":5576,"navigation":6,"path":5577,"seo":5578,"stem":5579,"__hash__":5580},"docs\u002F_partials\u002Fsdks\u002Fandroid\u002Fuser-context.md","User Context",{"type":152,"value":4899,"toc":5574},[4900,4903,5233,5239,5571],[170,4901,4902],{},"A user context can be provided when initializing the client:",[316,4904,4905,5014],{},[319,4906,4908],{"className":321,"code":4907,"filename":943,"language":324,"meta":325,"style":325},"import com.configdirector.ConfigDirectorClient\nimport com.configdirector.ConfigDirectorContext\n\nval client = ConfigDirectorClient(applicationContext, \"YOUR-CLIENT-SDK-KEY\")\n\nclient.initialize(\n    ConfigDirectorContext.build {\n        id(\"12345\")\n        name(\"Example User\")\n        \u002F\u002F Any arbitrary traits which can be referenced in targeting rules\n        trait(\"region\", \"North America\")\n    },\n)\n",[177,4909,4910,4916,4922,4926,4942,4946,4954,4962,4973,4984,4989,5006,5010],{"__ignoreMap":325},[329,4911,4912,4914],{"class":331,"line":332},[329,4913,336],{"class":335},[329,4915,348],{"class":339},[329,4917,4918,4920],{"class":331,"line":343},[329,4919,336],{"class":335},[329,4921,356],{"class":339},[329,4923,4924],{"class":331,"line":351},[329,4925,378],{"emptyLinePlaceholder":32},[329,4927,4928,4930,4932,4934,4936,4938,4940],{"class":331,"line":359},[329,4929,950],{"class":335},[329,4931,953],{"class":390},[329,4933,476],{"class":335},[329,4935,479],{"class":443},[329,4937,4320],{"class":390},[329,4939,492],{"class":491},[329,4941,495],{"class":390},[329,4943,4944],{"class":331,"line":367},[329,4945,378],{"emptyLinePlaceholder":32},[329,4947,4948,4950,4952],{"class":331,"line":375},[329,4949,2764],{"class":390},[329,4951,302],{"class":443},[329,4953,758],{"class":390},[329,4955,4956,4958,4960],{"class":331,"line":381},[329,4957,3721],{"class":390},[329,4959,529],{"class":443},[329,4961,515],{"class":390},[329,4963,4964,4966,4968,4971],{"class":331,"line":399},[329,4965,3730],{"class":443},[329,4967,482],{"class":390},[329,4969,4970],{"class":491},"\"12345\"",[329,4972,495],{"class":390},[329,4974,4975,4977,4979,4982],{"class":331,"line":404},[329,4976,3741],{"class":443},[329,4978,482],{"class":390},[329,4980,4981],{"class":491},"\"Example User\"",[329,4983,495],{"class":390},[329,4985,4986],{"class":331,"line":420},[329,4987,4988],{"class":1313},"        \u002F\u002F Any arbitrary traits which can be referenced in targeting rules\n",[329,4990,4991,4994,4996,4999,5001,5004],{"class":331,"line":429},[329,4992,4993],{"class":443},"        trait",[329,4995,482],{"class":390},[329,4997,4998],{"class":491},"\"region\"",[329,5000,488],{"class":390},[329,5002,5003],{"class":491},"\"North America\"",[329,5005,495],{"class":390},[329,5007,5008],{"class":331,"line":434},[329,5009,1003],{"class":390},[329,5011,5012],{"class":331,"line":449},[329,5013,495],{"class":390},[319,5015,5017],{"className":564,"code":5016,"filename":1011,"language":567,"meta":325,"style":325},"import com.configdirector.ConfigDirectorClient;\nimport com.configdirector.ConfigDirectorContext;\n\nConfigDirectorClient client = new ConfigDirectorClient(getApplicationContext(), \"YOUR-CLIENT-SDK-KEY\");\n\nConfigDirectorContext context = ConfigDirectorContext.builder()\n    .id(\"12345\")\n    .name(\"Example User\")\n    \u002F\u002F Any arbitrary traits which can be referenced in targeting rules\n    .trait(\"region\", \"North America\")\n    .build();\n\nclient.initialize(context, () -> Log.i(\"MyApp\", \"ConfigDirector ready: \" + client.isReady()));\n",[177,5018,5019,5035,5051,5055,5081,5085,5103,5121,5139,5144,5171,5179,5183],{"__ignoreMap":325},[329,5020,5021,5023,5025,5027,5029,5031,5033],{"class":331,"line":332},[329,5022,336],{"class":574},[329,5024,598],{"class":577},[329,5026,456],{"class":581},[329,5028,603],{"class":577},[329,5030,456],{"class":581},[329,5032,608],{"class":577},[329,5034,591],{"class":581},[329,5036,5037,5039,5041,5043,5045,5047,5049],{"class":331,"line":343},[329,5038,336],{"class":574},[329,5040,598],{"class":577},[329,5042,456],{"class":581},[329,5044,603],{"class":577},[329,5046,456],{"class":581},[329,5048,625],{"class":577},[329,5050,591],{"class":581},[329,5052,5053],{"class":331,"line":351},[329,5054,378],{"emptyLinePlaceholder":32},[329,5056,5057,5059,5061,5063,5065,5067,5069,5071,5073,5075,5077,5079],{"class":331,"line":359},[329,5058,608],{"class":577},[329,5060,953],{"class":390},[329,5062,476],{"class":335},[329,5064,720],{"class":719},[329,5066,479],{"class":443},[329,5068,482],{"class":581},[329,5070,4396],{"class":443},[329,5072,4399],{"class":581},[329,5074,733],{"class":732},[329,5076,736],{"class":491},[329,5078,739],{"class":732},[329,5080,742],{"class":581},[329,5082,5083],{"class":331,"line":367},[329,5084,378],{"emptyLinePlaceholder":32},[329,5086,5087,5089,5092,5094,5097,5099,5101],{"class":331,"line":375},[329,5088,625],{"class":577},[329,5090,5091],{"class":390}," context ",[329,5093,476],{"class":335},[329,5095,5096],{"class":390}," ConfigDirectorContext",[329,5098,456],{"class":581},[329,5100,768],{"class":443},[329,5102,462],{"class":581},[329,5104,5105,5108,5110,5112,5114,5117,5119],{"class":331,"line":381},[329,5106,5107],{"class":581},"    .",[329,5109,535],{"class":443},[329,5111,482],{"class":581},[329,5113,739],{"class":732},[329,5115,5116],{"class":491},"12345",[329,5118,739],{"class":732},[329,5120,495],{"class":581},[329,5122,5123,5125,5128,5130,5132,5135,5137],{"class":331,"line":399},[329,5124,5107],{"class":581},[329,5126,5127],{"class":443},"name",[329,5129,482],{"class":581},[329,5131,739],{"class":732},[329,5133,5134],{"class":491},"Example User",[329,5136,739],{"class":732},[329,5138,495],{"class":581},[329,5140,5141],{"class":331,"line":404},[329,5142,5143],{"class":1313},"    \u002F\u002F Any arbitrary traits which can be referenced in targeting rules\n",[329,5145,5146,5148,5151,5153,5155,5158,5160,5162,5164,5167,5169],{"class":331,"line":420},[329,5147,5107],{"class":581},[329,5149,5150],{"class":443},"trait",[329,5152,482],{"class":581},[329,5154,739],{"class":732},[329,5156,5157],{"class":491},"region",[329,5159,739],{"class":732},[329,5161,729],{"class":581},[329,5163,733],{"class":732},[329,5165,5166],{"class":491},"North America",[329,5168,739],{"class":732},[329,5170,495],{"class":581},[329,5172,5173,5175,5177],{"class":331,"line":429},[329,5174,5107],{"class":581},[329,5176,529],{"class":443},[329,5178,705],{"class":581},[329,5180,5181],{"class":331,"line":434},[329,5182,378],{"emptyLinePlaceholder":32},[329,5184,5185,5187,5189,5191,5193,5195,5197,5199,5201,5203,5205,5207,5209,5211,5213,5215,5217,5219,5221,5223,5225,5227,5229,5231],{"class":331,"line":449},[329,5186,4426],{"class":390},[329,5188,456],{"class":581},[329,5190,302],{"class":443},[329,5192,482],{"class":581},[329,5194,2466],{"class":390},[329,5196,729],{"class":581},[329,5198,4439],{"class":581},[329,5200,797],{"class":407},[329,5202,800],{"class":390},[329,5204,456],{"class":581},[329,5206,805],{"class":443},[329,5208,482],{"class":581},[329,5210,739],{"class":732},[329,5212,812],{"class":491},[329,5214,739],{"class":732},[329,5216,729],{"class":581},[329,5218,733],{"class":732},[329,5220,821],{"class":491},[329,5222,739],{"class":732},[329,5224,826],{"class":335},[329,5226,663],{"class":390},[329,5228,456],{"class":581},[329,5230,306],{"class":443},[329,5232,835],{"class":581},[170,5234,5235,5236,5238],{},"The user context can also be updated via ",[177,5237,3685],{},":",[316,5240,5241,5351],{},[319,5242,5244],{"className":321,"code":5243,"filename":2757,"language":324,"meta":325,"style":325},"import com.configdirector.ConfigDirectorContext\n\nclient.updateContext(\n    ConfigDirectorContext.build {\n        id(\"654321\")\n        name(\"Another User\")\n        trait(\"region\", \"Australia\")\n    },\n)\n\n\u002F\u002F Update it to an anonymous context when a user signs out. Leaving `id` unset\n\u002F\u002F lets the SDK generate a random identifier for it.\nclient.updateContext(ConfigDirectorContext.build { anonymous(true) })\n",[177,5245,5246,5252,5256,5264,5272,5283,5294,5309,5313,5317,5321,5326,5331],{"__ignoreMap":325},[329,5247,5248,5250],{"class":331,"line":332},[329,5249,336],{"class":335},[329,5251,356],{"class":339},[329,5253,5254],{"class":331,"line":343},[329,5255,378],{"emptyLinePlaceholder":32},[329,5257,5258,5260,5262],{"class":331,"line":351},[329,5259,2764],{"class":390},[329,5261,3685],{"class":443},[329,5263,758],{"class":390},[329,5265,5266,5268,5270],{"class":331,"line":359},[329,5267,3721],{"class":390},[329,5269,529],{"class":443},[329,5271,515],{"class":390},[329,5273,5274,5276,5278,5281],{"class":331,"line":367},[329,5275,3730],{"class":443},[329,5277,482],{"class":390},[329,5279,5280],{"class":491},"\"654321\"",[329,5282,495],{"class":390},[329,5284,5285,5287,5289,5292],{"class":331,"line":375},[329,5286,3741],{"class":443},[329,5288,482],{"class":390},[329,5290,5291],{"class":491},"\"Another User\"",[329,5293,495],{"class":390},[329,5295,5296,5298,5300,5302,5304,5307],{"class":331,"line":381},[329,5297,4993],{"class":443},[329,5299,482],{"class":390},[329,5301,4998],{"class":491},[329,5303,488],{"class":390},[329,5305,5306],{"class":491},"\"Australia\"",[329,5308,495],{"class":390},[329,5310,5311],{"class":331,"line":399},[329,5312,1003],{"class":390},[329,5314,5315],{"class":331,"line":404},[329,5316,495],{"class":390},[329,5318,5319],{"class":331,"line":420},[329,5320,378],{"emptyLinePlaceholder":32},[329,5322,5323],{"class":331,"line":429},[329,5324,5325],{"class":1313},"\u002F\u002F Update it to an anonymous context when a user signs out. Leaving `id` unset\n",[329,5327,5328],{"class":331,"line":434},[329,5329,5330],{"class":1313},"\u002F\u002F lets the SDK generate a random identifier for it.\n",[329,5332,5333,5335,5337,5339,5341,5343,5345,5347,5349],{"class":331,"line":449},[329,5334,2764],{"class":390},[329,5336,3685],{"class":443},[329,5338,526],{"class":390},[329,5340,529],{"class":443},[329,5342,532],{"class":390},[329,5344,3842],{"class":443},[329,5346,482],{"class":390},[329,5348,1715],{"class":2842},[329,5350,543],{"class":390},[319,5352,5354],{"className":564,"code":5353,"filename":2981,"language":567,"meta":325,"style":325},"import com.configdirector.ConfigDirectorContext;\n\nclient.updateContext(\n    ConfigDirectorContext.builder()\n        .id(\"654321\")\n        .name(\"Another User\")\n        .trait(\"region\", \"Australia\")\n        .build(),\n    () -> Log.i(\"MyApp\", \"Context updated\"));\n\n\u002F\u002F Update it to an anonymous context when a user signs out. Leaving `id` unset\n\u002F\u002F lets the SDK generate a random identifier for it.\nclient.updateContext(\n    ConfigDirectorContext.builder().anonymous(true).build(),\n    () -> Log.i(\"MyApp\", \"Signed out\"));\n",[177,5355,5356,5372,5376,5386,5397,5414,5431,5456,5464,5496,5500,5504,5508,5518,5540],{"__ignoreMap":325},[329,5357,5358,5360,5362,5364,5366,5368,5370],{"class":331,"line":332},[329,5359,336],{"class":574},[329,5361,598],{"class":577},[329,5363,456],{"class":581},[329,5365,603],{"class":577},[329,5367,456],{"class":581},[329,5369,625],{"class":577},[329,5371,591],{"class":581},[329,5373,5374],{"class":331,"line":343},[329,5375,378],{"emptyLinePlaceholder":32},[329,5377,5378,5380,5382,5384],{"class":331,"line":351},[329,5379,4426],{"class":390},[329,5381,456],{"class":581},[329,5383,3685],{"class":443},[329,5385,758],{"class":581},[329,5387,5388,5391,5393,5395],{"class":331,"line":359},[329,5389,5390],{"class":390},"    ConfigDirectorContext",[329,5392,456],{"class":581},[329,5394,768],{"class":443},[329,5396,462],{"class":581},[329,5398,5399,5401,5403,5405,5407,5410,5412],{"class":331,"line":367},[329,5400,1061],{"class":581},[329,5402,535],{"class":443},[329,5404,482],{"class":581},[329,5406,739],{"class":732},[329,5408,5409],{"class":491},"654321",[329,5411,739],{"class":732},[329,5413,495],{"class":581},[329,5415,5416,5418,5420,5422,5424,5427,5429],{"class":331,"line":375},[329,5417,1061],{"class":581},[329,5419,5127],{"class":443},[329,5421,482],{"class":581},[329,5423,739],{"class":732},[329,5425,5426],{"class":491},"Another User",[329,5428,739],{"class":732},[329,5430,495],{"class":581},[329,5432,5433,5435,5437,5439,5441,5443,5445,5447,5449,5452,5454],{"class":331,"line":381},[329,5434,1061],{"class":581},[329,5436,5150],{"class":443},[329,5438,482],{"class":581},[329,5440,739],{"class":732},[329,5442,5157],{"class":491},[329,5444,739],{"class":732},[329,5446,729],{"class":581},[329,5448,733],{"class":732},[329,5450,5451],{"class":491},"Australia",[329,5453,739],{"class":732},[329,5455,495],{"class":581},[329,5457,5458,5460,5462],{"class":331,"line":399},[329,5459,1061],{"class":581},[329,5461,529],{"class":443},[329,5463,789],{"class":581},[329,5465,5466,5469,5471,5473,5475,5477,5479,5481,5483,5485,5487,5489,5492,5494],{"class":331,"line":404},[329,5467,5468],{"class":581},"    ()",[329,5470,797],{"class":407},[329,5472,800],{"class":390},[329,5474,456],{"class":581},[329,5476,805],{"class":443},[329,5478,482],{"class":581},[329,5480,739],{"class":732},[329,5482,812],{"class":491},[329,5484,739],{"class":732},[329,5486,729],{"class":581},[329,5488,733],{"class":732},[329,5490,5491],{"class":491},"Context updated",[329,5493,739],{"class":732},[329,5495,3050],{"class":581},[329,5497,5498],{"class":331,"line":420},[329,5499,378],{"emptyLinePlaceholder":32},[329,5501,5502],{"class":331,"line":429},[329,5503,5325],{"class":1313},[329,5505,5506],{"class":331,"line":434},[329,5507,5330],{"class":1313},[329,5509,5510,5512,5514,5516],{"class":331,"line":449},[329,5511,4426],{"class":390},[329,5513,456],{"class":581},[329,5515,3685],{"class":443},[329,5517,758],{"class":581},[329,5519,5520,5522,5524,5526,5528,5530,5532,5534,5536,5538],{"class":331,"line":465},[329,5521,5390],{"class":390},[329,5523,456],{"class":581},[329,5525,768],{"class":443},[329,5527,509],{"class":581},[329,5529,3842],{"class":443},[329,5531,482],{"class":581},[329,5533,1715],{"class":452},[329,5535,784],{"class":581},[329,5537,529],{"class":443},[329,5539,789],{"class":581},[329,5541,5542,5544,5546,5548,5550,5552,5554,5556,5558,5560,5562,5564,5567,5569],{"class":331,"line":470},[329,5543,5468],{"class":581},[329,5545,797],{"class":407},[329,5547,800],{"class":390},[329,5549,456],{"class":581},[329,5551,805],{"class":443},[329,5553,482],{"class":581},[329,5555,739],{"class":732},[329,5557,812],{"class":491},[329,5559,739],{"class":732},[329,5561,729],{"class":581},[329,5563,733],{"class":732},[329,5565,5566],{"class":491},"Signed out",[329,5568,739],{"class":732},[329,5570,3050],{"class":581},[3988,5572,5573],{},"html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_bVq, html code.shiki .s_bVq{--shiki-light:#9C3EDA;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .syTEX, html code.shiki .syTEX{--shiki-light:#FF5370;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":325,"searchDepth":343,"depth":343,"links":5575},[],{},"\u002F_partials\u002Fsdks\u002Fandroid\u002Fuser-context",{"description":4902},"_partials\u002Fsdks\u002Fandroid\u002Fuser-context","5lIqNMz3PuLkovdeh4pdBIv3Fjp2VBewhuBHYkPNQvU",1788747970114]