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
c03782fc
Commit
c03782fc
authored
Nov 05, 2018
by
Govind Dixit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: rate app on playstore
parent
4b1f14a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
SettingsFragment.kt
.../java/chat/rocket/android/settings/ui/SettingsFragment.kt
+18
-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 @
c03782fc
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,22 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen
AboutFragment
.
newInstance
()
}
}
resources
.
getString
(
R
.
string
.
title_rate_us
)
->
startAppPlayStore
()
}
}
fun
getMarketAppLink
():
String
{
return
"market://details?id=chat.rocket.android"
}
fun
getMarketWebLink
():
String
{
return
"https://play.google.com/store/apps/details?id=chat.rocket.android"
}
private
fun
startAppPlayStore
()
{
try
{
startActivity
(
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
getMarketAppLink
())))
}
catch
(
error
:
ActivityNotFoundException
)
{
startActivity
(
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
getMarketWebLink
())))
}
}
...
...
app/src/main/res/values/strings.xml
View file @
c03782fc
...
...
@@ -27,6 +27,7 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string
name=
"title_settings"
>
Settings
</string>
<string
name=
"title_preferences"
>
Preferences
</string>
<string
name=
"title_change_password"
>
Change Password
</string>
<string
name=
"title_rate_us"
>
Rate Us
</string>
<string
name=
"title_admin_panel"
>
Admin panel
</string>
<string
name=
"title_password"
>
Change Password
</string>
<string
name=
"title_update_profile"
>
Update profile
</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_rate_us"
>
Rate Us
</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