How to check if APK is signed or “debug build”?

后端 未结 10 1941
我在风中等你
我在风中等你 2020-11-29 16:34

As far as I know, in android \"release build\" is signed APK. How to check it from code or does Eclipse has some kinda of secret defines?

I need thi

10条回答
  •  庸人自扰
    2020-11-29 16:53

    Another option, worth mentioning. If you need to execute some code only when debugger is attached, use this code:

    if (Debug.isDebuggerConnected() || Debug.waitingForDebugger()) { 
        //code to be executed 
    }
    

提交回复
热议问题