Whenever I use trySilentLogin(), the call freezes the UI for up to ~1500-3000ms.
Device: Nexus 4 LG
SO: Android 7.x
04-10 12:15:43.774 24113 24235 W PluginManager: THREAD WARNING: exec() call to GooglePlus.trySilentLogin blocked the main thread for 2001ms. Plugin should use CordovaInterface.getThreadPool().
if (apiConnect.isSuccess()) {
handleSignInResult(Auth.GoogleSignInApi.silentSignIn(this.mGoogleApiClient).await());
}
by:
cordova.getThreadPool().execute(new Runnable() {
public void run() {
try{
if (apiConnect.isSuccess()) {
handleSignInResult(Auth.GoogleSignInApi.silentSignIn(mGoogleApiClient).await());
}
}catch(Exception e){
e.printStackTrace();
}
}
});
the same message apperars, but the blocking time decreases to ~30-100ms:
04-10 12:15:43.774 24113 24235 W PluginManager: THREAD WARNING: exec() call to GooglePlus.trySilentLogin blocked the main thread for 86ms. Plugin should use CordovaInterface.getThreadPool().
Is it worth to change it? May it cause any problem?
I've been using this change for a week, and seems to work well.
Hi,
Whenever I use trySilentLogin(), the call freezes the UI for up to ~1500-3000ms. Device: Nexus 4 LG SO: Android 7.x
04-10 12:15:43.774 24113 24235 W PluginManager: THREAD WARNING: exec() call to GooglePlus.trySilentLogin blocked the main thread for 2001ms. Plugin should use CordovaInterface.getThreadPool().
After change this in https://github.com/EddyVerbruggen/cordova-plugin-googleplus/blob/master/src/android/GooglePlus.java#L181:
by:
the same message apperars, but the blocking time decreases to ~30-100ms: 04-10 12:15:43.774 24113 24235 W PluginManager: THREAD WARNING: exec() call to GooglePlus.trySilentLogin blocked the main thread for 86ms. Plugin should use CordovaInterface.getThreadPool().
Is it worth to change it? May it cause any problem? I've been using this change for a week, and seems to work well.