My app works if I run it on terminal but doesn\'t work if I install it on a smartphone. It seems the problem is in a callback function because. This is the code: