startActivityForResult does not returns anything (Image Picking from a PreferenceActivity)
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a "Select image" in a PreferenceActivity: Intent i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(i, IMAGE_SELECT); But when I pick an image from Gallery, it does not return anything to my PreferenceActivity's onActivityResult: @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { Toast.makeText(getApplicationContext(), "THIS TOAST IS NOT SHOWING", Toast.LENGTH_LONG).show(); } What more I need to do? Add something to the