안녕하세요.
지금 된것은 push가 오면 - > toast 로 띄우는 것까지 되어서
toast가 아닌 alertdialog 를 띄우고 싶어서 시도를 하고있는데 어플이 강제로 종료가 됩니다..
잘못된 부분 지적 부탁드립니다.
일단 cause 라고 검색하면 나오는 오류 코드는
06-11 17:25:10.873: D/RegisteredAidCache(1708): Not updating routing table because NFC is off.
06-11 17:25:11.803: W/chromium(8280): [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation
입니다..
소스입니다...
protected void onMessage(Context context, Intent intent) {
// TODO Auto-generated method stub
Log.e("", "point_bank push send!!: ");
SharedPreferences pref = getSharedPreferences("preflogin", MODE_PRIVATE);
// push setting ----------------------------------
StringBuffer bufferMessageAll = new StringBuffer();
Bundle bundle = intent.getExtras();
Set<String> setKey = bundle.keySet();
Iterator<String> iterKey = setKey.iterator();
while (iterKey.hasNext()){
String key = iterKey.next();
String value = bundle.getString(key);
Log.d("GCMIntentService", "onMessage. key = " + key + ", value = " + value);
bufferMessageAll.append(key).append(" ").append(value).append("\n");
}
String messageAll = bufferMessageAll.toString();
//showMessage(context, messageAll);
DialogSimple();
}
private void DialogSimple(){
AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);
alt_bld.setMessage("Do you want to close this window ?").setCancelable(
false).setPositiveButton("Yes",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// Action for 'Yes' Button
}
}).setNegativeButton("No",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// Action for 'NO' Button
dialog.cancel();
}
});
AlertDialog alert = alt_bld.create();
// Title for AlertDialog
alert.setTitle("Title");
// Icon for AlertDialog
alert.setIcon(R.drawable.ic_launcher);
alert.show();
}