Closed morarafrank closed 1 month ago
java.lang.AssertionError: Unsupported Service: phone
Thank you for reporting the issue, can you share a reproducible sample
@morarafrank no need of sharing a sample, the issue is with compose previews and I have reported the issue to Google, lets see how it goes:
Hey @morarafrank because we cannot use TelephonyManager
on preview, with the latest version of the library, on your preview just a default country code, it should work.
Example:
@Preview
@Composable
private fun Preview() {
ComposePickerTheme {
val state = rememberKomposeCountryCodePickerState(
defaultCountryCode = "ke",
)
KomposeCountryCodePicker(
modifier = Modifier.fillMaxWidth(),
text = "",
onValueChange = {},
state = state,
)
}
}