class PhoneNumberCollectionViewModel : AndroidViewModel
This ViewModel, along with its corresponding Fragment, handles phone number collection from the user.
The ViewModel handles the business logic.
<init> |
This ViewModel, along with its corresponding Fragment, handles phone number collection from the user. PhoneNumberCollectionViewModel(application: Application) |
phoneNumber |
var phoneNumber: MutableLiveData<String> |
isValidPhoneNumber |
fun isValidPhoneNumber(countryCode: Int, phoneNumber: String): Boolean |
prePopulateSavedPhoneNumber |
If a number has been previously entered, prepopulate the input field. phoneNumber is bound to the input field, so the input field will automatically update if found. fun prePopulateSavedPhoneNumber(context: Context): Unit |
savePhoneNumberLocally |
fun savePhoneNumberLocally(context: Context, phoneNumber: String): Unit |