/// <summary> /// Opens the Store page of the specified application. /// </summary> /// <description> /// For iOS platform, id is the value that identifies your app on App Store. /// And on Android, it will be same as app's bundle identifier (com.example.test). /// </description> /// <param name="_applicationIDList">An array of string values, that holds app id's of each supported platform.</param> /// <example> /// The following code example shows how to open store link. /// <code> /// using UnityEngine; /// using System.Collections; /// using VoxelBusters.NativePlugins; /// /// public class ExampleClass : MonoBehaviour /// { /// public void OpenStorePage () /// { /// NPBinding.Utility.OpenStoreLink(Platform.Android("com.example.app"), /// Platform.IOS("ios-app-id")); /// } /// } /// </code> /// </example> public void OpenStoreLink(params PlatformID[] _applicationIDList) { string _applicationID = NPUtility.GetActivePlatformID(_applicationIDList); if (string.IsNullOrEmpty(_applicationID)) { Console.Log(Constants.kDebugTag, "[Utility] The operation could not be completed because application identifier is invalid."); return; } OpenStoreLink(_applicationID); }
/// <summary> /// Opens the Store page of the specified application. /// </summary> /// <description> /// For iOS platform, id is the value that identifies your app on App Store. /// And on Android, it will be same as app's bundle identifier (com.example.test). /// </description> /// <param name="_applicationIDList">An array of string values, that holds app id's of each supported platform.</param> /// <example> /// The following code example shows how to open store link. /// <code> /// using UnityEngine; /// using System.Collections; /// using VoxelBusters.NativePlugins; /// /// public class ExampleClass : MonoBehaviour /// { /// public void OpenStorePage () /// { /// NPBinding.Utility.OpenStoreLink(Platform.Android("com.example.app"), /// Platform.IOS("ios-app-id")); /// } /// } /// </code> /// </example> public void OpenStoreLink(params PlatformID[] _applicationIDList) { string _applicationID = NPUtility.GetActivePlatformID(_applicationIDList); if (string.IsNullOrEmpty(_applicationID)) { #if NP_DEBUG Debug.Log("[Utility] The operation could not be completed because application identifier is invalid."); #endif return; } OpenStoreLink(_applicationID); }