This needs to be in activity-only code
Some casting for happy error handling
Easier this way