mirror of
https://github.com/SimpleMobileTools/Simple-App-Launcher.git
synced 2025-03-31 11:30:12 +02:00
use the more generic market:// intent first, before the url
This commit is contained in:
parent
d2645d5420
commit
dcc77e7fe5
@ -56,7 +56,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.30.1'
|
||||
implementation 'com.simplemobiletools:commons:5.30.2'
|
||||
implementation 'com.facebook.stetho:stetho:1.5.0'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.simplemobiletools.applauncher.activities
|
||||
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
@ -16,6 +15,7 @@ import com.simplemobiletools.applauncher.extensions.isAPredefinedApp
|
||||
import com.simplemobiletools.applauncher.models.AppLauncher
|
||||
import com.simplemobiletools.commons.extensions.appLaunched
|
||||
import com.simplemobiletools.commons.extensions.checkWhatsNew
|
||||
import com.simplemobiletools.commons.extensions.launchViewIntent
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_STETHO
|
||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||
@ -116,9 +116,11 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||
finish()
|
||||
}
|
||||
} else {
|
||||
val url = "https://play.google.com/store/apps/details?id=${it.packageName}"
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||
startActivity(intent)
|
||||
try {
|
||||
launchViewIntent("market://details?id=${it.packageName}")
|
||||
} catch (ignored: Exception) {
|
||||
launchViewIntent("https://play.google.com/store/apps/details?id=${it.packageName}")
|
||||
}
|
||||
}
|
||||
}
|
||||
launchers_grid.adapter = adapter
|
||||
|
Loading…
x
Reference in New Issue
Block a user