Android Open Source - GeoPosts Sign Up






From Project

Back to project page GeoPosts.

License

The source code is released under:

GNU General Public License

If you think the Android project GeoPosts 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 org.surrel.geoposts;
//from  ww w.  j  ava 2  s  .co m
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.EditText;

public class SignUp extends Activity {


  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_signup);
  }

  public void GoToSignUp(View view)
  {
    String result;
    Resources res = getResources();

    Log.d("Act.signup", "Calling signup");
    RequestTask rq = new RequestTask(getApplicationContext());
    rq.execute("signup",
        ((EditText)findViewById(R.id.enter_pseudo)).getText().toString(),
        ((EditText)findViewById(R.id.enter_password)).getText().toString(),
        ((EditText)findViewById(R.id.enter_email)).getText().toString()
        );
    Log.d("Act.signup", "Called signup");

    try {
      result = rq.get(5, TimeUnit.SECONDS);
      Log.d("Act.signup", result);
      if(result == res.getString(R.string.signup_ok))
      {
        Intent toLogIn = new Intent(this, LogIn.class);
        startActivity(toLogIn);
      }
      else
      {
        // Signup failed
      }
    } catch (InterruptedException e) {
      Log.i("Act.signup", "Signup interrupted, InterruptedException");
    } catch (ExecutionException e) {
      Log.i("Act.signup", "Signup aborted, ExecutionException");
      e.printStackTrace();
    } catch (TimeoutException e) {
      Log.i("Act.signup", "Signup failed due to timeout");
      e.printStackTrace();
    }

  }
  
}




Java Source Code List

org.surrel.geoposts.BinderData.java
org.surrel.geoposts.GeoPostServer.java
org.surrel.geoposts.LogIn.java
org.surrel.geoposts.MainActivity.java
org.surrel.geoposts.MyGeoPostDetails.java
org.surrel.geoposts.MyGeoposts.java
org.surrel.geoposts.NewGeopost.java
org.surrel.geoposts.NotesDbHelper.java
org.surrel.geoposts.Preferences.java
org.surrel.geoposts.RequestTask.java
org.surrel.geoposts.SignUp.java
org.surrel.geoposts.ViewGeopost.java
org.surrel.geoposts.ViewMap.java