Development Team/Almanac/sugar.activity.activity: Difference between revisions
No edit summary |
|||
| Line 5: | Line 5: | ||
The activity id is sort of like the unix process id (PID). However, unlike PIDs it is only different for each new instance (with create_jobject = True set) and stays the same every time a user resumes an activity. This is also the identity of your Activity to other XOs for use when sharing. | The activity id is sort of like the unix process id (PID). However, unlike PIDs it is only different for each new instance (with create_jobject = True set) and stays the same every time a user resumes an activity. This is also the identity of your Activity to other XOs for use when sharing. | ||
You can use the get_id() method in the | You can use the get_id() method in the Activity class to get the activity id for your activity. Since most activities should inherit from the Activity class, you can actually just get a handle on the top level object for your activity and use that to call get_id. | ||
### TOOLBAREXAMPLE IS AN ACTIVITY THAT SUBCLASSES SUGAR'S ACTIVITY CLASS | ### TOOLBAREXAMPLE IS AN ACTIVITY THAT SUBCLASSES SUGAR'S ACTIVITY CLASS | ||