How to Share Entire Android App with Share Intent

后端 未结 7 1001
名媛妹妹
名媛妹妹 2020-12-07 16:46

I have used Sharing-type intents before, such as:

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType(\"plain/text\");
intent.putExtra(Intent.EXTR         


        
7条回答
  •  庸人自扰
    2020-12-07 17:09

    In kotlin we can do like this

    var intent = Intent(Intent.ACTION_SEND)
    intent.type = "text/plain"
    intent.putExtra(Intent.EXTRA_TEXT,"I suggest this app for you : ${APP_URL}")
    startActivity(Intent(intent))
    

提交回复
热议问题