[ https://issues.apache.org/jira/browse/CB-9661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah updated CB-9661: --------------------------------- Component/s: AllPlugins > Plugins should be notified after deviceready event has been fired > ----------------------------------------------------------------- > > Key: CB-9661 > URL: https://issues.apache.org/jira/browse/CB-9661 > Project: Apache Cordova > Issue Type: Improvement > Components: AllPlugins > Affects Versions: 5.1.1 > Reporter: Sebastien Lorber > > I use the Intercom plugin. > It is a plugin that shows a little button at the bottom (that we'll call > "widget") that permits to show a native chat panel when the user wants to > give a feedback for our app. > On startup I run something akin to: > {code} > function deviceReady() { > hideSplashScreen(); > if ( isUserConnected() ) { > intercom.registerIdentifiedUser(userIntercomData); > startApp(); > } > else { > intercom.reset(); > showLoginForm(); > } > } > {code} > The widget is only shawn after calling intercom.registerIdentifiedUser(); > The widget disappear when we call intercom.reset(); > The intercom plugin memoizes the fact that an user is registered over time. > This means that if I kill the app with a registered user, and restart it, > Intercom will by default restore that regitered user on next startup. > Unfortunatly, this means that the widget will be shawn at the very beginning > of the app initialization, even before the webview is initialized. In my > case, it means that the Intercom button will be shawn for a little amount of > time above the splash screen, which is a bit weird. > This would make sense for the Intercom team to not show the widget until the > webview is initialized, particularly waiting for deviceready event to fire. > After discussing with the Intercom team, it seems they can't implement this > because there's no possible way to wait for the deviceready event to fire > from the native plugin code. > So I think it could be nice to be able, from the native plugin code, to wait > for the deviceready event to be handled, so that native code can be started > afterwards. > The original plugin issue: > https://github.com/intercom/intercom-cordova/issues/18 -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org