Reputation: 343
Background: In the process of creating an android application, I am messing around with different hashing techniques and speeds. I was using the Android native stuff until I found SpongyCastle ( i.e. BouncyCastle ), which turned out to be a lot faster. The SpongyCastle .jar file is fairly large, and my .apk is over 800kb with just the jar and a couple of testing classes ( and all of the necessary android fluff).
Question pt 1: Is this normal for .jar files to do to an APK? Do they usually bloat out the file?
Question pt 2: Is there any way for me ( either via source or jar ) to cut down the file? I'm only using the SHA256 and SHA1 hash schemes, and I have not been able to figure out how to use just those two hash schemes without including the entire jar.
Thoughts?
Edited: ProGuard works wonders.
Upvotes: 5
Views: 885
Reputation: 198033
Use ProGuard. It excels at trimming down parts of dependencies that you don't use. It's specifically mentioned for use on Android applications here.
(I contribute to Guava, which is a pretty big library, but a lot of people want to use it for Android. We point them to ProGuard.)
Upvotes: 4