Skip to content

Commit

Permalink
2019-06-16 17:10
Browse files Browse the repository at this point in the history
OpenLinkFunction edited
  • Loading branch information
Aryan-mor authored and Aryan-mor committed Jun 16, 2019
1 parent 4f256e1 commit 5358b12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion UtilsLibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.3.10"
versionName "1.3.11"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ fun Context.intentToPackageSetting() {
intentTo(intent)
}

fun Context.openLink(link: String): Boolean {
fun Activity.openLink(link: String): Boolean {
try {
this.intentTo(Intent(Intent.ACTION_VIEW, Uri.parse(link)))
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(link)))
return true
} catch (e: Exception) {
logError("openLink", e)
Expand Down

0 comments on commit 5358b12

Please sign in to comment.