Tuesday, February 11, 2014

android phone Samsung galaxy s4 call system camera, my activity was killed


            
Including other activity was static variables in all class variables actually have become empty, and rerun oncreate when returning activity (), because the variables are recycled, it caused a null pointer, the current solution is only in this activity was variable in onSaveInstanceState () store, then a chance, but so many variables it, this is not a good solution.

Prior to this problem, there has been a Samsung mobile phone camera defaults to horizontal screen, vertical screen my application is rotating has problems, then activty manifest file set android: configChanges = "orientation | keyboardHidden | screenSize | keyboard", But to no avail, to admire the guise of the same name Samsung found that many applications are no crashes, but the pictures are all directly after the jump page with pictures custom shades, I want to understand this program, seeking Great God Yeah counseling.

Remaining 80 points, all offer
Reply:
My application is a vertical screen rotation has been a problem -----------> after your application should be rotated Activity lifecycle re-take the one-sided
Reply:
I've done similar applications, tried many phones do not have a problem. But not tried galaxy s4, but I guess we any problem. Go put your code sent me to see.
Reply:
cited a floor guoyoulei520 reply:
my application is vertical screen rotation has been a problem -----------> should After your application is rotated Activity lifecycle re-take the one-sided


reference to the second floor leizuishuai201314 reply:
I've done similar applications, tried many phones do not have a problem. But not tried galaxy s4, but I guess we any problem. Go put your code sent me to see.


fileName = FileNameUtil.getImageDocument () + System.currentTimeMillis () + ". png";
/ / TBCameraInterimActivity.interActivity (this);
file = new File (fileName);
Intent intent = new Intent (MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra (MediaStore.Images.Media.ORIENTATION, 0);
intent.putExtra (MediaStore.EXTRA_OUTPUT, Uri.fromFile (file));
startActivityForResult (intent, CAMERA);
Reply:
Great God seeking help. Online.
Reply:
I found that micro-channel, pops, microblogging call camera, he was not a crash, but jumped into a custom filter interface.
Reply:
Reference, should be able to solve the problem:
how to call android system camera?

Android calling camera and photos stored on the sd card
Reply:
reference to the second floor leizuishuai201314 reply:
I've done similar applications, tried many phones do not have a problem. But not tried galaxy s4, but I guess we any problem. Go put your code sent me to see.

Code no problem,
protected void onActivityResult (int requestCode, int resultCode,
final Intent data) {} This method is in? Testing under way to see if the problem is not the startup mode android: launchMode = "singleTop". Set this
Reply:
reference to the 7th floor leizuishuai201314 reply:
Quote: references to the second floor leizuishuai201314 reply:

I've done similar applications, tried many phones do not have a problem. But not tried galaxy s4, but I guess we any problem. Go put your code sent me to see.

Code no problem,
protected void onActivityResult (int requestCode, int resultCode,
final Intent data) {} This method is in? Testing under way to see if the problem is not the startup mode android: launchMode = "singleTop". Set this


reference to the 6th floor ameyume reply:
reference, should be able to solve the problem:
how to call android system camera?

Android calling camera and photos stored on the sd card


cited a floor guoyoulei520 reply:
my application is vertical screen rotation has been a problem -----------> should After your application is rotated Activity lifecycle re-take the one-sided


Problem has been resolved, the activity is indeed mobile phone recycling of resources, or I say old method onSaveInstanceState (Bundle outState) Save, and then oncrete (Bundle savedInstanceState) {
/ **
* Restore data
* /
if (savedInstanceState! = null) {to save the data reduction}
} To restore data, I do not have a better way, but this approach is a relatively cumbersome, judge a little too much, no way, can not afford to finish the work injury.
Reply:
reference to the 8th floor VcStrong reply:
Quote: references to the 7th floor leizuishuai201314 reply:

Quote: references to the second floor leizuishuai201314 reply:

I've done similar applications, tried many phones do not have a problem. But not tried galaxy s4, but I guess we any problem. Go put your code sent me to see.

Code no problem,
protected void onActivityResult (int requestCode, int resultCode,
final Intent data) {} This method is in? Testing under way to see if the problem is not the startup mode android: launchMode = "singleTop". Set this


reference to the 6th floor ameyume reply:
reference, should be able to solve the problem:
how to call android system camera?

Android calling camera and photos stored on the sd card


cited a floor guoyoulei520 reply:
my application is vertical screen rotation has been a problem -----------> should After your application is rotated Activity lifecycle re-take the one-sided


Problem has been resolved, the activity is indeed mobile phone recycling of resources, or I say old method onSaveInstanceState (Bundle outState) Save, and then oncrete (Bundle savedInstanceState) {
/ **
* Restore data
* /
if (savedInstanceState! = null) {to save the data reduction}
} To restore data, I do not have a better way, but this approach is a relatively cumbersome, judge a little too much, no way, can not afford to finish the work injury.

You really hurt can not afford to do so, but you'd better find the next question, or I say, if all this trouble, android Data Recovery is much more trouble ah, especially the big game.
Reply:
Bulk data can be placed inside the bar application

No comments:

Post a Comment