0

I have a String Array in my MainActivity Class.

enter image description here

I want to hide this string array from my java file. I have used proguard to secure my app but when i export my app and decompile it,it's become very easy to get my string value.Proguard is just changing my value name not hiding the string.see the screenshot below. enter image description here Now i want to hide my url string from my java file. I don't know how can i do that.so please help me to hide this string.

Proguard.cfg

-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.**

Project-properties

target=android-21
android.library.reference.1=..\\google-play-services_lib
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard.cfg

I am using Eclipse.Thanks in advance.

Community
  • 1
  • 1
Aovin Mahmud
  • 204
  • 3
  • 18
  • How do you plan to hide this? If the value is used in the app, it has to be inside the compiled classes in some readable form. – f1sh Oct 07 '16 at 09:40
  • i want to hide or encrypt the sting. – Aovin Mahmud Oct 07 '16 at 09:43
  • I know. Why do you think that's possible? – f1sh Oct 07 '16 at 09:44
  • then how other android application are hiding their important link from their application? i searched google and know that it's possible to hide string. – Aovin Mahmud Oct 07 '16 at 09:48
  • Possible duplicate http://stackoverflow.com/questions/4427238/hiding-strings-in-obfuscated-code – Ricardo Oct 07 '16 at 09:56
  • @RicardoBarroca i see the answere before but i don't understand it. – Aovin Mahmud Oct 07 '16 at 10:08
  • You need to create a key in keyStore or add one manually (keystore is better), encrypt your strings manually with it, store the encrypted strings in your array and then use the decryption method to retrieve them. Is this more clear to you? – Ricardo Oct 07 '16 at 10:12
  • I have `String url[] = {"hello " , "world" };` array then what should i do. Give me the **code** please @RicardoBarroca – Aovin Mahmud Oct 08 '16 at 07:13

0 Answers0