Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

How to open and close a webview on the basis of an event continuously

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am working on a retail store application in which I have to display a error screen on the monitor of a Billing counter if some backend apis are not working. So there is background recursive application which keeps pinging another api for status, if status if unsatisfactory if continuously show error page in webview on monitor so that it can't be used by any person. Once application receives OK response from another api it needs to terminate that error page. So this process keeps going.

I am able to display the error page but once my error page is displayed my background application is not able to proceed further and do recursive check and check for api status again. Once the webview is displayed, My main thread is not going further thread.sleep and recursive call to checkForAPIStatus.

Spring Boot Main File:-



To make it easy as of now instead of api status I have taken a random status from array.

BringupBanner class is as follows:



Can anybody please point out what's wrong here or if there is a better way to achieve this ?

Thanks
reply
    Bookmark Topic Watch Topic
  • New Topic