Java 如何更改GooglePlayServicesUtil.getErrorDialog()中显示的文本?

Java 如何更改GooglePlayServicesUtil.getErrorDialog()中显示的文本?,java,android,google-play-services,google-cloud-messaging,android-dialog,Java,Android,Google Play Services,Google Cloud Messaging,Android Dialog,我正在努力学习谷歌文档中的gcm教程。他们说,如果播放服务过时,可以调用此方法: GooglePlayServicesUtil.getErrorDialog(resultCode, activity, 9000).show(); 这很好,但它会弹出一个对话框,用一个“更新”按钮显示“除非你更新Google Play服务,否则这个应用程序不会运行”。我想更改标题和消息文本。我的用户可以跳过更新,应用程序仍将运行。他们不会得到推送通知。如何更改对话框的消息 我想做一些类似的事情: Dialog

我正在努力学习谷歌文档中的gcm教程。他们说,如果播放服务过时,可以调用此方法:

 GooglePlayServicesUtil.getErrorDialog(resultCode, activity, 9000).show();
这很好,但它会弹出一个对话框,用一个“更新”按钮显示“除非你更新Google Play服务,否则这个应用程序不会运行”。我想更改标题和消息文本。我的用户可以跳过更新,应用程序仍将运行。他们不会得到推送通知。如何更改对话框的消息

我想做一些类似的事情:

Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(resultCode, activity, 9000);
errorDialog.setTitle("out of date");
errorDialog.setMessage("Please update or push notifications won't work. Thank you");
errorDialog.show();

您可以像这样覆盖应用程序的
strings.xml
中所需的字符串值。只需将这些行添加到
strings.xml

对于对话框上的消息

<string name="common_google_play_services_update_text" msgid="448354684997260580">This app won\'t run unless you update Google Play services.</string>
<string name="common_google_play_services_update_title" msgid="6006316683626838685">out of date</string>

试试我的答案。应该行得通,行得通!为什么和如何?msgid=”“在这两个字符串中的作用是什么?你能把我链接到这个文档或源代码吗?谢谢!
android_sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\common_strings.xml