How to make Android app automatically configure w/ debug vs. release values?

前端 未结 6 2155
故里飘歌
故里飘歌 2021-02-10 14:13

I\'m working on an Android app, specifically one that uses the Facebook Android SDK. In development mode, I\'m working with a test Facebook app that goes by one ID. However, i

6条回答
  •  独厮守ぢ
    2021-02-10 14:29

    I use a slightly more mundane method (in case you're still interested in solutions).

    At application launch my application checks for the existence of a text file stored in /sdcard/. Each application I have looks for a specific file like "applicationdebug.txt". If the file exists, then the application goes into debug mode and starts being verbose with log statements and using my debug Facebook key, etc.

    Then I simply remove (or rename) the file to on the device to see how the application performs in release mode.

提交回复
热议问题