Android 我的logcat不断地显示东西
我尝试在android中实现gcm客户端,并在logcat上显示注册id。但是logcat继续显示一些我不想显示的内容Android 我的logcat不断地显示东西,android,google-cloud-messaging,Android,Google Cloud Messaging,我尝试在android中实现gcm客户端,并在logcat上显示注册id。但是logcat继续显示一些我不想显示的内容 package in.myreceiver.gcm; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; public class SeriousBroadcastRe
package in.myreceiver.gcm;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
public class SeriousBroadcastReceiver extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
try{
String action=intent.getAction();
if(action.equals("com.google.android.c2dm.intent.REGISTRATION"))
{
String registrationId=intent.getStringExtra("registration_Id");
Log.i("uo",registrationId);
String error=intent.getStringExtra("error");
String unregistered=intent.getStringExtra("unregistered");
}
else if(action.equals("com.google.android.c2dm.intent.RECEIVE"))
{
String data1=intent.getStringExtra("data1");
String data2=intent.getStringExtra("data2");
}
}
finally{}
}
}搜索您的标签“uo”。。。LogCat正在显示设备的所有日志(操作系统等)但它会停止打印内容…只要您通过USB连接设备,它就会继续运行(LogCat将从设备输出任何日志;)这是正常的…但我的代码中有一些错误…cz有很多运行时错误…我对android编程非常陌生…我很少用android编程。n我需要实现推送通知…那么您能告诉我需要了解的内容以及在哪里查找吗?请访问androidhive.Info或vogella.com;)帮了我很多忙