Search code examples
androidcrashlytics-android

How to keep secure the fabric api key in android?


I am using this example but still i need to write my API key in AndroidManifest.xml..

https://github.com/plastiv/CrashlyticsDemo/


Solution

  • Follow this steps:-

    https://github.com/plastiv/CrashlyticsDemo/

    mostly people have to problem run the gradle command line so you can use like this:

    1) Open terminal.

    2) Go to your project work space

    3) ./gradlew

    (Note if permission denies error use this command- chmod 744 gradlew and again run ./gradlew)

    (4) ./gradlew assemble -P apiKey=Your fabric api key

    Now you can fully secret your api key but remember one thing your fabric.properties looks like that

    fabric.properties:-

    apiSecret=”Your fabric secret key” apiKey=”Your fabric api key”

    Enjoy! You dont need to write your fabric key in your AndroidManifest.xml....