android - When should I start and stop my notification service? -


I do not want the user to be in the application during the notification service application. As of now, I'm starting it in Creative and Reissue methods and stopping it in on pause method. Is it true?

Also, is it enough to specify the intent to stop and implement the stop service (intent)? There is no direct connection between the methods of opening and stopping, except that they refer to the same class.

Thanks for any help.

The activity is lifecycle.

As you will see, onCreate () and onResume () activity is said to be said before so that you do not start your information service there Want to do You should stop it instead. It is a good idea to do this at onResume () because it is the entry point of your activity.

is OnPause () where users move away from the activity, so this is where you want to start the service again.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -