Esempio n. 1
0
        //Constructed from existing entry in AndroidManifest or constructed as child of an Activity
        public static ManifestApplication CreateInstance(XmlNode node)
        {
            ManifestApplication application = ScriptableObject.CreateInstance <ManifestApplication> ();

            application.node = (XmlElement)node;
            application.elementEditStatus = EditStatus.NONE;
            if (node != null)
            {
                application.Initialize();
            }
            else
            {
                Debug.LogError("Manifest doesn't have application tags");
            }
            return(application);
        }
Esempio n. 2
0
 private void BuildIManifestElement(XmlNode node)
 {
     if (node.Name.Equals("uses-permission"))
     {
         usesPermissionList.Add(ManifestUsesPermission.CreateInstance(node));
     }
     else if (node.Name.Equals("uses-feature") && ((XmlElement)node).HasAttribute("android:name"))
     {
         usesFeatureList.Add(ManifestUsesFeature.CreateInstance(node));
     }
     else if (node.Name.Equals("permission"))
     {
         permissionList.Add(ManifestPermission.CreateInstance(node));
     }
     else if (node.Name.Equals("activity"))
     {
         activityList.Add(ManifestActivity.CreateInstance(node));
     }
     else if (node.Name.Equals("receiver"))
     {
         receiverList.Add(ManifestReceiver.CreateInstance(node));
     }
     else if (node.Name.Equals("service"))
     {
         serviceList.Add(ManifestService.CreateInstance(node));
     }
     else if (node.Name.Equals("provider"))
     {
         providerList.Add(ManifestProvider.CreateInstance(node));
     }
     else if (node.Name.Equals("meta-data") && node.ParentNode.Name.Equals("application"))
     {
         metaDataList.Add(ManifestMetaData.CreateInstance(node.ParentNode, node));
     }
     else if (node.Name.Equals("uses-library"))
     {
         usesLibraryList.Add(ManifestUsesLibrary.CreateInstance(node));
     }
     else if (node.Name.Equals("application"))
     {
         application = ManifestApplication.CreateInstance(node);
     }
 }