Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

App crash in Arabic Languages #328

Open
Prince115 opened this issue May 20, 2023 · 1 comment
Open

App crash in Arabic Languages #328

Prince115 opened this issue May 20, 2023 · 1 comment

Comments

@Prince115
Copy link

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

@ratheeshcn
Copy link

ratheeshcn commented Jul 5, 2023

@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()) }

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants