Class AndroidManifest
- java.lang.Object
- 
- com.ensoftcorp.open.android.essentials.permissions.AndroidManifest
 
- 
 public class AndroidManifest extends java.lang.ObjectThis is a container object for encapsulating data and logic for parsing an Android Manifest file- Author:
- Ben Holland
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringANDROID_MANIFEST_FILENAMEAndroid Manifest file name
 - 
Constructor SummaryConstructors Constructor Description AndroidManifest(java.io.File androidManifestFile)Constructs an AndroidManifest object from the given AndroidManifest.xml file
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.FilegetAppIcon()Returns the highest resolution app icon located in the workspace or null if no app icons were locatedjava.util.ArrayList<java.io.File>getAppIcons()Returns an ordered list of File objects pointing to the App icons found in the workspace List is ordered by highest to lowest app icon resolutions Collection may be empty if not app icons were locatedstatic java.util.Collection<java.io.File>getDependentManifestFiles(java.lang.String project)Returns File objects pointing to AndroidManifest.xml files of projects the given Eclipse Android workspace project depends uponstatic java.io.FilegetManifestFile(java.lang.String project)Returns a File object pointing to the AndroidManifest.xml file for the given Eclipse Android workspace projectjava.io.FilegetManifestLocation()Returns the location of the AndroidManifest.xml file represented by this object instanceintgetMaxSDKVersion()Returns the max supported SDK version (or highest available mapping known in the PermissionMapping if not set)intgetMinSDKVersion()Returns the min supported SDK versionintgetTargetSDKVersion()Returns the target supported SDK versionjava.util.HashSet<java.lang.String>getUnidentifedUsesPermissions()Returns unidentified requested permissions.java.util.Collection<Permission>getUsesPermissions()Returns a collection of requested Android Permissions (includes documented, undocumented types)static java.util.Collection<AndroidManifest>parseManifestFiles(java.util.Collection<java.io.File> files)Returns a collection of Manifest objects for each AndroidManifest.xml file given
 
- 
- 
- 
Field Detail- 
ANDROID_MANIFEST_FILENAMEpublic static final java.lang.String ANDROID_MANIFEST_FILENAME Android Manifest file name- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
AndroidManifestpublic AndroidManifest(java.io.File androidManifestFile) throws java.io.IOException, java.lang.IllegalArgumentExceptionConstructs an AndroidManifest object from the given AndroidManifest.xml file- Parameters:
- androidManifestFile-
- Throws:
- java.io.IOException
- java.lang.IllegalArgumentException
 
 
- 
 - 
Method Detail- 
getManifestFilepublic static java.io.File getManifestFile(java.lang.String project) throws java.lang.ExceptionReturns a File object pointing to the AndroidManifest.xml file for the given Eclipse Android workspace project- Parameters:
- project-
- Returns:
- Throws:
- java.lang.Exception
 
 - 
getDependentManifestFilespublic static java.util.Collection<java.io.File> getDependentManifestFiles(java.lang.String project) throws org.eclipse.core.runtime.CoreExceptionReturns File objects pointing to AndroidManifest.xml files of projects the given Eclipse Android workspace project depends upon- Parameters:
- project-
- Returns:
- Throws:
- org.eclipse.core.runtime.CoreException
 
 - 
parseManifestFilespublic static java.util.Collection<AndroidManifest> parseManifestFiles(java.util.Collection<java.io.File> files) throws java.lang.IllegalArgumentException, java.io.IOException Returns a collection of Manifest objects for each AndroidManifest.xml file given- Parameters:
- files-
- Returns:
- Throws:
- java.io.IOException
- java.lang.IllegalArgumentException
 
 - 
getUsesPermissionspublic java.util.Collection<Permission> getUsesPermissions() Returns a collection of requested Android Permissions (includes documented, undocumented types)- Returns:
 
 - 
getUnidentifedUsesPermissionspublic java.util.HashSet<java.lang.String> getUnidentifedUsesPermissions() Returns unidentified requested permissions. These are either custom application permissions or permissions that have not be included in the referenced permission mapping permissions list.- Returns:
 
 - 
getAppIconspublic java.util.ArrayList<java.io.File> getAppIcons() Returns an ordered list of File objects pointing to the App icons found in the workspace List is ordered by highest to lowest app icon resolutions Collection may be empty if not app icons were located- Returns:
 
 - 
getAppIconpublic java.io.File getAppIcon() Returns the highest resolution app icon located in the workspace or null if no app icons were located- Returns:
 
 - 
getManifestLocationpublic java.io.File getManifestLocation() Returns the location of the AndroidManifest.xml file represented by this object instance- Returns:
 
 - 
getMinSDKVersionpublic int getMinSDKVersion() Returns the min supported SDK version- Returns:
 
 - 
getMaxSDKVersionpublic int getMaxSDKVersion() Returns the max supported SDK version (or highest available mapping known in the PermissionMapping if not set)- Returns:
 
 - 
getTargetSDKVersionpublic int getTargetSDKVersion() Returns the target supported SDK version- Returns:
 
 
- 
 
-