Questions about activity being recycled after Samsung phone calls camera return

Source: Internet
Author: User

Today, a problem is very painful ah, other mobile phone is not a problem, but the Samsung model of the mobile phone jump to the camera, back to the activity. This may be the relationship between Samsung's internal recovery mechanism, because the camera will be more expensive to open,

So the subsequent processes are temporarily recycled, adding android:configchanges= "orientation|keyboardhidden|screensize" three attributes, before only the first 2, the activity has disappeared, Join ScreenSize The activity is still there;

But after coming back, these variables are null, so do not use Mediastore.extra_output to open the camera directly, return to the time through Bitmap Bitmap = (Bitmap) Data.getextras (). Get ("data"); Get bitmap.

, but if you want to use Extra_output, you can try to use the Onsaveinstancestate () method, save the status of activity, but I myself useless, worry points, direct use, the front way.

Questions about activity being recycled after Samsung phone calls camera return

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.