I have an Android app and I start my app with MyApp.java where I declare everything and it is my starting point of app.
In `onCreate()`, I start a service with intent.

I also create an instance of service and try to access the service object inside countdown timer `onFinish()` as - 

```
MYService myService = new MYService();
myService.getDialog();

```

And in MYService, I have this method as - 

```
public void showMsg(){
        AlertDialog alertDialog = new AlertDialog.Builder(getApplication())
                .setTitle("Success!")
                .setMessage("Countdown")
                .setPositiveButton("Success", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                    }
                }).create();

        alertDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
        alertDialog.show();
    }

```

My Goal is whichever part of app I am in like whichever activity or fragment, I must be able to get this alertdialog after 5 seconds of countdown timer.
How do I achieve this?