Reputation: 1075
Is there some way to hide the activity class name, like "xxx" below in AndroidManifest.xml?
<activity android:name="xxx" .. />
Or config it in another file?
ps: for one curious, I want it hide from a third party auto scan tool. Not like google play, some android markets (in China) have annoying restrictive competition practice, such as prohibit the use of admob sdk but use the one their provided. I don't wanna change my program for every market.
Upvotes: 2
Views: 991
Reputation: 11141
You cannot hide or rename your activity in the manifest file. Because whenever your APK is installed, it looks for the information of all the activities, services and other resources from the manifest file.
So,if you specify a different name for the activity, it will give Null Pointer Exception and the application will force close.
You better look for some tricks on how to hide manifest content for ceratin tools or the one which you are talking about.
Upvotes: 1
Reputation: 24235
I think you cannot hide the real name of an activity class. The name has to appear somewhere to indicate to the compiler of its presence. Otherwise the system will throw an exception ActivityNotFoundException
There is an option (<activity-alias>
) to specify an alias for an activity, but here too as expected the real name has to be given to allow mapping.
Upvotes: 3