Yes. it worked..first the stack threw an exception..and then this nested
exception:
Caused by: java.net.BindException: Cannot assign requested address: Datagram
send failed


On Thu, Sep 10, 2009 at 6:28 PM, Android Development <indodr...@gmail.com>wrote:

> >And *that* explains a lot!
> lol !!
>
> Thanks Mark.
> I am exploring another work around. When i start my stack, I bind it to a
> well defined IP and port.
>
> If IP connectivity is lost, then the stack should throw an exception. I am
> thinking of testing it out...catching that exception and then triggering the
> cleanup job. This way i can avoid the expensive Wake Lock.
>
>
> On Thu, Sep 10, 2009 at 6:22 PM, Mark Murphy <mmur...@commonsware.com>wrote:
>
>>
>> Android Development wrote:
>> > Ok, i will tell what the application is supposed to do. It is a SIP
>> > client.
>>
>> And *that* explains a lot!
>>
>> > As per the standard procedures that i am following, whenever
>> > there is loss of radio connectivity with the base station / data
>> > connectivity with the underlying IP network, I need to clean up my SIP
>> > registration state and any transient state that may have been maintained
>> > (eg: if a call was in progress then i need to clean up the call state,
>> > state maintained due to subscription to network side resources etc). So,
>> > basically its a clean up job.
>>
>> That makes sense.
>>
>> > This is also a possible alternative. But if this connectivity was lost
>> > during the course of a SIP call, then i need to 'drop' the call, clean
>> > up its FSM and stop RTP flow.
>>
>> Yes.
>>
>> I am not a SIP expert by any means, though I use onSIP and Twinkle for
>> my office line. My hope is that you will only need the WakeLock during
>> the call for the cleanup process, and that the rest of Android will
>> "just work" to give you control if, say, a call comes in while the phone
>> is otherwise asleep. However, I have not tried any stateful socket
>> connections -- all of my work has been with nice transient Web services.
>> And, like I said, I am not a SIP expert and do not know the details of
>> the protocol.
>>
>> If you can get by with the WakeLock and monitoring the connectivity
>> state only during the call, you should not be too bad on the battery.
>> If, on the other hand, you need to monitor the connectivity state all
>> the time, battery life will suffer, but a SIP client is at least a
>> decent justification for it.
>>
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com | http://twitter.com/commonsguy
>>
>> Android Development Wiki: http://wiki.andmob.org
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to