Changes
Development Team/Almanac/sugar.activity.activity (view source)
Revision as of 15:45, 14 August 2008
, 15:45, 14 August 2008→Class: Activity
fd.close()
fd.close()
return data
return data
</pre>
=== How do I programmatically make my activity available for sharing? ===
Use the share() method that is included in the Activity class. This method takes a boolean argument that specifies whether the sharing should be private (only visible to those buddies that are invited to share) or public (visible to the entire neighborhood).
The following code shows how to share the activity with all buddies in your neighborhood:
<pre>
from sugar.activity import activity
...
class AnnotateActivity(activity.Activity):
#### Method: __init__, initialize this AnnotateActivity instance
def __init__(self, handle):
...
self.share(private=False)
...
</pre>
</pre>