I've handler declared onCreate() in my service class. My app fire this handler in certain circumstances ( postDelayed method ). But if by any chance user wants to exit my application, i want that handler to stop (from being executed in X time - with removeCallBacks()). How do i get a reference to that handler object declared in service in my activity, so i can call its method? (proper way). Is that even possible?
I already checked Reference handler object from main activity, but it wasn't very helpful.
I could get a reference via static method, but is this really the proper way to do that?