Back to project page dCache-Cloud.
The source code is released under:
Copyright ? 2013, Michael Stapelberg and contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ...
If you think the Android project dCache-Cloud listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.desy.dCacheCloud.Activities; //from w w w. j a va 2 s . co m import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import de.desy.dCacheCloud.DatabaseHelper; import de.desy.dCacheCloud.R; public class FriendFoundActivity extends Activity { private EditText friendName; private DatabaseHelper oh; private String public_key; private TextView tvFriendHash; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_friend_found); friendName = (EditText)findViewById(R.id.editTextFriendName); tvFriendHash = (TextView)findViewById(R.id.textViewFriendFingerprint); Bundle b = getIntent().getExtras(); public_key = b.getString("KEY"); tvFriendHash.setText(b.getString("HASH")); oh = new DatabaseHelper(this); } public void onClick(View view) { switch (view.getId()) { case R.id.buttonFriendOK: if (friendName.getText().toString().equals("")) { Toast.makeText(this, "no Name set", Toast.LENGTH_LONG).show(); } else { // TODO: oh.setPersonPublicKey(friendName.getText().toString(), public_key, tvFriendHash.getText().toString()); this.finish(); } } } }