Beispiel #1
0
    public override void AppendBuildRequirements(AN_AndroidBuildRequirements buildRequirements)
    {
        var androidAppId = UM_GoogleAdsSettings.Instance.AndroidIds.AppId;

        if (string.IsNullOrEmpty(androidAppId))
        {
            return;
        }

        var applicationId = new AMM_PropertyTemplate("meta-data");

        applicationId.SetValue("android:name", "com.google.android.gms.ads.APPLICATION_ID");
        applicationId.SetValue("android:value", androidAppId);
        buildRequirements.AddApplicationProperty(applicationId);
    }
        private void AndroidRequirements()
        {
            var buildRequirements = new AN_AndroidBuildRequirements();

            foreach (var resolver in AN_Preprocessor.Resolvers)
            {
                if (!resolver.IsSettingsEnabled)
                {
                    continue;
                }

                foreach (var activity in resolver.BuildRequirements.Activities)
                {
                    buildRequirements.AddActivity(activity);
                }

                foreach (var property in resolver.BuildRequirements.ApplicationProperties)
                {
                    buildRequirements.AddApplicationProperty(property);
                }

                foreach (var permission in resolver.BuildRequirements.Permissions)
                {
                    if (!buildRequirements.Permissions.Contains(permission))
                    {
                        buildRequirements.AddPermission(permission);
                    }
                }

                foreach (var dependency in resolver.BuildRequirements.BinaryDependencies)
                {
                    buildRequirements.AddBinaryDependency(dependency);
                }
            }


            AN_ServiceSettingsUI.DrawRequirementsUI(buildRequirements);
        }