> Do you really need to have a socket open at all times?
yes, my application is based on push technique for which I always need
to keep it open

>only keep the socket open while the user is actually using the application.
yup I am doing it. Actually the fuctionality of app includes
minimization of app and still listening to server push.


On Jul 15, 6:24 pm, Miguel Morales <[email protected]> wrote:
> Do you really need to have a socket open at all times?  Why not
> periodically check the server using an Alarm, or only keep the socket
> open while the user is actually using the application.  Also, any loop
> will drain your battery, you might try sleeping at the end of it.
>
>
>
> On Thu, Jul 15, 2010 at 5:39 AM, Namrata <[email protected]> wrote:
> > Thanks Mark..
>
> > On Jul 15, 5:06 pm, Mark Murphy <[email protected]> wrote:
> >> On Thu, Jul 15, 2010 at 7:56 AM, Namrata <[email protected]> wrote:
> >> > any answer?..This is blocking issue for me as it drains batter in
> >> > couple of hours.
>
> >> You may wish to watch the C2DM presentation from Google I|O 2010, as
> >> they provide a few hints on how they try to minimize battery usage.
>
> >> --
> >> Mark Murphy (a Commons 
> >> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> >> _Android Programming Tutorials_ Version 2.9 Available!
>
> > --
> > 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
>
> --http://developingthedream.blogspot.com/,http://diastrofunk.com,http://www.youtube.com/user/revoltingx,
>  ~Isaiah 55:8-9

-- 
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

Reply via email to