In a previous chapter, we created a Publisher Action to mark a Contestant as a DNF (Did not Finish) object easily from a Chatter feed. This leveraged the declarative approach to creating Publisher Actions, based on creating or updating a related record. If your use case does not fit into this type of operations, you can use Visualforce page to develop a Custom Publisher Action. Keep in mind that these are also available to your users through the Salesforce1 mobile application.
At the time of writing this, there is no API support to determine what context the page is running in, other than sensing the HTTP User Agent header value and adjusting the layout and styling accordingly. As Salesforce continues to improve their API's around Salesforce1, hopefully, this will be improved soon.