Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
39d016dc
Commit
39d016dc
authored
Nov 05, 2018
by
Govind Dixit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add sharing feature
parent
4b1f14a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
SettingsFragment.kt
.../java/chat/rocket/android/settings/ui/SettingsFragment.kt
+12
-0
strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
app/src/main/java/chat/rocket/android/settings/ui/SettingsFragment.kt
View file @
39d016dc
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"
))
}
}
}
...
...
app/src/main/res/values/strings.xml
View file @
39d016dc
...
...
@@ -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 -->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment