

We have seen two ways to open the App Store or Play Store, the first way is that when the user clicks the button it will call the button clicked event and on that event, we can call Browser.OpenAsync() method.
#Open play store how to
In this blog, we can see how to open the App Store or Play Store in our Xamarin app.

This is one way to open the App Store or Play store and the second way to do this is by using Launcher.OpenAsync(). On the button click event first, we can check the platform (Android or iOS) then we can open the App Store or Play store using await Browser.OpenAsync(). In the first example, we can open the App Store or Play store on button click event.
#Open play store android
We can see both of the ways to open the App Store or Play Store on Android and iOS platforms. Public class AppStoreImplement : IStoreInterface
#Open play store code
Public class PlayStoreImplement : IStoreInterfaceīelow code is for the open App Store on the iOS platform. One Stop Solution for Xamarin Mobile App Development Your Search ends here.īelow code is for the open Play Store on the Android platform. And add the assembly and use the method which we can create in the interface. After creating the interface, we need to inherit this interface on the Android and iOS platforms. The name of the interface starts with I (e.g. Just Right-click the shared project then click Add and then select Interface and give the name. So first, we create an interface on a shared project. There is one alternative way to open App Store or Play Store on both the platform using Launcher.OpenAsync() this can be done by using Dependency Services.įor using dependency services, we need to create an interface for using the shared code. So this is how we can open the App Store or Play Store on Android and iOS both. Image: Open App Store or Play Store Example Public partial class MainPage : ContentPageĪsync void Button_Clicked(System.Object sender, System.EventArgs e) Read More: Quick Tips For Collection View On the button click, we can open the Play Store or App Store. On the button control, we can add clicked events.


In this Xaml, we can add an image and one button.
#Open play store full
Now, let’s see the full source code of the open App Store and Play Store in our Xamarin app. If (Device.RuntimePlatform = Device.Android)Īwait Browser.OpenAsync(url, BrowserLaunchMode.External) You can open a play store or app store using the below code. For Android, the app id is =, And for iOS, the app id is =. In Xamarin forms, we need to add id, AppName with a location to open the app for both of the platforms Android and iOS.įor example, we open Twitter in our app so we need a Twitter id. Note that, the application we are going to open in the Play Store or App store so this application is must be live in the Play Store or App Store both. So you can select blank app template and Android, iOS platform. Then you will see platforms and templates for the app. After that select the path when you want to store your app and give the appropriate name to the app. First, open Visual Studio 2017 or the latest version then select a mobile app. Now, we can create a project for an open play store in our Xamarin app. For open play store or app store in Xamarin app, there is one prerequisite that uses Visual Studio 2017 or later version (Windows or Mac). And open the app store by using a device like an iOS. In this blog, we can create an application that opens the play store by using a device like an Android. Now, we are going to create an application for the open play store and app store. As we can see Xamarin is a cross-platform that’s why Xamarin forms works on multiple platforms like iOS, Android, UWP and they have their own file system. With the use of these native APIs, we can easily read and write files. Xamarin is an open-source platform where we can build a native user interface for iOS, Android, and Windows Phone using a single codebase with C#.
