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:
- 2025 year: Resolve class conflicts #AndroidMosaic
- 2025 year: Application level parameters in configuration #AndroidMosaic
- 2025 year: Create test with junit and pass or dismiss test before application launch #AndroidMosaic
- 2025 year: Ask special permission and listen answer #AndroidMosaic
- 2025 year: Service lifecycle #AndroidMosaic
- 2025 year: AtomicInteger and accept service callback in UI thread, stop progressBar that was run in UiThread #AndroidMosaic
- 2025 year: Generate random data and pass it to RecyclerView with Adapter #AndroidMosaic
- 2025 year: Pass data to new form with Intent and getParcelableExtra #AndroidMosaic
- 2025 year: Access to Contact list #AndroidMosaic
- 2025 year: Using Query and Cursor to read data sequence and fill DataAdapter for RecyclerView #AndroidMosaic
- 2025 year: Custom TabSwithcer #AndroidMosaic
- 2025 year: Custom Dropdownlist with default value based on Spinner #AndroidMosaic
- 2025 year: Create MMS service and route MMS to Emulator #AndroidMosaic
- 2025 year: Vector drawable - fastest way to create icons #AndroidMosaic
- 2025 year: Technique to create Button with own rectangle shape #AndroidMosaic
- 2025 year: Simple HTTP service #AndroidMosaic
- 2025 year: Simple key-value service with Local Storage #AndroidMosaic
- 2025 year: Cryptographic local storage key-value service #AndroidMosaic
- 2025 year: WebRTC service #AndroidMosaic
- 2025 year: SIP service #AndroidMosaic
- 2025 year: Global objects with references to all application services #AndroidMosaic

|