i have try to develop one android app.here i have to develop forget password option.i have to click forget password textview means it is go to next activity.next activity have to enter the username of that registered user.i have to check the username is valid or invalid from mysql database.the username is valid means it is goto next activity .next activity have enter some text(password) field.here i have to click update button means the password is updated for that user.
Here i have done the username is valid and invalid activity.but how can i pass username data to next activity and update password for these particular user.
Here i have to update password(2nd activity) from username (based on 1st activity).How can i develop these.please help me.
This is my 1st activity:
PropertyInfo unameProp =new PropertyInfo();
unameProp.setName("Username");//Define the variable name in the web service method
unameProp.setValue(login);//set value for userName variable
unameProp.setType(String.class);//Define the type of the variable
request.addProperty(unameProp);
----
-----
if(status.equals("Valid Username"))
{
Intent intent = new Intent(Login.this,RetailerActivity.class);
intent.putExtra("Username", login);
startActivity(intent);
}
The next activity code is like below:
btninsert = (Button)findViewById(R.id.btn_insert1);
btninsert.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent in = getIntent();
EditText userPassword = (EditText) findViewById(R.id.edittext);
String user_Name = userPassword.getText().toString();
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
PropertyInfo unameProp =new PropertyInfo();
unameProp.setName("userPassword");//Define the variable name in the web service method
unameProp.setValue(user_Name);//Define value for fname variable
unameProp.setType(String.class);//Define the type of the variable
request.addProperty(unameProp);
PropertyInfo idProp =new PropertyInfo();
idProp.setName("Username");//Define the variable name in the web service method
idProp.setValue();//Define value for fname variable
idProp.setType(String.class);//Define the type of the variable
request.addProperty(idProp);
How can i pass username value from 1st activity to next activity.