拍照bug修复2
This commit is contained in:
parent
edf3f494da
commit
ea649da8dd
@ -9,6 +9,8 @@ import android.provider.MediaStore;
|
||||
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
import com.sdk.base.framework.utils.app.AppUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
@ -39,7 +41,7 @@ public class ImageGetUtil {
|
||||
if(imageFile!=null){
|
||||
if(Build.VERSION.SDK_INT>= Build.VERSION_CODES.N){
|
||||
/*7.0以上要通过FileProvider将File转化为Uri*/
|
||||
uri = FileProvider.getUriForFile(act.getApplicationContext(),"com.arpa.hndahesudintocctmsdriver.fileprovider",imageFile);
|
||||
uri = FileProvider.getUriForFile(act.getApplicationContext(), AppUtils.getPackageName()+".fileprovider",imageFile);
|
||||
}else {
|
||||
/*7.0以下则直接使用Uri的fromFile方法将File转化为Uri*/
|
||||
uri = Uri.fromFile(imageFile);
|
||||
|
Loading…
Reference in New Issue
Block a user