NeoDay Android SDK - Loyalty Card

The NeoDaySDK factory methods are executed asynchronously in order to fetch the data and return a NeoDayViewController.

/**
* @param completion returns NeoDayViewController or an ExceptionException
*/
fun makeLoyaltyCard(completion: (Result<NeoDayViewController>) -> Unit)

Directly requesting a Loyalty Card screen

val vc = remember { mutableStateOf<NeoDayViewController?>(null) }
neoDaySDK.makeLoyaltyCard { result ->
    try {
        vc.value = result.getOrThrow()
    } catch (ex: Exception) {
        ex.printStackTrace()
    }
}
vc.value?.getView()?.invoke()