I've built a Tizen/Samsung smartwatch companion app for an Android app. Inside the Android app, I can detect if a Samsung/Tizen watch is paired to the Android phone, but missing the smartwatch companion app.
I am prompting the user to install the smartwatch companion app if they don't have it. However, I'd like to make it very easy for the user to get the companion app, by providing a button for them to click that will open the Galaxy Store straight to the smartwatch companion app download page.
Is there an intent for opening the Galaxy Store to a specific app page on an Android phone?
I've tried this based on other answers on SO:
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("samsungapps://ProductDetail/com.sec.android.app.samsungapps"))
startActivity(intent)
That crashes with:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=samsungapps://ProductDetail/com.sec.android.app.samsungapps }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2058)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1716)
at android.app.Activity.startActivityForResult(Activity.java:5211)
at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:675)
at android.app.Activity.startActivityForResult(Activity.java:5169)
at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:662)
at android.app.Activity.startActivity(Activity.java:5540)
at android.app.Activity.startActivity(Activity.java:5508)
Note: I need a solution that works on ALL Android phones with the Galaxy Store, not just Samsung phones.