public static ShowNewPublicUrlDialogFragment newInstance(String url) {
      ShowNewPublicUrlDialogFragment fragment = new ShowNewPublicUrlDialogFragment();

      Bundle args = new Bundle();
      args.putString(NEW_PUBLIC_URL, url);
      fragment.setArguments(args);

      return fragment;
    }
 public void onComplete(String url) {
   dialog.dismiss();
   if (url != null) {
     ShowNewPublicUrlDialogFragment.newInstance(url)
         .show(getFragmentManager(), "showNewPublicUrlDialog");
   } else {
     Toast.makeText(getActivity(), R.string.example_publish_show_url_revoked, Toast.LENGTH_LONG)
         .show();
   }
   ((ExampleActivity) getActivity()).reloadContent();
 }