bahar_p
bahar_p

Reputation: 441

android - Accelerations work only in debug

I have an app that records the phone's accelerations and saves them to a file. When I check the app in debug mode on my phone, everything works great. When I take the apk file and install it one the phone, the app dose'nt saves any accelerations?

Why is that?

Thanks!

Upvotes: 0

Views: 155

Answers (1)

bahar_p
bahar_p

Reputation: 441

Found the problem. When I debugged my code (service) I used android.os.Debug.waitForDebugger(); so I can debug the code. It seems that this line blocks the code after it while in release mode. I removed the line and the problem solved.

Upvotes: 1

Related Questions