How to test the onsaveinstancestate method in Android Development

Source: Internet
Author: User

TodayProgramCrash is gone, and I don't know what the problem is. The data is lost. After reading the log for half a day, I finally thought about whether the application process was killed by the system, in Android development, we all know that the background process will be killed when system resources are insufficient. Therefore, the onsaveinstancestate method is required to save the data. How can we test whether the data is saved? How can I reproduce this bug? After thinking for a long time, I checked the information and suddenly realized that the devices of ddms could stop the process. After trying, I could, finally, we found that the problem was caused by data loss caused by system killing. To simulate where the system killed the process, see:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.