示例#1
0
    public void GetPackage()
    {
        string appPackage = utilsPlugin.GetPackageId();

        packageText.text = String.Format("Package: {0}", appPackage);
        Debug.Log(" packageId " + appPackage);
    }
示例#2
0
    public void InitGoogleIndexing()
    {
        string appTitle = "AndroidUltimatePlugin";

        string appPackage = utilsPlugin.GetPackageId();

        Debug.Log(" packageId " + appPackage);

        string androidOSVersion = utilsPlugin.GetAndroidVersion();

        Debug.Log(" androidOSVersion " + androidOSVersion);


        // app url link should follow this format android-app://{package_name}/{scheme}/{host_path}

        /*
         * Definitions:
         *
         * package_name: application ID as specified in the Android Play Store.
         * scheme: the scheme to pass to the application. Can be http, or a custom scheme.
         * host_path: identifies the specific content within your application.
         *
         */


        //in my example i dont have any hostpath that's why i didn't add any host path
        //string appUrlLink = "android-app://" + appPackage + "/play.google.com/store/apps/details?id=" + appPackage;

        string scheme     = "/play.google.com/store/apps/details?id=";
        string appUrlLink = "android-app://" + appPackage + scheme + appPackage;

        //sample app web url you need to change this with your own website url or link inside your website
        string appWebUrl = "http://www.google.com";

        appIndexingPlugin.InitGoogleIndexing(appTitle, appUrlLink, appWebUrl);
    }