Common beacon detection code added for all views.