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
cca9bd88
Commit
cca9bd88
authored
Nov 10, 2018
by
Govind Dixit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes
parent
b3c0fb78
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
SettingsFragment.kt
.../java/chat/rocket/android/settings/ui/SettingsFragment.kt
+5
-4
defaults.xml
app/src/main/res/values/defaults.xml
+1
-0
No files found.
app/src/main/java/chat/rocket/android/settings/ui/SettingsFragment.kt
View file @
cca9bd88
...
...
@@ -9,6 +9,7 @@ import android.view.View
import
android.view.ViewGroup
import
android.widget.AdapterView
import
androidx.appcompat.app.AppCompatActivity
import
androidx.core.net.toUri
import
androidx.fragment.app.Fragment
import
chat.rocket.android.R
import
chat.rocket.android.about.ui.AboutFragment
...
...
@@ -92,16 +93,16 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen
}
fun
getMarketAppLink
():
String
{
return
"market://details?id=chat.rocket.android"
return
getString
(
R
.
string
.
market_link
)
}
fun
getMarketWebLink
():
String
{
return
"https://play.google.com/store/apps/details?id=chat.rocket.android"
return
getString
(
R
.
string
.
play_store_link
)
}
private
fun
startAppPlayStore
()
{
try
{
startActivity
(
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
getMarketAppLink
()
)))
startActivity
(
Intent
(
Intent
.
ACTION_VIEW
,
getMarketAppLink
().
toUri
(
)))
}
catch
(
error
:
ActivityNotFoundException
)
{
startActivity
(
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
getMarketWebLink
()
)))
startActivity
(
Intent
(
Intent
.
ACTION_VIEW
,
getMarketWebLink
().
toUri
(
)))
}
}
...
...
app/src/main/res/values/defaults.xml
View file @
cca9bd88
...
...
@@ -5,4 +5,5 @@
<string
name=
"community_server_url"
translatable=
"false"
>
open.rocket.chat
</string>
<string
name=
"create_server_url"
translatable=
"false"
>
cloud.rocket.chat/trial
</string>
<string
name=
"play_store_link"
translatable=
"false"
>
https://play.google.com/store/apps/details?id=chat.rocket.android
</string>
<string
name=
"market_link"
translatable=
"false"
>
market://details?id=chat.rocket.android
</string>
</resources>
\ No newline at end of file
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