हालिया ऐप्स सूची से एक एंड्रॉइड ऐप स्वाइप करते समय क्या होता है?

विषयसूची:

हालिया ऐप्स सूची से एक एंड्रॉइड ऐप स्वाइप करते समय क्या होता है?
हालिया ऐप्स सूची से एक एंड्रॉइड ऐप स्वाइप करते समय क्या होता है?

वीडियो: हालिया ऐप्स सूची से एक एंड्रॉइड ऐप स्वाइप करते समय क्या होता है?

वीडियो: हालिया ऐप्स सूची से एक एंड्रॉइड ऐप स्वाइप करते समय क्या होता है?
वीडियो: Microsoft password reset: How to reset forgotten Microsoft account password in windows 10/laptop pc - YouTube 2024, अप्रैल
Anonim
जब आप अपने एंड्रॉइड वर्तमान में चल रहे-ऐप्स सूची से ऐप को स्वाइप करते हैं, तो एप्लिकेशन और डेटा के साथ वास्तव में क्या होता है? जैसा कि हम जांच करते हैं पढ़ें।
जब आप अपने एंड्रॉइड वर्तमान में चल रहे-ऐप्स सूची से ऐप को स्वाइप करते हैं, तो एप्लिकेशन और डेटा के साथ वास्तव में क्या होता है? जैसा कि हम जांच करते हैं पढ़ें।

आज का प्रश्न और उत्तर सत्र हमें एंड्रॉइड उत्साही की सौजन्य देता है- स्टैक एक्सचेंज का एक उपविभाग, क्यू एंड ए वेब साइट्स का एक समुदाय संचालित समूह।

प्रश्न

एंड्रॉइड उत्साही पाठक एल्डरारेथिस ऐप-स्वाइप कार्यक्षमता के बारे में उत्सुक है जो आपको होम बटन के माध्यम से चल रहे ऐप्स की अपनी सूची खींचने की अनुमति देता है और फिर उन्हें बंद करने के लिए उन्हें दाईं ओर स्वाइप करता है:

The recent apps list in Ice Cream Sandwich added the ability to swipe apps out of the list, thereby dismissing them permanently (and as far as I know this is a vanilla function, not a CM/custom ROM one). The documentation and platform highlights don’t appear to cover the under-the-hood workings of this functionality, but I’m curious to know what the system is actually doing.

Further adding to my curiosity, I decided to do a quick test: I started up Music on a CM9 install, then backed out of it. I then checked the recent apps list and saw it was indeed there (and in the proper state, based on the thumbnail). I then went into

Settings->Applications

और बल ने संगीत ऐप को रोक दिया, लेकिन यह अभी भी हाल की सूची में सूचीबद्ध था, जिससे मुझे विश्वास था कि यह पृष्ठभूमि में लगी प्रक्रियाओं से जुड़ा हुआ नहीं है।

अब यह समझते हुए कि संगीत खराब विकल्प हो सकता है, मैंने संयुक्त राज्य अमरीका टुडे ऐप के साथ भी परीक्षण किया। यह मूल रूप से वही व्यवहार दिखाता है, और ऐसा लगता है कि इसे बल स्टॉप (जो समझ में आता है) के बाद "पुनः लॉन्च" करने के लिए मजबूर होना पड़ा था, हालांकि हालिया ऐप्स सूची में थंबनेल ने इसे प्रतिबिंबित नहीं किया था (कैश किया गया, मैं अनुमान लगा रहा हूं?)।

तो, जब आप हालिया सूची से ऐप को स्वाइप करते हैं तो ओएस स्तर पर वास्तव में क्या होता है? क्या यह ऐप के डेटा को रैम से बाहर निकाल देता है और कचरा इकट्ठा करता है, जिससे उसकी सहेजी गई स्थिति नष्ट हो जाती है?

जब आप सूची से ऐप को स्वाइप करते हैं तो वास्तव में क्या चल रहा है?

जवाब

एंड्रॉइड उत्साही योगदानकर्ता ऑस्टिन मिल्स कुछ अंतर्दृष्टि प्रदान करता है:

हालिया ऐप्स सूची से ऐप्स को स्वाइप करना वेनिला है, और हां, अच्छी तरह से प्रलेखित नहीं है। यह विभिन्न एंड्रॉइड मंचों पर एक सभ्य चर्चा का विषय रहा है … कुछ टिप्पणियों में आम सहमति का सबसे अच्छा वर्णन किया गया है: यह व्यवहार समान है लेकिन एक ऐप बंद करने के समान नहीं है - सामान्य रूप से (ऐप्स के लिए स्पष्ट बैक बटन हैंडलिंग को परिभाषित न करें) यह वही बात है जो आपके द्वारा बाहर निकलने वाले एप्लिकेशन के भीतर से पर्याप्त बार वापस मारने के समान है।

लिंक में विनिर्देशों पर कुछ और विवरण हैं, लेकिन समग्र रूप से आप इसे छोड़ने के बारे में सोच सकते हैं।

संगीत ऐप के लिए विशिष्ट, मेरा मानना है कि यह एक सेवा शुरू करता है, इसलिए जब कार्य स्वयं (संगीत ऐप / यूआई) बंद हो सकता है, तो सेवा पृष्ठभूमि में चलती रहती है ताकि आपका संगीत अचानक बंद न हो क्योंकि कार्य स्मृति प्रबंधन कारणों के लिए मंजूरी दे दी गई है। इससे आपने जो देखा वह प्रभावित हो सकता है।

फिर, जीवन के प्रश्न-उत्तर-उत्तर मंडल में भाग लेते हुए, एल्डरारेथिस जवाब देने के लिए अपने स्वयं के कुछ शोध के साथ वापस आये:

I appear to have found the magical search terms that led to some explanations from Google employees. Specifically, I found a couple of different places where Dianne Hackborn explains what happens when you swipe something out of the recent list. The first is a comment on one of her Google+ posts:

[W]hat specifically happens when you swipe away a recent task is it: (1) kills any background or empty processes of the application (see here for what this means), and (2) uses the new API to tell any services of the application about the task being removed so it can do whatever it thinks is appropriate.

She also notes in a blog comment:

Actually, removing an entry in recent tasks will kill any background processes that exist for the process. It won’t directly causes services to stop, however there is an API for them to find out the task was removed to decide if they want this to mean they should stop. This is so that removing say the recent task of an e-mail app won’t cause it to stop checking for e-mail.

If you really want to completely stop an app, you can long press on recent tasks to go to app info, and hit force stop there. Force stop is a complete kill of the app - all processes are killed, all services stopped, all notifications removed, all alarms removed, etc. The app is not allowed to launch again until explicitly requested.

So, it looks like the summary is that swiping an app out of the list will first kill all background processes for the app, then use

onTaskRemoved

ऐप को सूचित करने के लिए कि पृष्ठभूमि कार्य हटा दिया गया था। उस बिंदु पर ऐसा लगता है कि यह क्या होता है यह तय करने के लिए ऐप पर निर्भर है, इसलिए मुझे तकनीकी रूप से लगता है नहीं है उस बिंदु से परे ऐप के साथ क्या होता है इसके बारे में एक कठिन और तेज़ नियम।

स्पष्टीकरण में जोड़ने के लिए कुछ है? टिप्पणियों में आवाज उठाओ। अन्य तकनीक-समझदार स्टैक एक्सचेंज उपयोगकर्ताओं से अधिक उत्तरों पढ़ना चाहते हैं? यहां पूर्ण चर्चा धागा देखें।

सिफारिश की: