当我们无法通过Google Play连接并丢失时,您如何处理向用户显示连接错误消息?
这必须与Froyo兼容。
答案 0 :(得分:1)
当您从Google Play收到如下Connection Error
的消息时显示提醒:
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Found some unknown Error. Please try again after some time.")
.setCancelable(true)
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
}
});
AlertDialog alert = builder.create();
alert.show();