0

Many times after building an app and uploading it to play store I realize that I haven't guarded the apk using proguard feature provided by android and anyone can decompile the app using various tools to get my app's source code. So is it possible that whenever i create a new project the proguard feature is automatically enabled and my app's source code can be secure?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Rahul Sharma
  • 2,867
  • 2
  • 27
  • 40

2 Answers2

0

For obfuscation just add to project.properties file in android project the following line:

proguard.config=proguard.cfg

see details in android's development page here

eldjon
  • 2,800
  • 2
  • 20
  • 23
  • 1
    I have gone through the page bro. It says that we have to enable progaurd from the file project.properties by uncommenting the line "proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt". But i am asking something else bro. I am asking for some automatic way to unable progaurd without uncommenting that line. Or I can say that without manually uncommenting that line enable the progaurd automatically. – Rahul Sharma Aug 01 '14 at 21:31
  • that has more to do with eclipse, rather then android – eldjon Aug 01 '14 at 21:33
0

Probably you will have to right a custom ant build script which throws an error when proguard property is not set in properties.To write custom ant build script visit this link: http://www.androidengineer.com/2010/06/using-ant-to-automate-building-android.html

rupesh jain
  • 3,410
  • 1
  • 14
  • 22