androidproguardandroid-proguard

ProGuard Still Displays Full Activity Name


I am using Proguard and in my app I use this code

            System.out.println("ACTIVITY NAME IS " + activity.getLocalClassName());

It prints out the Activity name out, Iin release mode. I thought it is suppose to obfuscate all class names?

Is this behavior normal?


Solution

  • Yes this is a normal behaviour. Activity names are never obfuscated because these are referenced in manifest.xml. and android access these activities via reflection so their names cannot be changed. check this link https://stackoverflow.com/a/20620108/1320616