Skip to content

Commit

Permalink
Merge pull request #23 from Kajal03/patch-8
Browse files Browse the repository at this point in the history
Updated code
  • Loading branch information
anuragjoshi3519 committed Oct 2, 2018
2 parents 686a17d + f11e426 commit 0ed2129
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/main/java/com/dotvoid/drona/number_confirm.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
public class number_confirm extends AppCompatActivity {

private static final int MY_PERMISSIONS_REQUEST_SEND_SMS=0;
String phone;
String phoneNumber;
TextView t;
String code;
EditText e1;
Expand All @@ -34,7 +34,7 @@ protected void onCreate(Bundle savedInstanceState) {
t=(TextView)findViewById(R.id.verify);

Intent i=getIntent();
phone=i.getStringExtra("phone");
phoneNumber=i.getStringExtra("phoneNumber");

t.setOnClickListener(new View.OnClickListener() {
@Override
Expand Down Expand Up @@ -63,7 +63,7 @@ public void onClick(View v) {
if(code.equals("664732"))
{
Intent c = new Intent(getApplicationContext(),SignUp.class);
c.putExtra("phone",phone);
c.putExtra("phoneNumber",phoneNumber);
startActivity(c);
overridePendingTransition(R.anim.pull_in_right, R.anim.push_out_left);
}
Expand Down Expand Up @@ -99,7 +99,7 @@ public void onRequestPermissionsResult(int requestCode,String permissions[], int
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(phone, null, "Your verification code is 664732", null, null);
smsManager.sendTextMessage(phoneNumber, null, "Your verification code is 664732", null, null);
Toast.makeText(getApplicationContext(), "SMS sent.",
Toast.LENGTH_LONG).show();
} else {
Expand All @@ -111,4 +111,4 @@ public void onRequestPermissionsResult(int requestCode,String permissions[], int
}
}

}
}

0 comments on commit 0ed2129

Please sign in to comment.