I have a Jar that I use in my Android app (it's in the libs folder). The Jar doesn't contains any Android resources or anything like that, but just simple Java classes.
Now, I want the Jar to know which version it currently has in the manifest so that in case of an exception occurring in the Jar, I know what version of the Jar caused the exception.
For some reason, I can't seem to be able to do it... I've seen this similar question and many others, and while this works when I use the Jar in a simple Java app, it doesn't when used in an android app. I've tried getting the manifest by doing this
Thread.currentThread().getContextClassLoader().getResources("META-INF/MANIFEST.MF");
or this
MyClass.class.getClassLoader().getResources("META-INF/MANIFEST.MF");
but I never get the manifest for my jar.
Any help will be greatly appreciated.