If by “same issue” you mean the generic “not working”… well that is ALL over this forum Or perhaps it is not a common issue after all?
Assuming your code is correct… then the accuracy or even activation of the trigger is likely due to your particular phone. Possibly a permissions issue? And if you have multiple phones connecting to the project, then that might also add to the confusion? Hard to say with limited background info.
Can you post you entire code here (properly formatted for viewing of course ) thanks.
PS Have you looked at some apparently resolved issues and compared code/notes?