While working on a new plugin for mobile, I can see that the examples (certificate, in particular) register a link handler along with a content handler, using a statement like:
What is this handler for? Where is it actually used?
I believe it parses links and determines if they should be redirected to a page in the Mobile app.
i.e. if someone linked to http://yoursite.com/mod/youractivity/view.php in some text on yoursite.com and was accessing it in the Mobile app then the youractivity link handler would redirect it to the main view page in the app for youractivity
Looking at two examples of modules that use the "registerLinkHandler", I see two very different ways of implementing it:
For the certificate, the main.js uses
While the feedback module's main.js uses:
Note that the feedback version has an ":index" in the definition statement.
Then in the handlers.js, the certificate has a series of functions defined to handle the links, while the feedback has only one line of code:
self.indexLinksHandler = $mmContentLinksHelper.createModuleIndexLinkHandler('mmaModFeedback', 'feedback', $mmaModFeedback);
Is the feedback version a "shortcut" that can be used instead of all of the code used in the certificate module?
Dani Palou pointed to the current way of implementing them at: https://github.com/moodlehq/moodlemobile2/blob/master/www/addons/mod/forum/services/handlers.js#L161
It made implementing a handler for the view.php very simple.
as Neill explained, we changed the way to implement these links handlers to make it easier for developers. You should implement it like it's done in feedback.
Neill is right about the ":index" too, it's to make sure the name is unique. This name is only used to identify the handler, it isn't used for anything else. With the old implementation of links handler, the modules had a single handler to treat all the possible links of your module. With the new implementation, the addons will have a link handler for each type of link, that's why we add those prefixes to make each name unique.