If you select the short date format in OS what happens when you try your code again?
need to make sure it displays 28-Sep-2018 or similar in your OS time (bottom right usually) then do same test?
So the date separator is being pulled from "somewhere" in the OS, where is it getting the date format - its correct but not using the correct separator. should be dd-MMM-yy
if i change back to New Zealand for example i get:
Which works "ok" but just because we use slashes.
If i cannot use GetLocaleFormatSettings to get the "format settings" as used by the OS how do i retrieve these?
its getting the - from somewhere(DateSeparator), why is that correct yet the short format is not (for US example)
Not sensible to do do date formatting for every county if the detail is present in the OS?
This is the code that is run:
aFormatSettings : TFormatSettings;
aFormatSettings returns with incorrect information. shortDateTime has / instead of - which is what is shown in OS and is also advised as DateDelimiter.
Welcome to try setting your PC (windows Region settings - USA) to this date time format then see what you get:
Short date dd-mmm-yyyy
But this end its broken. it thinks it is dd/mmm/yyyy as reported by the above function.
Returns format settings that are not as set in the OS. This causes econvert errors.
issue is when set to English US in OS, and date format is set to dd-MMM-yy in regional settings in the OS. (windows 10)
Delphi returns a short date format of dd/MMM/yy yet the date seperator is correct "-" in the returned aFormatSettings variable so the returned result from above is not correct.
This is same if using the default FormatSettings.
Is this a delphi bug?
What version delphi are you running? FMX has many bugs, latest version (10.2.3) probably the least amount of bugs... but still has artifacts around drawn labels sometimes.
web is HTML5 typically, Mobile is Java for Android or cocoa for Apple.
I am not aware of any such technology that will do all well, if you are doing anything more than the most basic of apps native is the way to go professionally. EMB FMX is not quite there yet, beta is the best description i could give FMX on Android even on 10.2.3
Depending on what you need you might be ok with just a web app, keep it simple if you can, the less different executable packages to maintain the better. Web is then accessible on any browser, OS independent.
This might help
I use streams to do the scaling, you could use file streams if this is the use.
Note i am also cropping but you could modify to scale without cropping.
procedure ScaleJpg(const Source, Dest: TMemoryStream; Width, Height : Integer); var SourceImg, DestImg: TJPEGImage; Bmp: TBitmap; R: TRect; function CropRect(const Dest: TRect; SrcWidth, SrcHeight: Integer): TRect; var W: Integer; H: Integer; Scale: Single; AOffset: TPoint; begin W := Dest.Right - Dest.Left; H := Dest.Bottom - Dest.Top; Scale := Max(W / SrcWidth, H / SrcHeight); AOffset.X := (W - Round(SrcWidth * Scale)) div 2; AOffset.Y := (H - Round(SrcHeight * Scale)) div 2; with Dest do Result := Rect(Left + AOffset.X, Top + AOffset.Y, Right - AOffset.X, Bottom - AOffset.Y); end; begin //Resizes a larger JPG image Bmp := TBitmap.Create; try SourceImg := TJPEGImage.Create; try //SourceImg.Scale := jsEighth; SourceImg.LoadFromStream(Source); //Center and scale image R := CropRect(Rect(0, 0, Width, Height), SourceImg.Width, SourceImg.Height); Bmp.SetSize(Width,Height); Bmp.Canvas.StretchDraw(R, SourceImg); finally SourceImg.Free; end; DestImg := TJPEGImage.Create; try DestImg := TJPEGImage.Create; DestImg.Assign(Bmp); DestImg.SaveToStream(Dest); //DestImg.SaveToFile('C:\test.jpg'); finally DestImg.Free; end; finally Bmp.Free; end; end;
Thank you Emailx45
However you have not read the question, how does your answer refer to FMX.DialogService?
I did not ask a question regarding TEdit. I am well aware you can set the keyboard type for a TEdit.
Please do not answer a question if you do not have the knowledge. This is the second time you have done this on my questions, you are wasting your time.
If however it is not possible with FMX to specify the input type of the dialog-service, i will put this in with the rest of the features that are missing from EMB software.
EMB if you are going to do something do it properly or not at all.
I wish to use the dialogue service but have number entry only, how do you do this? there is nowhere to set the keyboard or input type unlike in native android with SetInputType?
Are we stuck with qwerty keyboard?
I am specifically referring to this, not how to obtain an ANR report.
#02 pc 000000000054de7d /data/app/com.xxxx-2/lib/arm/libxxxx.so (???)
how do we translate the (???) to something meaningful. This looks like an offset: 54de7d but it does not match the MAP file it appears.
"comming weeks" would EMB care to reimburse us for subscription costs while we wait so we can use the product we have paid for? this is not acceptable and half baked. 10.2.3 is using API and NDK tools that are YEARS old, you cant do this to customers
Can anyone advise how to get the unit and line number in source code from ANR or crash reports on google play?
All I get from my internal code is the libxxxx.so name then (???) line number or procedure called which makes debugging near impossible.
Have tried a lot of different compiler options but nothing seems to improve this. Map file offsets dont match up with the reported offset.
#00 pc 000000000001341c /system/lib/libc.so (syscall+28)
#01 pc 0000000000017539 /system/lib/libc.so (_Z33__pthread_cond_timedwait_relativeP14pthread_cond_tP15pthread_mutex_tPK8timespec+56)
#02 pc 000000000054de7d /data/app/com.xxxx-2/lib/arm/libxxxx.so (???)
#03 pc 00000000007d88b7 /data/app/com.xxxx-2/lib/arm/libxxxx.so (???)
#04 pc 00000000007d8a01 /data/app/com.xxxx-2/lib/arm/libxxxx.so (???)
#05 pc 0000000000069513 /system/lib/libandroid_runtime.so (???)
#06 pc 00000000002443c7 /system/framework/arm/boot.oat (Java_android_app_NativeActivity_onPauseNative__J+90)
at android.app.NativeActivity.onPauseNative (Native method)
at android.app.NativeActivity.onPause (NativeActivity.java:209)
at com.embarcadero.firemonkey.FMXNativeActivity.onPause (FMXNativeActivity.java:200)
Both abysmal and amazing at the same time. Perhaps time to go to forum system not a free one?
Can someone please advise, why is this forum the replacement for the old forum? It looks like it has been built for teens and mobile platform, Hint: We don't use mobile to develop on. Hint: if we want facebook/twitter we would BE ON THOSE PLATFORMS.
Images for someones photo take up 20% of the post. Seriously useless information.
A single line reply takes up a huge amount of vertical space. I really dont want to see mine or anyone else's image of their favorite game or anime character when I am searching how to fix some EMB bug or workaround. IT IS JUST NOT IMPORTANT OR PROFESSIONAL.
Post width utilizes 1/3rd of a 2560 x 1440 display, is this too modern for this forum engine? Why design something that is bad when you can design something that is usable?
Information is buried and the categories are useless. Nowhere to discuss specific items such as mobile/ android/ FMX other than "programming"?
The old forum - poor but not this bad.
Having tools that are usable in a commercial environment is mandatory. This forum is not commercial grade.
so our latest and greatest version of RAD studio only supports: Android NDK, Revision 9c (December 2013)
That is 5 years old (!).
Anyhow I do have NDK r17b and API 28 compiling and running and deploying on 10.2.3, havent come across any specific issues relating to the NDK and API with the features we are using.
The android target is in the xml file:
this is what i have done:
<uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="28" />
which seemed to work.
Where can we find information on what NDK version and API combo we should be using?
Have installed and using API 28 but still on NDK r9c that was dated 2013 that comes with Tokyo 10.2.3
Can we (or should we?) use r17b with Tokyo?
Also why is there no android/ firemonkey specific forum topics? IMO the old forum was antiquated but better than this or is there another forum that we should be using?
and this is with XE10 Berlin Update 1, Im having issues with memory corruption, i found one issue in the Firedac Framework of bad unicode char conversion with buffer overruns, now looking for more of the same in DS...