cancel
Showing results for 
Search instead for 
Did you mean: 

Mobilink Connection Timeout

Former Member
0 Kudos
6,954

Hello, Is there a way to set a connection timeout on my mobile app when trying to synchronize with mobilink server. When my mobilink server is down the application freezes for more than a minute.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
Former Member
0 Kudos

I cannot find out how to set this parameter, i am using it in android application

        SyncParms syncParms = _conn.createSyncParms(SyncParms.HTTP_STREAM,"sa", "SyncModel");
        syncParms.getStreamParms().setHost(PreferencesUtil.IP);
        syncParms.getStreamParms().setPort(PreferencesUtil.Port);
        syncParms.setPublications("MyPublication");
        _conn.synchronize(syncParms);

Set it using the setLivenessTimeout method on your SyncParms object.

Former Member

You might also want to add a progress indication "dialog" with an option to cancel. It would need to implement SyncObserver and have the syncProgress method return false to continue or true to cancel.

Also, if your app "freezes" are you not using a worker thread?

Even though it doesn't implement an observer or use a separate worker thread for synchronization, you might be interested in Tom Slee's push sample using UltraLiteJ on Android.

Answers (0)