-1

Hi i did one application its got finished...am going to uplode in market...but client asked me to add pro guard and android licencing...i dont how to add those...i am using android sdk,Eclipse Project Release Notes 3.8..i surfed in net waht is progurad... they said.. to provide security and reduce size of apk we will use apk..and we have to add proguard.config=proguard.cfg line in project.properties file.is it enough or else do i need to do some thing,and what is android licencing.

 MainActivity.class: 
 public class MainActivity extends Activity {
   Button screetshot;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    screetshot=(Button)findViewById(R.id.button1);
    screetshot.setOnClickListener(new OnClickListener() {

        public void onClick(View arg0) {
            // TODO Auto-generated method stub
            getscreen();
        }
    });
}
  }
radha
  • 192
  • 1
  • 2
  • 13

2 Answers2

0

The ProGuard tool shrinks, optimizes, and obfuscates your code by removing unused code and renaming classes, fields, and methods with semantically obscure names. The result is a smaller sized .apk file that is more difficult to reverse engineer. Because ProGuard makes your application harder to reverse engineer, it is important that you use it when your application utilizes features that are sensitive to security like when you are Licensing Your Applications.

You should enable proguard in release mode. Check the link below under the topic Enabling Proguard

http://developer.android.com/tools/help/proguard.html

Example:

http://proguard.sourceforge.net/index.html#manual/examples.html

Raghunandan
  • 132,755
  • 26
  • 225
  • 256
  • Thnkyou...i ll try and let u know – radha Jun 04 '13 at 07:08
  • ok.i have one doubt..now i ll add proguard.config=proguard.cfg in project.properties file is enough or do need to any thing else – radha Jun 04 '13 at 07:22
  • @radha check the example link. and the one provided by Deepankar Choudhary http://stackoverflow.com/questions/4732656/enabling-proguard-in-eclipse-for-android/5040675#5040675 – Raghunandan Jun 04 '13 at 07:24
  • sory..i saw but i didnt get what to in my application – radha Jun 04 '13 at 07:38
  • @radha check the answer by NeTeInStEiN in the link has a good explanation on the topic in the above link. – Raghunandan Jun 04 '13 at 07:41
  • yes i read that link,but they said this line will work only above 2.3 but my application is 2.2 – radha Jun 04 '13 at 08:35
0

To enable proguard commemt the line below this line in your project.properties file

To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):

Check Adding Licensing to Your App and ProGuard

Jainendra
  • 24,713
  • 30
  • 122
  • 169
  • yes i uncomment that line in project.properties file....is it enough or do have do any thing else – radha Jun 04 '13 at 09:29