title: Show dialog only using Context instead of Activity instance
body: <p>I could show dialog if I uses an Activity instance but when I uses Context or Application Context instance Dialog is not showing.</p>
  
  <pre><code>AlertDialog.Builder builder = new AlertDialog.Builder(activity);
              builder.setTitle(title);
              builder.setMessage(msg);
  
              if (null != positiveLabel) {
                  builder.setPositiveButton(positiveLabel, new DialogInterface.OnClickListener() {
  
                      @Override
                      public void onClick(DialogInterface dialog, int which) {
  
                          dialog.cancel();
                          if (null != listener) {
                              listener.onOk();
                          }
                      }
                  });
              }
  
              if (null != negativeLable) {
                  builder.setNegativeButton(negativeLable, new DialogInterface.OnClickListener() {
  
                      @Override
                      public void onClick(DialogInterface dialog, int which) {
  
                          dialog.cancel();
                          if (null != listener) {
                              listener.onCancel();
                          }
                      }
                  });
              }
  
              builder.create().show();
  </code></pre>
  
  <p>Can you please give me a solution to show dialog without using Activity instance</p>