gpt4 book ai didi

java - 打开短信并在其中放置一个随机数组

转载 作者:行者123 更新时间:2023-11-30 11:53:57 26 4
gpt4 key购买 nike

基本上,当从数组中按下时,我的应用会随机生成一个字符串。我想知道有什么方法(如果用户选择它)我可以让生成的字符串(当按下按钮时)打开他们的短信并将字符串放入其中。这样他们所要做的就是将其发送给他们选择的人?

最佳答案

你会使用这样的东西:

                Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.putExtra("sms_body", "Content of the SMS goes here...");
sendIntent.setType("vnd.android-dir/mms-sms");
startActivity(sendIntent);

关于java - 打开短信并在其中放置一个随机数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5968249/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com