Commit 39d016dc authored by Govind Dixit's avatar Govind Dixit

feat: add sharing feature

parent 4b1f14a7
package chat.rocket.android.settings.ui
import android.content.ActivityNotFoundException
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
......@@ -75,6 +77,16 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen
AboutFragment.newInstance()
}
}
resources.getString(R.string.title_share_the_app) ->{
val shareIntent = Intent(Intent.ACTION_SEND)
shareIntent.type = "text/plain"
val shareBody = "Check This Out"
val shareSub = "https://play.google.com/store/apps/details?id=chat.rocket.android"
shareIntent.putExtra(Intent.EXTRA_SUBJECT, shareBody)
shareIntent.putExtra(Intent.EXTRA_TEXT, shareSub)
startActivity(Intent.createChooser(shareIntent, "Share Using"))
}
}
}
......
......@@ -31,6 +31,7 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string name="title_password">Change Password</string>
<string name="title_update_profile">Update profile</string>
<string name="title_about">About</string>
<string name="title_share_the_app">Share App</string>
<string name="title_create_channel">Create Channel</string>
<string name="title_confirmation">Are You Sure you want to logout?</string>
......@@ -70,6 +71,7 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<item name="item_preferences">Preferences</item>
<item name="item_password">Change Password</item>
<item name="item_password">About</item>
<item name="item_share_app">Share App</item>
</string-array>
<!-- Regular information messages -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment