Intent.EXTRA_EMAIL not populating the To field

前端 未结 6 1668
有刺的猬
有刺的猬 2021-02-03 16:35

I am trying to use an intent to send an email from my application but the To field of the email will not populate. If I add code to fill in the subject or text, they work fine.

6条回答
  •  灰色年华
    2021-02-03 16:56

    I think you are not passing recipient as array of string

    it should be like

    emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,new String[] { "someone@gmail.com" });
    

提交回复
热议问题