@@ -88,6 +88,9 @@ public boolean shouldOverrideUrlLoading(WebView view, String urlString) {
8888 urlString = QueueUrlHelper .updateUrl (urlString , userId );
8989 Log .v ("QueueITEngine" , "URL intercepting: " + urlString );
9090 }
91+ if (isExitLineUrl (urlString )){
92+ broadcastUserExited ();
93+ }
9194 broadcastChangedQueueUrl (urlString );
9295 if (needsRewrite ){
9396 webview .loadUrl (urlString );
@@ -111,6 +114,17 @@ public boolean shouldOverrideUrlLoading(WebView view, String urlString) {
111114 }
112115 };
113116
117+ private boolean isExitLineUrl (String urlString ) {
118+ URL url = null ;
119+ try {
120+ url = new URL (urlString );
121+ } catch (MalformedURLException e ) {
122+ e .printStackTrace ();
123+ return false ;
124+ }
125+ return url .getPath ().equals ("/exitline.aspx" );
126+ }
127+
114128 private static void cleanupWebView (){
115129 if (previousWebView ==null ) return ;
116130 previousWebView .destroy ();
@@ -206,6 +220,11 @@ private void broadcastQueueActivityClosed() {
206220 LocalBroadcastManager .getInstance (QueueActivity .this ).sendBroadcast (intent );
207221 }
208222
223+ public void broadcastUserExited (){
224+ Intent intent = new Intent ("queue-user-exited" );
225+ LocalBroadcastManager .getInstance (QueueActivity .this ).sendBroadcast (intent );
226+ }
227+
209228 private void broadcastQueueError (String errorMessage ) {
210229 Intent intent = new Intent ("on-queue-error" );
211230 intent .putExtra ("error-message" , errorMessage );
0 commit comments