How to make progressDialog keep running when already set on startForeground
I have a problem which is my progressDialog wont keep running if the application already loses it focused means the user press the home button and then the user press the application again then the progressDialog wont be there

here is my scenario Im using

for example

Main activity (in this activity where I create the progressDialog) --> start Intent service ---> after finishing the service then go to next activity ---> result activity

but during the process in intentService if the user go to home and then back to the application the progessDialog wont resume 

anyone know how to fix this thx .
How to make progressDialog keep running when already set on startForeground
===

I have a problem which is my progressDialog wont keep running if the application already loses it focused means the user press the home button and then the user press the application again then the progressDialog wont be there

here is my scenario Im using

for example

Main activity (in this activity where I create the progressDialog) --> start Intent service ---> after finishing the service then go to next activity ---> result activity

but during the process in intentService if the user go to home and then back to the application the progessDialog wont resume 

anyone know how to fix this thx .