Commit f634f661 authored by Govind Dixit's avatar Govind Dixit

add sharing feature

parent 39d016dc
...@@ -80,11 +80,11 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen ...@@ -80,11 +80,11 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen
resources.getString(R.string.title_share_the_app) ->{ resources.getString(R.string.title_share_the_app) ->{
val shareIntent = Intent(Intent.ACTION_SEND) val shareIntent = Intent(Intent.ACTION_SEND)
shareIntent.type = "text/plain" shareIntent.type = "text/plain"
val shareBody = "Check This Out" val shareBody = getString(R.string.check_this_out)
val shareSub = "https://play.google.com/store/apps/details?id=chat.rocket.android" val shareSub = getString(R.string.play_store_link)
shareIntent.putExtra(Intent.EXTRA_SUBJECT, shareBody) shareIntent.putExtra(Intent.EXTRA_SUBJECT, shareBody)
shareIntent.putExtra(Intent.EXTRA_TEXT, shareSub) shareIntent.putExtra(Intent.EXTRA_TEXT, shareSub)
startActivity(Intent.createChooser(shareIntent, "Share Using")) startActivity(Intent.createChooser(shareIntent, getString(R.string.share_using)))
} }
} }
......
...@@ -77,6 +77,8 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin ...@@ -77,6 +77,8 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<!-- Regular information messages --> <!-- Regular information messages -->
<string name="msg_generic_error">Sorry, an error has occurred, please try again</string> <string name="msg_generic_error">Sorry, an error has occurred, please try again</string>
<string name="msg_no_data_to_display">No data to display</string> <string name="msg_no_data_to_display">No data to display</string>
<string name="check_this_out">Check this out</string>
<string name="share_using">Share using</string>
<string name="msg_profile_update_successfully">Profile update successfully</string> <string name="msg_profile_update_successfully">Profile update successfully</string>
<string name="msg_username">username</string> <string name="msg_username">username</string>
<string name="msg_username_or_email">Username or email</string> <string name="msg_username_or_email">Username or email</string>
...@@ -315,6 +317,9 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin ...@@ -315,6 +317,9 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string name="header_live_chats">Live Chats</string> <string name="header_live_chats">Live Chats</string>
<string name="header_unknown">Unknown</string> <string name="header_unknown">Unknown</string>
<!--Links-->
<string name="play_store_link">"https://play.google.com/store/apps/details?id=chat.rocket.android"</string>
<!--Notifications--> <!--Notifications-->
<string name="share_label">Edit shared message</string> <string name="share_label">Edit shared message</string>
<string name="notif_action_reply_hint">REPLY</string> <string name="notif_action_reply_hint">REPLY</string>
......
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