if my phone is set to Arabic and i use my app i get some crashes when i try to use the timedialog and datedialog because the Arabic numbers are written differently.
it happens after when i try to use the string that i converted from the returned long. so is it possible to use ONLY numbers as usual in timedialog or datedialog even if the phone language is set to Arabic?
thanx erel i have tested it but i found 1 issue using this code.
i put it in starter service in create event and then i am trying to choose the date and it is working BUT after an ad appears and i close the ad and return to the application that setting is gone and i have again arabic digits.
so i guess i will need to put this code in activity_resume and not in starter service. what do you think?
ok this will not work. not in activity_resume and not in activity_create.
the only way it works is putting it in starter_create event but it works until you exit and return to the app. (like showing an ad)
This is strange as the code sets the process default locale. It can only happen if the process is killed and then started without starting the starter service. If you can reproduce it in a small project then I'll test it.
This is strange as the code sets the process default locale. It can only happen if the process is killed and then started without starting the starter service. If you can reproduce it in a small project then I'll test it.
This is the correct code and it should be in Activity_Create:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim ctxt, jo As JavaObject
ctxt.InitializeContext
jo.InitializeStatic("java.util.Locale")
ctxt.RunMethodJO("getResources", Null).RunMethodJO("getConfiguration", Null).RunMethod("setLocale", Array(jo.GetField("US")))
jo.RunMethod("setDefault", Array(jo.GetField("US")))
End Sub
This is the correct code and it should be in Activity_Create:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim ctxt, jo As JavaObject
ctxt.InitializeContext
jo.InitializeStatic("java.util.Locale")
ctxt.RunMethodJO("getResources", Null).RunMethodJO("getConfiguration", Null).RunMethod("setLocale", Array(jo.GetField("US")))
jo.RunMethod("setDefault", Array(jo.GetField("US")))
End Sub