@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent intent = getIntent(); String updateIdString = intent.getStringExtra("updateId"); Timber.v("EditActivity.onCreate, updateid: " + updateIdString); /* Bundle bundle = intent.getExtras(); for (String key : bundle.keySet()) { Object value = bundle.get(key); Log.d("ZetaRemote", String.format("%s %s (%s)", key, value.toString(), value.getClass().getName())); } */ updateId = Long.valueOf(updateIdString).longValue(); setTitle("Edit Record"); setContentView(R.layout.addedit_activity); nameEditText = (EditText) findViewById(R.id.nameEditText); serverEditText = (EditText) findViewById(R.id.serverEditText); urlEditText = (EditText) findViewById(R.id.urlEditText); addButton = (Button) findViewById(R.id.addButton); datasource = new DataSource(this); datasource.open(); Command currentCommand = datasource.getCommandById(updateId); nameEditText.setText(currentCommand.getName()); serverEditText.setText(currentCommand.getServer()); urlEditText.setText(currentCommand.getUrl()); addButton.setText("Update"); addButton.setOnClickListener(this); }