

limelect
Members-
Content Count
915 -
Joined
-
Last visited
-
Days Won
1
Everything posted by limelect
-
I added for I := 0 to 3 do ShowMessage (inttostr(i)); and it start from 3 all the way up But why ? this is the basic question?
-
@ertank What you say that if i have 3 or 4 ShowMessage in the same procedure the last will show first ? I wander if this is the explanation. what you say that there is kind of a first in last out ? I need more of a theoretical information to be sure.
-
@Rollo62No only free. But still it should not matter. As i call ShowMessage (JStringToString (TJSquareRoot.JavaClass.DisplayDescription)); first. Should it not show first ? why do you think it matters? To make jar i used C:\Program Files\Java\jdk1.8.0_05\bin>jar. The Java2Pas i used the source in the demo. To dbl check i did my own and got the same result except that the demo added procedure RegisterTypes; begin TRegTypes.RegisterType ('SquareRoot.JSquareRoot', TypeInfo(SquareRoot.JSquareRoot)); end; initialization RegisterTypes;
-
Android Compiler Issue in Delphi Tokyo (10.2.3)
limelect replied to Ugochukwu Mmaduekwe's topic in Delphi IDE and APIs
@Dave NottageBy version i mean what ever is needed to change in my Delphi to some thing else. My Delphi works and is stable i am NOT going to change any thing to go into problems. This java should work on my system as on another. Like if i take normal pascal file ,no api or else inside, from ver 5-7 and compile it with 10+ it will compile with no problems. How about placing the java SOURCE here. I did dicompile DWWebChromeClient.class but it is better to have it work on ALL systems. -
Android Compiler Issue in Delphi Tokyo (10.2.3)
limelect replied to Ugochukwu Mmaduekwe's topic in Delphi IDE and APIs
@Dave Nottagesee my last comments here https://github.com/DelphiWorlds/KastriFree/issues/36 If the jar is sensitive to version it is useless. Sorry. -
Android Compiler Issue in Delphi Tokyo (10.2.3)
limelect replied to Ugochukwu Mmaduekwe's topic in Delphi IDE and APIs
I guess the above problem came from me. https://github.com/DelphiWorlds/KastriFree/issues/36 for me i never changed the java JDK 1.8_60. All Android fmx compile with no problem. Compiling without dw-webchromeclient.jar compile with no problem. So in my opinion ,and i mite be wrong, dw-webchromeclient.jar is the problem. -
This my mail attached Delphi software. procedure TForm4.CreateEmail(const Recipient, Subject, Content, Attachment: string); var JRecipient: TJavaObjectArray<JString>; Intent: JIntent; Uri: Jnet_Uri; AttachmentFile: JFile; begin JRecipient := TJavaObjectArray<JString>.Create(1); JRecipient.Items[0] := StringToJString(Recipient); Intent := TJIntent.Create; Intent.setAction(TJIntent.JavaClass.ACTION_SEND); Intent.setFlags(TJIntent.JavaClass.FLAG_ACTIVITY_NEW_TASK); Intent.putExtra(TJIntent.JavaClass.EXTRA_EMAIL, JRecipient); Intent.putExtra(TJIntent.JavaClass.EXTRA_SUBJECT, StringToJString(Subject)); Intent.putExtra(TJIntent.JavaClass.EXTRA_TEXT, StringToJString(Content)); Intent.setType(StringToJString('message/rfc822')); if Attachment <> '' then begin AttachmentFile := TJFile.JavaClass.init(StringToJString(Attachment)); Uri := TJnet_Uri.JavaClass.fromFile(AttachmentFile); Intent.putExtra(TJIntent.JavaClass.EXTRA_STREAM, TJParcelable.Wrap((Uri as ILocalObject).GetObjectID)); end; Intent.setType(StringToJString('vnd.android.cursor.dir/email')); SharedActivity.startActivity(Intent); end; Hebrew text 1. Using NORMAL Gamil phone application on attached Hebrew text file. <<<< NO problem 2. Using my Attached function and Gmail application. <<<< Problem The problem when sending text file with Gmail one can see the text and the attachment with no problem. !!!!!!! When sending SAME text file with Delphi software the attachment is OK but the Hebrew text shown is gibberish. IF i attach HTML file same problem HTML file OK but it is shown in the main mail with gibberish for Hebrew. BE AWARE THAT LOADING THE SAME FILES WITH GMAIL BOTH FILES (text and html) ARE SHOWN OK. P.S the mail sent is open in windows. I thing it is NOT a problem of Unicode. Using galaxy s6 phone.
-
@Remy Lebeau I hope i did not bother too much. After profound instigation it seem that my problem was not any sending software but the software tool. Checking on Gmail on the internet it was OK! So i went back to Thunderbird and found that i had to change the font. Tools>Option> Arial Tools>Option>advanced> incoming mail Hebrew 1255 I have been using this software for years and i did not know. So thanks every body for the help. And that the life of our profession
-
@Remy Lebeau "text/html/pdf/plain" This was one of my tries. I tried also that 'text/html; charset=utf-8' as for the mail using Thunderbird. The good MIME-Version: 1.0 Date: Fri, 22 Nov 2019 16:21:38 +0200 Message-ID: <CA+BVp2YgbiYM=z7GgmUijBug2vb_8mron2SPc2JUcWBRektLjw@mail.gmail.com> Subject: =?UTF-8?B?16LXoNee15fXlw==?= From: shlomo abuisak <limelect@gmail.com> To: shlomo abuisak <limelect@gmail.com> Content-Type: multipart/mixed; boundary="000000000000d976590597f021ef" --000000000000d976590597f021ef Content-Type: multipart/alternative; boundary="000000000000d976550597f021ed" --000000000000d976550597f021ed Content-Type: text/plain; charset="UTF-8" --000000000000d976550597f021ed Content-Type: text/html; charset="UTF-8" <div dir="auto"></div> --000000000000d976550597f021ed-- --000000000000d976590597f021ef Content-Type: text/html; charset="UTF-8"; name="WriteHTML.html" Content-Disposition: attachment; filename="WriteHTML.html" Content-Transfer-Encoding: base64 X-Attachment-Id: 16e937d58ab2ffb332f1 Content-ID: <16e937d58ab2ffb332f1> PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDov .... the attached The bad MIME-Version: 1.0 Date: Sat, 23 Nov 2019 08:25:49 +0200 Message-ID: <CA+BVp2Z4yov+j1enXhhxoQ4vyb7YJSbaTfiwP=vO9PDcPpvCHg@mail.gmail.com> Subject: =?UTF-8?B?15vXm9ei16LXotei16I=?= From: shlomo abuisak <limelect@gmail.com> To: shlomo abuisak <limelect@gmail.com> Content-Type: multipart/mixed; boundary="0000000000001459090597fd9ad4" --0000000000001459090597fd9ad4 Content-Type: multipart/alternative; boundary="0000000000001459060597fd9ad2" --0000000000001459060597fd9ad2 Content-Type: text/plain; charset="UTF-8" --0000000000001459060597fd9ad2 Content-Type: text/html; charset="UTF-8" <div dir="auto"></div> --0000000000001459060597fd9ad2-- --0000000000001459090597fd9ad4 Content-Type: application/octet-stream; name="WriteHTML.html" Content-Disposition: attachment; filename="WriteHTML.html" Content-Transfer-Encoding: base64 X-Attachment-Id: 16e96f016642ffb332f1 Content-ID: <16e96f016642ffb332f1> PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDov... the attached
-
@Remy Lebeau "text/html/pdf/plain" This was one of my tries. I tried also that 'text/html; charset=utf-8' as for the mail using Thunderbird. The good MIME-Version: 1.0 Date: Fri, 22 Nov 2019 16:21:38 +0200 Message-ID: <CA+BVp2YgbiYM=z7GgmUijBug2vb_8mron2SPc2JUcWBRektLjw@mail.gmail.com> Subject: =?UTF-8?B?16LXoNee15fXlw==?= From: shlomo abuisak <limelect@gmail.com> To: shlomo abuisak <limelect@gmail.com> Content-Type: multipart/mixed; boundary="000000000000d976590597f021ef" --000000000000d976590597f021ef Content-Type: multipart/alternative; boundary="000000000000d976550597f021ed" --000000000000d976550597f021ed Content-Type: text/plain; charset="UTF-8" --000000000000d976550597f021ed Content-Type: text/html; charset="UTF-8" <div dir="auto"></div> --000000000000d976550597f021ed-- --000000000000d976590597f021ef Content-Type: text/html; charset="UTF-8"; name="WriteHTML.html" Content-Disposition: attachment; filename="WriteHTML.html" Content-Transfer-Encoding: base64 X-Attachment-Id: 16e937d58ab2ffb332f1 Content-ID: <16e937d58ab2ffb332f1> PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDov .... the attached The bad MIME-Version: 1.0 Date: Sat, 23 Nov 2019 08:25:49 +0200 Message-ID: <CA+BVp2Z4yov+j1enXhhxoQ4vyb7YJSbaTfiwP=vO9PDcPpvCHg@mail.gmail.com> Subject: =?UTF-8?B?15vXm9ei16LXotei16I=?= From: shlomo abuisak <limelect@gmail.com> To: shlomo abuisak <limelect@gmail.com> Content-Type: multipart/mixed; boundary="0000000000001459090597fd9ad4" --0000000000001459090597fd9ad4 Content-Type: multipart/alternative; boundary="0000000000001459060597fd9ad2" --0000000000001459060597fd9ad2 Content-Type: text/plain; charset="UTF-8" --0000000000001459060597fd9ad2 Content-Type: text/html; charset="UTF-8" <div dir="auto"></div> --0000000000001459060597fd9ad2-- --0000000000001459090597fd9ad4 Content-Type: application/octet-stream; name="WriteHTML.html" Content-Disposition: attachment; filename="WriteHTML.html" Content-Transfer-Encoding: base64 X-Attachment-Id: 16e96f016642ffb332f1 Content-ID: <16e96f016642ffb332f1> PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDov... the attached
-
@Remy Lebeau I took your suggestion I open for edit both mail one with Delphi software the other with google mail. This is the good mail Content-Type: text/html; charset="UTF-8"; name="WriteHTML.html" This is with Delphi attach the bad Content-Type: application/octet-stream; name="WriteHTML.html" I tried Intent.setType(StringToJString('message/rfc822; charset=utf-8')); or Intent.setType(StringToJString('html ..... or text.... And many other combinations nothing. I wander if there is a instruction that changes Content beside Intent.setType ?
-
@Remy LebeauBy the way i have an option not to attach but sending just text , the same text. Sending it (not attaching) the Hebrew is OK !! This is what i use procedure TForm4.SpeedButton1Click(Sender: TObject); var {$IFDEF Android} Intent: JIntent; {$ENDIF} begin Intent := TJIntent.Create; Intent.setType(StringToJString('text/html/pdf/plain')); // Defines the data string. Intent.setAction(TJIntent.JavaClass.ACTION_SEND);//ACTION_VIEW); //Defines the Action. Intent.putExtra(TJIntent.JavaClass.EXTRA_TEXT, StringtoJString(Form2.St)); if MainActivity.getPackageManager.queryIntentActivities(Intent, TJPackageManager.JavaClass.MATCH_DEFAULT_ONLY).size > 0 then //Checks if there is at least one application capable of receiving the intent. MainActivity.startActivity(Intent) //Calls startActivity() to send the intent to the system. else ShowMessage('Receiver not found'); end;
-
@Remy Lebeau looking into the raw did not help. The content is -0000000000009167230597ebd2b6 Content-Type: text/html; charset="UTF-8" << this is OK. and the attached is Content-Transfer-Encoding: base64 X-Attachment-Id: 16e9172ed2a2ffb332f1 Content-ID: <16e9172ed2a2ffb332f1> Have you an idea which is the best place to put my problem for Android. Since it seem to be an Android question. P.S do not forget that loading the same text not with our application it is OK. Did i say crazy? May be an Android bug?
-
@Maher Tannous For Hebrew I am using the above solution. It works great. changing those 3 files FMX.TextLayout.GPU, FMX.FontGlyphs and FMX.FontGlyphs.Android. Since i do not know Arabic i cannot check for it. What i will do in the future add Arabic K.B and see the connection of characters. May be some one around me will help with this. Further on my project see a new problem
-
@Remy Lebeau reading your comment a few times let me think where in my software should i insert your suggestion? In Intent.setType some how? Just found should i try ?
-
@Remy Lebeau It seem to be more profound of a problem not Delphi only. As i wrote in my last comment i did a small application for Android Studio based on https://www.javacodegeeks.com/2013/10/send-email-with-attachment-in-android.html and it has the same problem. I do not think it is a decoding problem . And why? Attaching the same text file strait from Gmail application in my phone and sending it to my computer , text shown OK attach OK. Using either Delphi or Android Studio applications has this problem. (Using the same Gmail application on the phone). Viewing the mail received text gibberish attach OK. It seems that some thing very profound is missing in all programs. Am i wrong ?
-
In my investigation ,whats going on, i wrote an application with Android Studio. I loaded my text file and the result are the same as with Delphi. So one cannot blame Delphi. That is the good news the bad is the gibberish.
-
@Lars FosdalThis is what i get from the above demo when i insert HEBREW text first line of file second line of file second line שלמה ×בייצחק of file The attached is OK And what it suppose to be lines.Add('first line of file'); lines.Add('second line of file'); lines.Add('second line שלמה אבייצחק of file'); ^^^^ Hebrew
-
@Lars Fosdal In my opinion some thing is not correct the way i am sending the attach and it has nothing to do with utf-8. I even used this pas file. same result https://github.com/roywoll/wwEmailWithAttachment_fmx Some thing very basic wrong.
-
@Lars Fosdal HTML yes. '<meta charset="utf-8">' My comments "BE AWARE THAT LOADING THE SAME FILES WITH GMAIL BOTH FILES (text and html) ARE SHOWN OK." I am using on the SAME text file once GMAIL and once GMAIL FROM MY application !!!! That is what bugs me. GMAIL shows the attached text file. it is crazy. since it is the same file.
-
@Lars Fosdal where in the source there is a place for UTF-8? Be aware that i am using the SAME GMAIL phone application. Once from my application and once stand alone application.
-
Using Delphi 10.2.3 ,Web Browser and Hebrew. I have 2 devices Samsung s6 and s2. On S6 no problem. I am generating an HTML. Hebrew text is gibberish on Samsong S2. Tried: 1. <meta content="text/html; charset=ISO-8859-1 and 8 2. TStringStream.Create(TEXT, TEncoding.Unicode); 3. '<big style="font-family: Courier;">' + TEXT (tried a few fonts) Going into a Hebrew site with Web Browser NO PROBLEM ! on s2. Thanks for your help
-
The answer was amazingly simple add <meta charset="utf-8">
-
@stijnsandersAlthough you are right but this problem is a not realy a code but a fundamental since on S2 it dose not work but on S6 it dose. I also checked the code on "Kompozer " which shown as good code. As i said there is some thing that i miss. I recall there should be some line for Microsoft IEXPLORER ? I will keep investigating.