Added an example for the navigator api.