Android Open Source - dCache-Cloud Friend Found Activity






From Project

Back to project page dCache-Cloud.

License

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.

Java Source Code

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();
      }
    }
  }
}




Java Source Code List

External.Contents.java
External.IntentIntegrator.java
External.IntentResult.java
External.QRCodeEncoder.java
de.desy.dCacheCloud.CountingInputStreamEntity.java
de.desy.dCacheCloud.CryptoHelper.java
de.desy.dCacheCloud.DatabaseHelper.java
de.desy.dCacheCloud.DownloadService.java
de.desy.dCacheCloud.KeyStoreHelper.java
de.desy.dCacheCloud.MySSLSocketFactory.java
de.desy.dCacheCloud.ServerHelper.java
de.desy.dCacheCloud.UploadService.java
de.desy.dCacheCloud.Activities.FriendFoundActivity.java
de.desy.dCacheCloud.Activities.ImportDataActivity.java
de.desy.dCacheCloud.Activities.MainActivity.java
de.desy.dCacheCloud.Activities.ProfileActivity.java
de.desy.dCacheCloud.Activities.ServerViewActivity.java
de.desy.dCacheCloud.Activities.SettingsActivity.java
de.desy.dCacheCloud.Activities.ShareDataActivity.java
de.desy.dCacheCloud.Activities.ShareWithFriendActivity.java
de.desy.dCacheCloud.Activities.UploadActivity.java
de.desy.dCacheCloud.Activities.UserPasswordActivity.java
de.desy.dCacheCloud.BCReceiver.NetworkReceiver.java
de.desy.dCacheCloud.BCReceiver.NewMediaReceiver.java