Add AuroraStore to global share action
This commit is contained in:
@@ -82,6 +82,12 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent-filter>
|
||||
<nav-graph android:value="@navigation/mobile_navigation" />
|
||||
</activity>
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
package com.aurora.store.view.ui.splash
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.fragment.app.activityViewModels
|
||||
@@ -67,9 +68,11 @@ class SplashFragment : BaseFragment(R.layout.fragment_splash) {
|
||||
R.id.menu_blacklist_manager -> {
|
||||
findNavController().navigate(R.id.blacklistFragment)
|
||||
}
|
||||
|
||||
R.id.menu_spoof_manager -> {
|
||||
findNavController().navigate(R.id.spoofFragment)
|
||||
}
|
||||
|
||||
R.id.menu_settings -> {
|
||||
findNavController().navigate(R.id.settingsFragment)
|
||||
}
|
||||
@@ -221,6 +224,13 @@ class SplashFragment : BaseFragment(R.layout.fragment_splash) {
|
||||
// Navigation component cannot handle market scheme as its missing a valid host
|
||||
return if (activity?.intent != null && activity?.intent?.scheme == "market") {
|
||||
requireActivity().intent.data!!.getQueryParameter("id") ?: ""
|
||||
} else if (activity?.intent != null && activity?.intent?.action == Intent.ACTION_SEND) {
|
||||
val clipData = requireActivity().intent.clipData?.getItemAt(0)?.text.toString()
|
||||
if (clipData.contains("/store/apps/details?id=")) {
|
||||
clipData.split("id=").last()
|
||||
} else {
|
||||
""
|
||||
}
|
||||
} else {
|
||||
requireArguments().getString("packageName") ?: ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user