On Dec 17, 12:33 am, Dianne Hackborn <[email protected]> wrote:
> You should be nice.  As of 1.6, processes running in the background have
> their threads forced into a background scheduling class so they can't
> disrupt the foreground UI.

Why, that's good news. Soon as carriers upgrade the phones to 1.6 or
higher, I can remove some of my code. Unfortunately, Vodafone has
their Hero phones on 1.5 and they don't seem to plan to upgrade, I
guess the same is true for other carriers.
But anyway, it's a very good move to have background threads in a
lower priority.


>
> On Wed, Dec 16, 2009 at 3:05 PM, Christine <[email protected]>wrote:
>
>
>
> > I have two apps that use a service to upload and download files and
> > data. I've noticed that when the service gets very busy, it can cause
> > the UI to block, up to the point that Android shows a "force quit/
> > wait" popup. In order to avoid that, I run tasks in a service at a
> > lower priority. This way, the service will never cause the UI to
> > hickup. Also, the service stops if the app hasn't been used for a
> > certain number of minutes. I don't want to keep resources if the user
> > isn't using my app.
>
> > I have found that some of my users run apps that run services
> > permanently at normal priority. Such a service starts at phone switch
> > on, and keeps running indefinitely, downloading vast amounts of data.
> > My policy of being nice to other apps doesn't pay off: these agressive
> > third party services push my service away so it never gets anything
> > done. As one of my users told me, my app has hickups, until he kills
> > the service of this app X, after which my app runs smoothly, snappy,
> > and fast.
>
> > My question is, should I be nice to other apps and to the UI in my own
> > app, or should I just run a service and agressively take all resources
> > I need - or don't need? This is one issue where Android is different
> > from iPhone. We can run services, but by doing so, we can cause damage
> > to other peoples apps. Of course, my "question" doesn't require an
> > answer. I'm just curious after what other people think, what your
> > experience here is.
>
> > --
> > 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]<android-developers%[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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