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.LAUNCHER" />
|
||||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
||||||
</intent-filter>
|
</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" />
|
<nav-graph android:value="@navigation/mobile_navigation" />
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package com.aurora.store.view.ui.splash
|
package com.aurora.store.view.ui.splash
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.fragment.app.activityViewModels
|
import androidx.fragment.app.activityViewModels
|
||||||
@@ -67,9 +68,11 @@ class SplashFragment : BaseFragment(R.layout.fragment_splash) {
|
|||||||
R.id.menu_blacklist_manager -> {
|
R.id.menu_blacklist_manager -> {
|
||||||
findNavController().navigate(R.id.blacklistFragment)
|
findNavController().navigate(R.id.blacklistFragment)
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.menu_spoof_manager -> {
|
R.id.menu_spoof_manager -> {
|
||||||
findNavController().navigate(R.id.spoofFragment)
|
findNavController().navigate(R.id.spoofFragment)
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.menu_settings -> {
|
R.id.menu_settings -> {
|
||||||
findNavController().navigate(R.id.settingsFragment)
|
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
|
// Navigation component cannot handle market scheme as its missing a valid host
|
||||||
return if (activity?.intent != null && activity?.intent?.scheme == "market") {
|
return if (activity?.intent != null && activity?.intent?.scheme == "market") {
|
||||||
requireActivity().intent.data!!.getQueryParameter("id") ?: ""
|
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 {
|
} else {
|
||||||
requireArguments().getString("packageName") ?: ""
|
requireArguments().getString("packageName") ?: ""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user