In this blog post, you will learn how to Open Play Store or App Store in XamarinApp.
Introduction
Xamarin.Forms code runs on multiple platforms - each of which has its own filesystem. This means that reading and writing files is most easily done using the native file APIs on each platform. Alternatively, embedded resources are a simpler solution to distribute data files with an app.Prerequisites
- Visual Studio 2017 or later (Windows or Mac)
Setting up a Xamarin.Forms Project
Start by creating a new Xamarin.Forms project. You wíll learn more by going through the steps yourself.
Create a new or existing Xamarin forms(.Net standard) Project. With Android and iOS Platform.
Note: Your app must be live in App store and Playstore
Android
Here, you need the Android app id Ex:com.twitter.android.
I'm using twitter for this sample.
https://play.google.com/store/apps/details?id=com.twitter.android
Code
iOS
Here, you need AppName and AppId with location you will get appname and aped from apple developer connect.
https://apps.apple.com/in/app/twitter/id333903271
Code
Simple UI
MainPage.xaml
Full Source Code
MainPage.xaml.cs
Alternate way
You can use Lancher.OpenAsync also for opening App Store and Play store.
Using Dependency Service
Interface
iOS Implementation
Below sample code for open App store in App iOS.
Android Implementation
Below sample code for open play store in App android.
Debug your App
I hope you have understood you will learn how to Open Play Store or App Store in XamarinApp.
Thanks for reading. Please share your comments and feedback. Happy Coding :)