[Sugar-devel] Communication between two Activities

Gustavo Duarte gus.duarte at gmail.com
Wed May 20 10:11:41 EDT 2015


Thanks Gonzalo.

Because, the kind of messages to showing are html.


On Wed, May 20, 2015 at 10:50 AM, Gonzalo Odiard <godiard at sugarlabs.org> wrote:
> The notificator can write the notification to a file,
> and the activity can use Gio.FileMonitor to know when the file was updated.
>
> Just for curiosity, why not use the Sugar notifications?
>
> Gonzalo
>
> On Wed, May 20, 2015 at 10:43 AM, Gustavo Duarte <gus.duarte at gmail.com>
> wrote:
>>
>> Hi Gonzalo,
>>
>> Sure, I'll try explain the user case.
>>
>> Notificator: There is a Sugar Activity who shows Notification messages
>> for the kid.
>>
>> Daemon: There is an script running on cron, who get new notification
>> from a Server.
>>
>> I need communicate the Daemon with the Notificator, so when Daemon
>> receive a new notification from Server, it'll send a signal to
>> Notificator.
>>
>> Notificator when receive the signal, should refresh a widget.
>>
>>
>> I know a way to do that, using system signals, but i wonder if Sugar
>> has another way to achieve that.
>>
>> Thanks.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Wed, May 20, 2015 at 9:41 AM, Gonzalo Odiard <godiard at sugarlabs.org>
>> wrote:
>> > Hi Gustavo,
>> > I think would help if you explain the specific use case.
>> > The activity who will receive the message is a specific activity,
>> > and you will send it from a script or service?
>> > Can the activity just monitor a file or something like that?
>> >
>> > Gonzalo
>> >
>> >
>> > On Wed, May 20, 2015 at 9:27 AM, Gustavo Duarte <gus.duarte at gmail.com>
>> > wrote:
>> >>
>> >> Walter,
>> >>
>> >> There are two different activities, and the communication could be
>> >> asynchronous.
>> >>
>> >> I not sure, if the the  comment bellow, can confuse you, if yes,
>> >> please forget that.
>> >>
>> >> The process who send the message, could be  just a script, isn't
>> >> needed it be an Activity.
>> >>
>> >>
>> >> Thanks.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> On Wed, May 20, 2015 at 8:40 AM, Walter Bender
>> >> <walter.bender at gmail.com>
>> >> wrote:
>> >> > Gustavo,
>> >> >
>> >> > Are they two instances of the same activity or two different
>> >> > activities?
>> >> > Is
>> >> > the communication synchronous or asynchronous?
>> >> >
>> >> > -walter
>> >> >
>> >> > On Wed, May 20, 2015 at 6:35 AM, Gustavo Duarte
>> >> > <gus.duarte at gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> James,
>> >> >>
>> >> >> I should be more specific, sorry, in my case, the two Activities are
>> >> >> on the same computer.
>> >> >>
>> >> >> Sam,
>> >> >>
>> >> >> Are a thread about this, already ?
>> >> >>
>> >> >> Thanks.
>> >> >>
>> >> >> Gustavo
>> >> >>
>> >> >> On Wed, May 20, 2015 at 6:46 AM, Sam P. <sam.parkinson3 at gmail.com>
>> >> >> wrote:
>> >> >> > Hi James,
>> >> >> >
>> >> >> > Is this meant to be a reply to an existing thread?
>> >> >> >
>> >> >> > Thanks,
>> >> >> > Sam
>> >> >> >
>> >> >> > On Wed, May 20, 2015 at 12:01 PM James Cameron <quozl at laptop.org>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> Are the two activities on:
>> >> >> >>
>> >> >> >> - separate computers, or
>> >> >> >>
>> >> >> >> - the same computer?
>> >> >> >>
>> >> >> >> If the two activities are on separate computers, do they have the
>> >> >> >> same
>> >> >> >> bundle id?
>> >> >> >>
>> >> >> >> If the two activities are on the same computer, do they share the
>> >> >> >> same
>> >> >> >> display?
>> >> >> >>
>> >> >> >> --
>> >> >> >> James Cameron
>> >> >> >> http://quozl.linux.org.au/
>> >> >> >> _______________________________________________
>> >> >> >> Sugar-devel mailing list
>> >> >> >> Sugar-devel at lists.sugarlabs.org
>> >> >> >> http://lists.sugarlabs.org/listinfo/sugar-devel
>> >> >> >
>> >> >> >
>> >> >> > _______________________________________________
>> >> >> > Sugar-devel mailing list
>> >> >> > Sugar-devel at lists.sugarlabs.org
>> >> >> > http://lists.sugarlabs.org/listinfo/sugar-devel
>> >> >> >
>> >> >> _______________________________________________
>> >> >> Sugar-devel mailing list
>> >> >> Sugar-devel at lists.sugarlabs.org
>> >> >> http://lists.sugarlabs.org/listinfo/sugar-devel
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Walter Bender
>> >> > Sugar Labs
>> >> > http://www.sugarlabs.org
>> >> _______________________________________________
>> >> Sugar-devel mailing list
>> >> Sugar-devel at lists.sugarlabs.org
>> >> http://lists.sugarlabs.org/listinfo/sugar-devel
>> >
>> >
>> >
>> >
>> > --
>> > Gonzalo Odiard
>> >
>> > SugarLabs - Software for children learning
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
>
>
> --
> Gonzalo Odiard
>
> SugarLabs - Software for children learning


More information about the Sugar-devel mailing list