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

前端 未结 6 2157
情书的邮戳
情书的邮戳 2021-02-10 13:54

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:42

    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.

提交回复
热议问题