2017-04-19 16 views
0

私は、POSTリクエストの後にJSONから次のリンクを取得しています:ユーザーが登録メールにリダイレクトされたメールを送信する方法は?

http://kartpay.net/inde.php?dispatch=auth.ekey_login&ekey=9d19e143037830a8d2d17f564997f394&company_id=0&redirect_url=http%3A%2F%2Fkartpay.net%2Fbigbuys-latest%2Findex.php

私は、ユーザーがログインボタンをクリックしたときに電子メールを介してこのリンクを送信したいですか?

答えて

0

電子メールを使用してリンクを送信できます。

Button login; 
String emaillink = "http://kartpay.net/inde.php?dispatch=auth.ekey_login&ekey=9d19e143037830a8d2d17f564997f394&company_id=0&redirect_url=http%3A%2F%2Fkartpay.net%2Fbigbuys-latest%2Findex.php\""; 

@Override 
protected void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.activity_checking_intent); 
    login = (Button) findViewById(R.id.button); 
    login.setOnClickListener(new View.OnClickListener() { 
     @Override 
     public void onClick(View view) { 

      Intent i = new Intent(Intent.ACTION_SEND); 
      i.setType("message/rfc822"); 
      i.putExtra(Intent.EXTRA_EMAIL , new String[]{"[email protected]"}); 
      i.putExtra(Intent.EXTRA_SUBJECT, "subject of your email"); 
      i.putExtra(Intent.EXTRA_TEXT , emaillink); 
      try { 
       startActivity(Intent.createChooser(i, "Send mail...")); 
      } catch (android.content.ActivityNotFoundException ex) { 
       Toast.makeText(CheckingIntent.this, "There are no email app installed.", Toast.LENGTH_SHORT).show(); 
      } 
     } 
    }); 
} 
関連する問題