ImagePicker icon indicating copy to clipboard operation
ImagePicker copied to clipboard

App crash in Arabic Languages

Open Prince115 opened this issue 1 year ago • 1 comments

Hi,

I am using this library to upload images using camera and gallery.

I am facing issue while Arabic is default language for mobile and upload or capture the image using app.

So anyone have any solution please guide me to resolve the issue.

Thanks in advance

Prince115 avatar May 20 '23 12:05 Prince115

@Prince115 I think this is because of the image file name on arbic locale, the library have a method to get the timestamp using device default so it could returns the time timestamp in arabic and it really not supported as a valid filename.

private fun getTimestamp(): String { val timeFormat = "yyyyMMdd_HHmmssSSS" return SimpleDateFormat(timeFormat, Locale.getDefault()).format(Date()) }

solution is change it to US locale

private fun getTimestamp(): String { val timeFormat = "yyyyMMdd_HHmmssSSS" return SimpleDateFormat(timeFormat, Locale.US).format(Date()) }

ratheeshcn avatar Jul 05 '23 08:07 ratheeshcn