OfflineMode on Touchkit

Hi everyone in the community,

I am working on a project built by Vaadin7 and Touchkit addon, It worked great in everthing but the OfflineMode.
We got an application that takes time to start with, say 15 seconds, and in this case the browser page will load for a while and show a crying face with “The server cannot be reached” and “The application didn’t start properly.”, refreshing the page then the app works fine. After much googleing and checking the problem seems to be from the OfflineMode feature of Touchkit Addon, To get rid of the faulty page, I tried to disbale offline mode by using

OfflineMode offlineMode = new OfflineMode(); offlineMode.extend(this); offlineMode.setOfflineModeEnabled(true); in the init() call of my UI class, but it does not work.

Later I found the erro is actually throw from OfflineModeEntrypoint class in com.vaadin.addon.touchkit.gwt.client.offlinemode package, where in onMoudleLoad() method, there is

[code]
new Timer() {
@Override
public void run() {
if (ApplicationConfiguration.getRunningApplications()
.isEmpty()
|| !ApplicationConfiguration
.getRunningApplications().get(0)
.isApplicationRunning()) {
if (!getOfflineMode().isActive()) {
getOfflineMode()
.activate(
new OfflineModeActivationEventImpl(
“The application didn’t start properly.”,
ActivationReason.ONLINE_APP_NOT_STARTED));
}

                }
            }
        }.schedule(5000);

[/code]Seems it waits for 5 seconds to check if the application have not been loaded up and then check if offlineMode is actived?, if not then it will active the offlineMode with the above error message.

Can anyone help me on this case that how can I just put my app in to waiting state (or loading state) but fall in to offlineMode when it is starting slowly. If theres anything I missed, thanks for pointing out.

Best appreciation,