(FRONT) FRONT (2025)

AtomicInteger and accept service callback in UI thread, stop progressBar that was run in UiThread

I used AtomicInteger because I have a number of services that started asynchronously and each of services started with own thread.



When each services started, connectedServicesCount increase to one and only number reach START_SERVICES going to next activity is possible. Reference to all service stored in Global objects with references to all application services and next Activity can use any of services of my application.


Second critical technology is create new thread with Lambda expression and show/stop progress Bar in UI thread. This technology is very similar to working with Windows Desktop Updating StatusLabel from the BackGroundWorker thread - an example of using Action, Delegate, Invoke, AddressOf, Extension, Expression..

But, pay attention, because provision server is not working correctly now, I changed code only for demonstrate how to use ProgressBar.



Of course, we need correctly define ProgressBar in Layout.






AndroidMosaic context:



Comments ( )
<00>  <01>  <02>  <03>  <04>  <05>  <06>  <07>  <08>  <09>  <10>  <11>  <12>  <13>  <14>  <15>  <16>  <17>  <18>  <19>  <20>  <21>  <22>  <23>  <24>  <25
Link to this page: http://www.vb-net.com/AndroidMosaic/Index06.htm
<TAGS>  <ARTICLES>  <FRONT>  <CORE>  <MVC>  <ASP>  <NET>  <DATA>  <TASK>  <XML>  <KIOSK>  <NOTES>  <SQL>  <LINUX>  <MONO>  <FREEWARE>  <DOCS> <TRAVELS> <FLOWERS> <RESUME> < THANKS ME>