Google Play服务连接错误

时间:2013-07-03 12:02:59

标签: android google-play

当我们无法通过Google Play连接并丢失时,您如何处理向用户显示连接错误消息?

这必须与Froyo兼容。

1 个答案:

答案 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();