I am using Firebase Auth for my app, in some devices it throws me that error, my firebase dependencies are 9.6.1.
1:Can i do something against this?
2:The onComplete never gets called so i cant know if the user doesnt support this, how could i handle it?
3:Are there a lot of devices with version of google play services lower than that?
Thanks
I'd recommend lowering the Google Play Services version you use in your app: unless you specifically need something in a later version of Play Services? It shouldn't cause a problem for your app, but should solve the issue with users needing an update.
During app initialization, your code should call GoogleApiAvailability.makeGooglePlayServicesAvailable(). The invoked processing:
Attempts to make Google Play services available on this device. If Play Services is already available, the returned Task may complete immediately.
If it is necessary to display UI in order to complete this request (e.g. sending the user to the Google Play store) the passed Activity will be used to display this UI.
It is recommended to call this method from onCreate(Bundle). If the passed Activity completes before the returned Task completes, the Task will fail with a CancellationException.
Example use in onCreate()
of main Activity:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
GoogleApiAvailability.getInstance().makeGooglePlayServicesAvailable(this)
.addOnCompleteListener(this, new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()) {
Log.d(TAG, "onComplete: Play Services OKAY");
} else {
// Show the user some UI explaining that the needed version
// of Play Services could not be installed and the app can't run.
}
}
});
...
}
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I am trying to convert a java object to json using GsonBut when i tried printing it out
When I view quick documentation, this comes up
I am new to ajax/jquery and I wonder if I can store a username in a database and live update the likes cound on my websiteSo:
I want to detect visitor's mobile device model and return only these "android, desktop, ipad, or iphone"