0

I am working on an android project and securing my code from reverse engineering using proguard. I'm facing a serious issue my code is secure like 90% secure but issue is with my web services URL. I did save URL's path in separate class like

Public class key_Strings
{
public static url="https://www.google.co.uk";
}

and say i'm using this URL in my activity like :

public class MainActivity extends Activity 
{
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        String URL=key_Strings.url;

    }
}

after exporting my .APK file i did apply reverse engineering tools and then at the end i get this class with anonymous name but thing is that i get the URL something like:

this.h="https://www.google.co.uk";

i want to secure my URL so need help Thanks

Hafiz.M.Usman
  • 223
  • 3
  • 21

2 Answers2

0

Use DexGuard as recommended in ProGuard FAQ.

Maxim
  • 9,701
  • 5
  • 60
  • 108
-1

Ok My problem is being solved thanks every one and here is the solution that click on my mind just modify my code and problem is solved

Public class key_Strings
{
public  url="https://www.google.co.uk";
}

and here is my activity code

public class MainActivity extends Activity 

    {
    @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            key_Strings key_Strings=new key_Strings();

            String URL=key_Strings.url;

        }
    }

thanks for every one.

Hafiz.M.Usman
  • 223
  • 3
  • 21