@Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mApplication = (TinkApplication) getApplicationContext();

    mPlaintextView = (EditText) findViewById(R.id.plaintext);
    mAssociatedDataView = (EditText) findViewById(R.id.associated_data);
    mCiphertextView = (EditText) findViewById(R.id.ciphertext);
    Button mEncryptButton = (Button) findViewById(R.id.encrypt_button);
    mEncryptButton.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View view) {
            attemptEncrypt();
          }
        });
    Button mDecryptButton = (Button) findViewById(R.id.decrypt_button);
    mDecryptButton.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View view) {
            attemptDecrypt();
          }
        });
  }
This activity allows users to encrypt and decrypt a string.
java_src/examples/android/helloworld/app/src/main/java/com/helloworld/MainActivity.java