Difference between revisions of "Development Team/Almanac/sugar.activity.activityfactory"
< Development Team | Almanac
Jump to navigation
Jump to search
m (3 revisions) |
m (moved Walter is a wanker 12/Almanac/sugar.activity.activityfactory to Development Team/Almanac/sugar.activity.activityfactory over redirect: revert) |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{Almanac}} |
=== How do I start up another sugar activity programmatically? === | === How do I start up another sugar activity programmatically? === |
Latest revision as of 20:32, 23 February 2010
For Developers: almanac · api · bugs · gitorious · cgit · download · people · OLPC: wiki · activities · trac · cgit · build index · repository · firmware · Fedora: packages
How do I start up another sugar activity programmatically?
The sugar.activity.activityfactory package has a convenience function called create() that you can call to start up a new instance of a particular activity. You simply need to pass the create() function the service name of the activity you desire. The service name can usually be obtained by looking in the activity.info file of the activity in question.
#Start up a new instance of the Web activity. activityfactory.create('org.laptop.WebActivity')