我面临一个奇怪的问题,希望有人能帮助我。
我有一个应用程序,用户可以从图库中选择图片,然后制作一些版本。...问题在某些设备上发生,返回的图片URI加载了图片的缩略图。
在我的Note 8(具有动态对焦模式,又称为“人像”模式)下,它始终返回这些图片的缩略图。我不知道为什么。
我的代码:
private void openGallery(){
Intent pickPhotoIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
try{
startActivityForResult(pickPhotoIntent, PICK_IMAGE_REQUEST);
}catch (ActivityNotFoundException e){
FirebaseCrash.report(e);
if(mToast != null)
mToast.cancel();
mToast = Toast.makeText(getApplicationContext(),getResources().getText(R.string.no_gallery),Toast.LENGTH_LONG);
mToast.show();
}
}
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if(requestCode == REQUEST_PRO){
if(resultCode == RESULT_OK){
AnalyticsManager.UserEnteredIn(FirebaseAnalytics.getInstance(this),AnalyticsManager.PRICE);
billingProcessor.purchase(Home.this,ImageXY.APESCT_PRO);
}
}
else if(requestCode == PICK_IMAGE_REQUEST){
if(resultCode == RESULT_OK){
if(data != null && data.getData() != null){
onImageReceived(data.getData());
}else
Toast.makeText(getApplicationContext(),"Image Loading Error",Toast.LENGTH_SHORT).show();
}
}
if (!billingProcessor.handleActivityResult(requestCode, resultCode, data))
super.onActivityResult(requestCode, resultCode, data);
}
public void onImageReceived(Uri imageUri) {
Reference.image_uri = imageUri;
Log.d("PICKER","RETURNED");
Intent i = new Intent(getApplicationContext(),ImageEditingActivity.class);
startActivity(i);
}
预先感谢,希望有人能帮助我。