[Sugar-devel] Getting the dbus name from activity.info

Bert Freudenberg bert at freudenbergs.de
Tue Jun 23 05:42:56 EDT 2009


On 23.06.2009, at 04:15, Benjamin M. Schwartz wrote:

> Benjamin M. Schwartz wrote:
>> Is there some easy sugar library call to get the dbus name  
>> specified in
>> activity.info?
>
> Oh, the perils of asking the list.
>
> The answer is: the Activity class already provides a  
> self.get_bundle_id()
> method that returns the dbus name as a string.  Problem solved.

Except that this is not the dbus name of your activity. Otherwise you  
could not have two instances running at the same time, the bundle_id  
is the same for all instances.

The dbus service name actually looks like
org.laptop.Activity6f7f3acacca87886332f50bdd522d805f0abbf1f
where 6f7f3acacca87886332f50bdd522d805f0abbf1f is the activity_id as  
passed on the command line. See

http://wiki.laptop.org/go/Low-level_Activity_API

- Bert -




More information about the Sugar-devel mailing list