How can I change share text on RocketWeb Android

After buy from CodeCanyon I set up the app and everything is working fine. But I want to change the Share text.

  1. The sharing method are called a RocketWeb library. In HomeActivity.kt you will found the line: UtilMethods.shareTheApp(mContext) it’s control the share function.
  2. To find the method search CTL+F (windows) or Command+F (MAC) and search this line UtilMethods.shareTheApp

3. Now set this method block in HomeActivity.kt

fun shareTheApp(context: Context, message: String) {
    val sendIntent = Intent()
    sendIntent.action = Intent.ACTION_SEND
    sendIntent.putExtra(Intent.EXTRA_TEXT, message)
    sendIntent.type = "text/plain"
    context.startActivity(sendIntent)
}

4. Now you need to release this line UtilMethods.shareTheApp(mContext) with this line shareTheApp(mContext, “My new text for share!”)

That’s it whatever the text you want to share write on send parameter.

Leave a Reply