Is there a way to determine whether an Android application is signed for production or debug at runtime?

后端 未结 4 489
执念已碎
执念已碎 2021-02-06 15:33

Is there a way to determine whether an Android application is signed for production or debug at runtime?

4条回答
  •  再見小時候
    2021-02-06 16:19

    We use a much simpler way:

    if (BuildConfig.DEBUG) {
        // we're in debug mode
    } else {
        // we're in production mode
    }
    

提交回复
热议问题