android

Kolorwanie:
Status:
1234567891011121314151617181920212223
        Button sms_button = (Button) findViewById(R.id.sms_button);
        sms_button.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {

                String number = "";  // The number on which you want to send SMS
                startActivity(new Intent(Intent.ACTION_VIEW, Uri.fromParts("sms", number, null)));
            }
        });

        Button email_button = (Button) findViewById(R.id.email_button);
       email_button.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {

                String number = "abcd@gmail.com";  // The number on which you want to send SMS
                startActivity(new Intent(Intent.ACTION_VIEW, Uri.fromParts("mailto", number, null)));

            }
        });
    }

Copyrights 2014-2019 © Wklejaj.pl Wszelkie prawa zastrzeżone.