void AttachHardwareButtonHandlers()
{
PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
if (frame != null)
{
PhoneApplicationPage page = frame.Content as PhoneApplicationPage;
if (page != null)
{
page.BackKeyPress += new EventHandler<CancelEventArgs>(page_BackKeyPress);
this.orientationHelper = new OrientationHelper(this.CordovaBrowser, page);
}
}
}