CodePudding user response:
Post code, DDMS error information postedIt is no good guess
CodePudding user response:
Protected void onActivityResult (int requestCode, int the resultCode, Intent data) {Super. OnActivityResult (requestCode, the resultCode, data);
If (the resultCode==RESULT_OK) {
If (requestCode==RESULT_IMAGE & amp; & The data!=null) {
//album
Cursor Cursor=this. GetContentResolver () query (data. The getData (), null, null, null, null);
If (cursor!=null) {
Cursor. MoveToFirst ();
String imagePath=cursor. Get String (cursor. GetColumnIndex (" _data while forming "));
Intent Intent=new Intent (MainActivity. This, PuzzleMain. Class);
Intent. PutExtra (MY_PICPATH, imagePath);
Intent. PutExtra (" mType "mType);
Cursor. The close ();
startActivity(intent);
}
{} else if (requestCode==RESULT_CAMERA)
//camera
Intent Intent=new Intent (MainActivity. This, PuzzleMain. Class);
Intent. PutExtra (MY_PICPATH TEMP_IMAGE_PATH);
Intent. PutExtra (" mType "mType);
startActivity(intent);
}
}
}