• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Unleash / unleash-android / 10095366255

25 Jul 2024 01:48PM CUT coverage: 82.415% (+0.1%) from 82.319%
10095366255

push

github

web-flow
fix(deps): update dependency androidx.activity:activity-compose to v1.9.1 (#67)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Gastón Fournier <gaston@getunleash.io>

209 of 284 branches covered (73.59%)

Branch coverage included in aggregate %.

644 of 751 relevant lines covered (85.75%)

5.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/unleashandroidsdk/src/main/java/io/getunleash/android/Unleash.kt
1
package io.getunleash.android
2

3
import io.getunleash.android.data.UnleashContext
4
import io.getunleash.android.data.Variant
5
import io.getunleash.android.events.UnleashListener
6
import java.io.Closeable
7

8
val disabledVariant = Variant("disabled")
13✔
9

10
interface Unleash: Closeable {
11
    fun isEnabled(toggleName: String, defaultValue: Boolean = false): Boolean
10✔
12

13
    fun getVariant(toggleName: String, defaultValue: Variant = disabledVariant): Variant
10✔
14

15
    /**
16
     * Set context and trigger a fetch of the latest toggles immediately and block until the fetch is complete or failed.
17
     */
18
    fun setContext(context: UnleashContext)
19

20
    /**
21
     * Set context and trigger a fetch of the latest toggles asynchronously
22
     */
23
    fun setContextWithTimeout(context: UnleashContext, timeout: Long = 5000)
×
24

25
    /**
26
     * Set context and trigger a fetch of the latest toggles asynchronously
27
     */
28
    fun setContextAsync(context: UnleashContext)
29

30
    fun addUnleashEventListener(listener: UnleashListener)
31

32
    /**
33
     * This function forces a refresh of the toggles from the server and wait until the refresh is complete or failed.
34
     * Usually, this is done automatically in the background, but you can call this function to force a refresh.
35
     */
36
    fun refreshTogglesNow()
37

38
    /**
39
     * This function forces a refresh of the toggles from the server asynchronously using the IO dispatcher.
40
     * Usually, this is done automatically in the background, but you can call this function to force a refresh.
41
     */
42
    fun refreshTogglesNowAsync()
43

44
    /**
45
     * This function forces send metrics to the server and wait until the send is complete or failed.
46
     * Usually, this is done automatically in the background, but you can call this function to force a send.
47
     */
48
    fun sendMetricsNow()
49

50
    /**
51
     * This function forces send metrics to the server asynchronously using the IO dispatcher.
52
     * Usually, this is done automatically in the background, but you can call this function to force a send.
53
     */
54
    fun sendMetricsNowAsync()
55

56
    fun isReady(): Boolean
57
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc