我对Android编程感到满意,并且正在尝试将谷歌分析应用到我的第一个应用程序中。这是一本专注的电话簿。我有代码,并试图把它放在几个不同的地方,尝试也遵循这些例子。继续获取错误标志。我试图做的是获取信息来报告所拨打的每个号码。一个活动,多个实例:
import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
public class CompanyListActivity extends Activity {
private Button BRC;
private Button Gotcha;
private Button cab441;
private Button CGT;
private Button feedback;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_company_list);
BRC = (Button) findViewById(R.id.BRC);
BRC.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:1234567890"));
startActivity(callIntent);
}
});
Gotcha = (Button) findViewById(R.id.Gotcha);
Gotcha.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:1234567890"));
startActivity(callIntent);
}
});
我如何输入Google分析代码?