Hello!

Task: The application should run in the background and perform any computational operations (imitation of work or data exchange between the components of the device). At the same time it would be possible to set the period of work and idle time (the period of "impulses" and their duration).

How can this imitation activity be implemented?

Added: These same periods should be specified via the configuration file. For example, the “first number” is the period of the “impulses” following (essentially, the idle time), the “next numbers” is the duration of the work (i.e. the duration of the “impulse”).

Objective: To measure EMR (e-mag. Radiation) during the operation of this background application.

Thanks for attention!

  • one
    something like this Thread.sleep (1000); will stop the flow in which it will be called for 1 second - andreich
  • one
    You can make such an imitation using AsyncTask. This will allow you not to let the UI + hang. You can show progress by updating the UI. - Kostya Bakay

0