On Tue, Nov 16, 2010 at 12:05 PM, Hemant <[email protected]> wrote: > Hi, > > I have a scenario where I need to control how many retries are allowed > per hour for data connection establishment in case of failure? > > How can this be achieved? > > There is something like nextReconnectDelay in > GsmDataConnectionTracker.java, but can't figure out how to reconfigure > this so as to reduce number of reconnection attempts?
This class is in com.android.internal.* package, so how are you trying to use it? There is a timeout in Socket.connect(SocketAddress address, int timeout), which will block for the timeout period trying to reconnect or will throw IOException, when things did not go well. React to both of those scenarios and wait some time between next attempt to connect. You could also set the max number of attempts, before longer wait kicks in. Daniel -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

