Will Onactivityresult() Restart My Activity?
In my activity I am setting all the Views like ImageView, TextViews with theirs respective data using AsyncTask. after asyncTask.Execute(); I have a textView.onCLickListener which
Solution 1:
Looks like you're recreating the activity again by creating a new intent and starting the activity in the startActivityForResult logic (bottom part of your code)
Solution 2:
Its an issue of memory leak . Try using
BitmapFactory.OptionsbmOptions=newBitmapFactory.Options();
bmOptions.inSampleSize = 8;
As image taken from camera is produces huge sized bitmaps
Solution 3:
You are starting the activity again after receiving the picture. Thats why onCreate is called and the AsyncTask executes again.
Solution 4:
Camera activity is meant to run in background.
Hence calling camera using the intent
IntentcameraIntent=newIntent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, CAMERA_REQUEST);
will call the doInBackground(String... params)
Post a Comment for "Will Onactivityresult() Restart My Activity?"