Android Open Source - presence-calling-android Login Activity

From Project

Back to project page presence-calling-android.


The source code is released under:

MIT License

If you think the Android project presence-calling-android 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 com.sinch.userpresencecalling;
/*from ww  w  . j  ava  2 s .c o m*/
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

public class LoginActivity extends ActionBarActivity {

    protected void onCreate(Bundle savedInstanceState) {

        findViewById( View.OnClickListener() {
            public void onClick(View view) {
                String username = ((EditText) findViewById(;
                if (username.length() == 0) {
                    Toast.makeText(getApplicationContext(), "Enter a username.", Toast.LENGTH_SHORT);
                } else {
                    Intent intent = new Intent(getApplicationContext(), MainActivity.class);
                    intent.putExtra("username", username);


Java Source Code List