이게 소스 입니다.
new AsyncTask<Void, Void, Void>() {
protected void onPreExecute() {
}
protected Void doInBackground(Void... arg0) {
HttpPostData();//실행 함수
return null;
}
protected void onProgressUpdate(Void... progress) {
}

protected void onPostExecute(Void tempData) {
Builder = new AlertDialog.Builder(MainActivity.this);
Builder.setTitle("App update");
Builder.setMessage("마켓 연결");
Builder.setPositiveButton("YES",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int whichButton) {
// 마켓 연결
Intent intent = new Intent(
Intent.ACTION_VIEW,
Uri.parse("주소"));
startActivity(intent);
}
});
Builder.setNeutralButton("NO",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int whichButton) {
}
});
Builder.setCancelable(false);
Dialog = Builder.create();
Dialog.show();
}

protected void onCancelled() {
}
}.execute(); // <-- 시작


일단 제가 하고자 하는 의도는 A 엑티비티에서 B엑티비티로 넘어가도  어느 엑티비티에서건 
함수가 처리되어 결과가 넘어가면 다이얼로그를 띄우는 것입니다.
다이얼로그는 static으로 A 엑티비티에서 선언 했습니다.
오류가 뜨는데 제가 생각하지 못하는 부분이 있을까 하여 질문 드립니다.
비동기로 함수를 실행하고  다이얼로그를 실행 하려합니다.
windowmanager 설정을 먼가 해줘야 할거 같다는 생각이 들긴 하지만
멀 건드려야 할지 몰라 조언을 얻고자 올렸습니다.


그리고 AsyncTask가 제대로 쓴건지는 모르겠지만;;
틀렸다면 어떻게 써야 좋을지 조언도 해주시면 감사하구요 (__)
혹여 비동기를 쓰지 말고 다른걸 써라 이런 글도 좋습니다.