Joke Collection Website - Blessing messages - What is AndroidService?
What is AndroidService?
Service, as you can see from the name, is similar to the normally understood "service". It runs in the background and can be interacted with. It is at the same level as Activity, but it cannot run by itself and needs to be called through an Activity or other Context object, Context.startService() and Context.bindService().
The two methods of starting Service are different. What I want to explain here is that if you do something that takes a lot of time in Service's onCreate or onStart, it is best to start a thread in Service to complete it, because Service runs in the main thread, which will affect your UI operations or Block other things in the main thread.
When do you need Service? For example, when playing multimedia, the user starts other activities. At this time, the program needs to continue playing in the background, such as detecting changes in files on the SD card, or recording changes in your geographical information location in the background, etc. In short, services are always hidden in Behind.
- Previous article:There has been no news since Unicom recruited the school.
- Next article:Broadband speed is limited by operators. Is there any way?
- Related articles
- How to type faster on IPHone?
- What should I do if the file can't be opened (solutions and precautions)
- Lend you a loan app to send text messages.
- SMS Reminder of Shenzhen Real Estate Center
- What are the marketing highlights of Three Squirrels?
- Thank you for the short sentence of the workplace tutor.
- Baby's birthday message
- How to recover from deleting SMS on Apple's mobile phone?
- Best regards for Goddess Day.
- How much will Gome e-card borrow to get credit information?