Example #1
0
        public static AMM_PropertyTemplate GetLauncherPropertyTemplate()
        {
            AMM_PropertyTemplate launcher = new AMM_PropertyTemplate("intent-filter");

            AMM_PropertyTemplate prop = new AMM_PropertyTemplate("action");

            prop.SetValue("android:name", "android.intent.action.MAIN");
            launcher.AddProperty("action", prop);

            prop = new AMM_PropertyTemplate("category");
            prop.SetValue("android:name", "android.intent.category.LAUNCHER");
            launcher.AddProperty("category", prop);

            return(launcher);
        }
Example #2
0
        public AMM_PropertyTemplate GetOrCreateIntentFilterWithName(string name)
        {
            AMM_PropertyTemplate filter = GetIntentFilterWithName(name);

            if (filter == null)
            {
                filter = new AMM_PropertyTemplate("intent-filter");
                AMM_PropertyTemplate action = new AMM_PropertyTemplate("action");
                action.SetValue("android:name", name);
                filter.AddProperty(action);
                AddProperty(filter);
            }

            return(filter);
        }
Example #3
0
        public static AMM_PropertyTemplate ParseProperty(XmlNode node)
        {
            AMM_PropertyTemplate property = new AMM_PropertyTemplate(node.Name);

            //Get Values
            foreach (XmlAttribute attr in node.Attributes)
            {
                property.SetValue(attr.Name, attr.Value);
            }
            //Get Properties
            foreach (XmlNode n in node.ChildNodes)
            {
                if (!n.Name.Equals("#comment"))
                {
                    property.AddProperty(n.Name, ParseProperty(n));
                }
            }

            return(property);
        }