The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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.

This question is marked "community wiki".

asked 28 Mar '12, 11:16

katalun4o's gravatar image

katalun4o
331121521
accept rate: 85%

edited 06 Mar '13, 18:05

Graham%20Hurst's gravatar image

Graham Hurst
2.6k11843


permanent link

answered 28 Mar '12, 11:29

Graham%20Hurst's gravatar image

Graham Hurst
2.6k11843
accept rate: 28%

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);
(29 Mar '12, 02:51) katalun4o
Replies hidden
1

Set it using the setLivenessTimeout method on your SyncParms object.

(29 Mar '12, 10:01) Bill Somers
1

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.

(29 Mar '12, 12:42) Graham Hurst
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×266
×123
×75
×60
×59

question asked: 28 Mar '12, 11:16

question was seen: 4,621 times

last updated: 06 Mar '13, 18:05