How to download the data from the OBD system ProgressDialog'm



  • I need to download data from the database to ArrayListin the second flow, accompanied by the DialogFragment'ом♪ Why would you do that?


    I wanted to do it. IntentServiseBut he's not friends with List'ами (So I get it). I missed the release in the second flow, stop the first, but ProgressDialog sleeps with the main flow. I've even tried to make it all up, but... ProgressDialog He won't be able to start and hang out with the main flow. ♪ ♪



  • Doing it through. AsyncTaskan example of:

    1. Let's get a class from here. AsyncTask
    2. We're building a class designer. ProgressDialog
    3. In method onPreExecute() for dialogue progressDialog.show()other activities - preparation of the reading of the OBD system, etc.
    4. In method doInBackground() Reading of OBD data in the cycle and at reading this.publishProgress()to be called onProgressUpdate() (see below)
    5. In method onProgressUpdate() increase the counter progressDialog.setProgress()
    6. In method onPostExecute() Covered progressDialog.dismiss()

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2