FolioReader / FolioReader-Android

A Java ePub reader and parser framework for Android.
BSD 3-Clause "New" or "Revised" License
2.24k stars 715 forks source link

problem port in some arabic/india phone #400

Open mohamed-bo opened 4 years ago

mohamed-bo commented 4 years ago

Issue / Feature - FolioReader version -
FolioReader Stock / Modified -
Android SDK - Mobile / Tablet / Emulator Info -
Crash / Error -

Steps to reproduce / Describe in detail - some india and arabic phone can't read books with folioreader that's the problem java.lang.IllegalArgumentException: Invalid URL port: "٨٠٨٠" how can i slove this problem and replace ٨٠٨٠ to 8080 E/FolioActivity: -> Failed to initialize book java.lang.IllegalArgumentException: Invalid URL port: "٨٠٨٠" at okhttp3.HttpUrl$Builder.parse(HttpUrl.java:1397) at okhttp3.HttpUrl.get(HttpUrl.java:916) at retrofit2.Retrofit$Builder.baseUrl(Retrofit.java:458) at com.folioreader.FolioReader.initRetrofit(FolioReader.java:215) at com.folioreader.ui.activity.FolioActivity.initBook(FolioActivity.kt:499) at com.folioreader.ui.activity.FolioActivity.setupBook(FolioActivity.kt:447) at com.folioreader.ui.activity.FolioActivity.onCreate(FolioActivity.kt:296) at android.app.Activity.performCreate(Activity.java:7224) at android.app.Activity.performCreate(Activity.java:7213) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2926) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:201) at android.app.ActivityThread.main(ActivityThread.java:6810) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)

amitkumar19 commented 3 years ago

Hi @mohamed-bo did you able to fix it ?

mohamed-bo commented 3 years ago

Hi @mohamed-bo did you able to fix it ?

Yes i fixed it

ibrahimzakzouk commented 3 years ago

Hi @mohamed-bo did you able to fix it ?

Yes i fixed it

How did you fix it bro ?

joeyoggie commented 3 years ago

@ibrahimzakzouk i fixed it from outside the library, by manually setting the app locale to English, then after I'm finished with the reading, I revert back to the original Locale.

kaushikgodhani commented 1 year ago

@ibrahimzakzouk i fixed it from outside the library, by manually setting the app locale to English, then after I'm finished with the reading, I revert back to the original Locale.

can you please provide code ?