The new home screen features a clock and a Google search box if one
scrolls to the left or right.
Also application icons can be placed on the home screen by long-
clicking them.
Question:
Is it possible for us to write custom gadgets for the home screen like
the clock or the Google search box? Is there a public API for this
purpose?
On Tue, Aug 19, 2008 at 1:07 AM, Peli <peli0...@googlemail.com> wrote:
> The new home screen features a clock and a Google search box if one > scrolls to the left or right.
> Also application icons can be placed on the home screen by long- > clicking them.
> Question: > Is it possible for us to write custom gadgets for the home screen like > the clock or the Google search box? Is there a public API for this > purpose?
Would it in principle be possible to write a new home screen that
offers a gadget API?
(i.e. do you see a technical possibility or possible problems
combining views from different apks in a single activity?)
What would be the best way to tackle this?
Peli
On 19 Aug., 10:08, "Romain Guy" <romain...@google.com> wrote:
> No, such an API does not exist and won't exist in 1.0.
> On Tue, Aug 19, 2008 at 1:07 AM, Peli <peli0...@googlemail.com> wrote:
> > The new home screen features a clock and a Google search box if one
> > scrolls to the left or right.
> > Also application icons can be placed on the home screen by long-
> > clicking them.
> > Question:
> > Is it possible for us to write custom gadgets for the home screen like
> > the clock or the Google search box? Is there a public API for this
> > purpose?
I don't know if there is enough support in the platform to let your application load widgets from other apks. Theoretically you could, but: - We do plan on having such an API in future versions - Your API would work only for your Home screen - There are some serious security concerns with this
The first two can be tackled once Android is open source but the last point is more difficult. Home usually runs with many permissions and widgets are basically foreign pieces of code that run in your process which can lead to a great amount of security issues.
If you are motivated, I encourage you to pursue this idea, but I don't think it is a trivial task.
On Tue, Aug 19, 2008 at 1:12 AM, Peli <peli0...@googlemail.com> wrote:
> Ok thanks.
> Would it in principle be possible to write a new home screen that > offers a gadget API? > (i.e. do you see a technical possibility or possible problems > combining views from different apks in a single activity?) > What would be the best way to tackle this?
> Peli
> On 19 Aug., 10:08, "Romain Guy" <romain...@google.com> wrote: >> No, such an API does not exist and won't exist in 1.0.
>> On Tue, Aug 19, 2008 at 1:07 AM, Peli <peli0...@googlemail.com> wrote:
>> > The new home screen features a clock and a Google search box if one >> > scrolls to the left or right.
>> > Also application icons can be placed on the home screen by long- >> > clicking them.
>> > Question: >> > Is it possible for us to write custom gadgets for the home screen like >> > the clock or the Google search box? Is there a public API for this >> > purpose?
> Home usually runs with many permissions and
> widgets are basically foreign pieces of code that run in your process
> which can lead to a great amount of security issues.
Indeed, ideally widgets should probably run as separate processes with
their own limited permissions - maybe as a service? The question is
how they could display themselves and interact with the user - maybe
through AIDL calls? Would this make sense?
> If you are motivated, I encourage you to pursue this idea, but I don't
> think it is a trivial task.
Indeed, and given your point 1 (you plan one for future versions) it
is questionable whether the effort would pay.. If at all, and if I
find other interested developers, it could be an OpenIntents
project :-)
> On Tue, Aug 19, 2008 at 1:12 AM, Peli <peli0...@googlemail.com> wrote:
> > Ok thanks.
> > Would it in principle be possible to write a new home screen that
> > offers a gadget API?
> > (i.e. do you see a technical possibility or possible problems
> > combining views from different apks in a single activity?)
> > What would be the best way to tackle this?
> > Peli
> > On 19 Aug., 10:08, "Romain Guy" <romain...@google.com> wrote:
> >> No, such an API does not exist and won't exist in 1.0.
> >> On Tue, Aug 19, 2008 at 1:07 AM, Peli <peli0...@googlemail.com> wrote:
> >> > The new home screen features a clock and a Google search box if one
> >> > scrolls to the left or right.
> >> > Also application icons can be placed on the home screen by long-
> >> > clicking them.
> >> > Question:
> >> > Is it possible for us to write custom gadgets for the home screen like
> >> > the clock or the Google search box? Is there a public API for this
> >> > purpose?
On Aug 19, 1:42 am, Peli <peli0...@googlemail.com> wrote:
> Indeed, ideally widgets should probably run as separate processes with
> their own limited permissions - maybe as a service? The question is
> how they could display themselves and interact with the user - maybe
> through AIDL calls? Would this make sense?
I expect we will add platform-level support for this in the future.
The main piece of work needed is a facility to distribute view
hierarchies across processes. With that in place, ActivityGroup/
LocalActivityManager could grow to allow you to instantiate activities
running in other processes, and embed their UI into the parent
activity's view hierarchy.
It's a non-trivial amount of work, but certainly possible at the
platform level. Trying to implement such a thing without modifying
the platform would be much more dicey. You could probably do
something simple with a service and sending bitmaps from it back to
the container... but that would be less than ideal. :}
> The main piece of work needed is a facility to distribute view
> hierarchies across processes.
Indeed, this would ideally be handled by the platform. So your work
after 1.0 will not be finished :-)
> You could probably do
> something simple with a service and sending bitmaps from it back to
> the container... but that would be less than ideal. :}
Good idea! Widgets usually don't update frequently (unless it is
something like a stop watch), so even if it is less than ideal, it
could be a simple start...
(At first I thought of passing all graphics primitives, but that would
probably be overkill... sending the whole bitmap seems possible)