This class was deprecated
in API level 26.
ProgressDialog is a modal dialog, which prevents the
user from interacting with the app. Instead of using this class, you should
use a progress indicator like ProgressBar, which can
be embedded in your app's UI. Alternatively, you can use a
notification
to inform the user of the task's progress.