-2

I need the best way to protect my data ,I don't want any one to arrive to the data in my app even he can get the api . I heard that any one can decompile app and take the data !! How can I protect it from app side and also from web side ?

thanx in advance.

alsalimi
  • 131
  • 1
  • 1
  • 10
  • 1
    Here are some links which help you. 1) https://developer.android.com/studio/build/shrink-code.html 2) https://www.guardsquare.com/en/proguard/manual/examples#androidapplication – Andy Developer Dec 12 '16 at 07:09

2 Answers2

3

Use Proguard.

  1. You need to remove Log messages.
  2. Set minifyEnabled to true in your app's build.gradle file.
  3. Set rules for obfuscation

This will shrink your code too much so that your code wouldn't be human readable. But, people can still decompile it.

Read this question, for API Keys and other private data.

Graham
  • 7,431
  • 18
  • 59
  • 84
rupinderjeet
  • 2,984
  • 30
  • 54
0

The best way to protect your data is to only allow authenticated users access their own data and data that can't be used in a harmful way i.e. not other users data. In that way it doesn't matter if the user access the API with his/her own user credentials.

e7andy
  • 58
  • 1
  • 2
  • 11