[Sugar-devel] Feature proposal: ability to start an activity from inside another

Sam Parkinson sam.parkinson3 at gmail.com
Tue Jan 21 15:48:50 EST 2014


This sounds like a great idea! I thought I might bring my 2 cents from
android development:

- Android has a really simple system where you can say go to
www.abc.blogs.org in any app that can open it. That opens it in a web
browser or in the blogs.org app if installed. This works because the
blogs.org app says it can handle these types of links in its manifest.
- With android you can also launch a set activity. You can pass these
activities bunches of data (a stuffed up version of a dictionary)
- You can also "start activity for result"

I like the idea of launching with a given object id. Maybe some of these
are helpful :) I like uri system.

On Jan 22, 2014 4:00 AM, "Manuel Quiñones" <manuq at laptop.org> wrote:

> This topic appears once in a while in this mailing list, and as far as
> I know, each time it happens no one objects.
> So, time to bring it again.
> One of Sugar key principles is simplicity.
> Activities are meant to be simple, and users can make interesting
> things happen when they interoperate with the activities.
> They do so by using the Journal and the Clipboard.
> However, there are cases where you want to start an activity from
> inside another, thus skipping the step through the Journal.
> For example, a user wants to download and read a book.  The current steps
> are:
> - start GetBooks activity
> - search for the book
> - download the book (get book)
> - show book in Journal
> - start Read activity from the Journal object
> If activities could start other activities, the steps are simpler:
> - start GetBooks activity
> - search for the book
> - download the book (get book)
> - start Read activity
> This limitation (among others) has made Ceibal find a replacement for
> GetBooks and Read, their own BibliotecaSegura.
> So I've been investigating a bit, and found that is preety easy to add
> this feature.
> In fact it is already possible.
> I was able to change GetBooks to open Read after a book is downloaded.
>  See:
> https://github.com/manuq/get-books/compare/open-activity
> This is a bit hackish,
> - imports a model from the shell
> - the bundle_id of the activity is hardcoded
> I think the more elegant option is to extend sugar-launch to something
> like:
>     sugar-launch --object_id object_id
> And reuse the code in the Journal that starts or resumes activities
> (misc.py).
> Thoughts?
> --
> .. manuq ..
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140122/354d5ee5/attachment.html>

More information about the Sugar-devel mailing list