I need the set the Application attribute dynamically in android , particularly i need set the Name field which is shown below , i need to change it dynamically because i import two library packages each package will contain two different Application class to maintain session variable,but i can able to use any one Application class in imported project, i need to use that both dynamically based on the package user going to use, for that i need to set and change the Application class Name dynamically in Android Manifest.xml file.

if any one knows the solution means help me out.
Thanks.
Your manifest is within your apk, which is signed, so changing it dynamically would invalidate the whole package. My guess is dynamically changing the manifest is not possible.