In activity that doesn't UI should finish itself by the time it returns from
onResume().  Leaving an activity running without UI will result in various
kinds of undesirable behavior.  Basically they should only be used to
immediately return a result, or immediately launch another activity.

On Thu, Feb 24, 2011 at 10:35 PM, Justin Anderson <magouyaw...@gmail.com>wrote:

> There are useful cases to having an Activity without a UI... I have two
> apps on the Android Market and both of them have an activity without a UI.
> In my case the activity does some processing to determine another activity
> to be launched.
>
> But in any case, the occurrence of it is common enough that Google provided
> a custom theme you can use for activities that don't display a UI:
> http://developer.android.com/reference/android/R.style.html#Theme_NoDisplay
>
> However, in my experience I get the best results using this theme:
>
> http://developer.android.com/reference/android/R.style.html#Theme_Translucent_NoTitleBar
>
>
> On Thu, Feb 24, 2011 at 5:56 AM, Dudero <sinfanh...@googlemail.com> wrote:
>
>> thank you marcin!
>>
>> On 24 Feb., 12:37, Marcin Orlowski <webnet.andr...@gmail.com> wrote:
>> > On 24 February 2011 11:53, Dudero <sinfanh...@googlemail.com> wrote:
>> >
>> > > But Dan Morrill sad on the Google IO 2008 presentation that an
>> > > Activity is "an encapsulation of a particular operation" and
>> > > "optionally associated with a window (UI)"
>> >
>> > People talk various things and it shall rarely be taken literally
>> > especially when someone is taking about technical things using
>> > marketing buzzwords :)
>> >
>> > > So my question is, which particular operations Mr. Morrill meant that
>> > > make more sense to use for this an Activity rather than a Service?
>> >
>> > You won't use service if you want user interaction and you won't use
>> > activity if you need background processing.
>> > Service is designed for different tasks than Activity so i am afraid
>> > this is quite academic question which leads nowhere.
>> >
>> > --
>> > Regards,
>> > Marcin
>>
>> --
>> 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
>>
>
>  --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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