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 Summary
Fields Modifier and Type Field Description static java.lang.StringANDROID_MANIFEST_FILENAMEAndroid Manifest file name
-
Constructor Summary
Constructors Constructor Description AndroidManifest(java.io.File androidManifestFile)Constructs an AndroidManifest object from the given AndroidManifest.xml file
-
Method Summary
All 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_FILENAME
public static final java.lang.String ANDROID_MANIFEST_FILENAME
Android Manifest file name- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AndroidManifest
public 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.IOExceptionjava.lang.IllegalArgumentException
-
-
Method Detail
-
getManifestFile
public 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
-
getDependentManifestFiles
public 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
-
parseManifestFiles
public 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.IOExceptionjava.lang.IllegalArgumentException
-
getUsesPermissions
public java.util.Collection<Permission> getUsesPermissions()
Returns a collection of requested Android Permissions (includes documented, undocumented types)- Returns:
-
getUnidentifedUsesPermissions
public 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:
-
getAppIcons
public 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:
-
getAppIcon
public java.io.File getAppIcon()
Returns the highest resolution app icon located in the workspace or null if no app icons were located- Returns:
-
getManifestLocation
public java.io.File getManifestLocation()
Returns the location of the AndroidManifest.xml file represented by this object instance- Returns:
-
getMinSDKVersion
public int getMinSDKVersion()
Returns the min supported SDK version- Returns:
-
getMaxSDKVersion
public int getMaxSDKVersion()
Returns the max supported SDK version (or highest available mapping known in the PermissionMapping if not set)- Returns:
-
getTargetSDKVersion
public int getTargetSDKVersion()
Returns the target supported SDK version- Returns:
-
-