Category : java

I have the following in my viewModel fun getUsernamePassword(inputUserName:String, inputPassword:String):List<User> = viewModelScope.launch(Dispatchers.IO) { return repository.getUsernamePassword(inputUserName, inputPassword) } However, I am getting an error saying Type mismatch. Required: List<User> Found:Job What can I do to solve this error. The ultimate goal is to have the function run on a non-black thread operate and a part from ..

Read more

I tried to change the visibility of the shared element (ImageView) in the transition listener. But the changes are applied only for a moment and then return to the original state. In this case, I have a photo viewer activity that starts with an shared element transition animation and I want to make the shared ..

Read more

Good evening! I am looking to add Firebase cloud messaging to my project (Android, Java). I have followed the documentation https://firebase.google.com/docs/cloud-messaging/android/client#retrieve-the-current-registration-token to a tee, but am still having issues retrieving the messaging token. Android studio claims Cannot resolve method ‘getToken’ in ‘FirebaseMessaging’ and will not compile. I assume I need to write a method getToken(), ..

Read more