Jump to content

Tim Clover

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. I am having a similar problem updating an app that was created over 5 years ago. I followed the solutions at https://github.com/emozgun/delphi-android-SAF and implemented methods to copy a sqlite database from the Internal Storage/Documents folder (TPath.GetSharedDocumentsPath) to TPath.GetPublicPath then into the apps internal path (TPath.GetDocumentsPath). After the process, My app detects the database file but FireDac cannot open the database file. What Did I Miss?
  2. Tim Clover

    Could not load OpenSSL library.

    Nevermind! I told rad studio to ignore the error as it was spurious in the android environment and everything works just fine. Reinstall of windows must have erased my previous instruction to ignore the error. Thanks Remy for the heads up on .dll locations, I'll remove them from Windows\SysWOW and Windows\System32 Tim Clover, Cloversoft
  3. Tim Clover

    Could not load OpenSSL library.

    I just had to do a windows 10 upgrade in place because my windows update was stuck in January and wouldn't update. Now I'm getting eidosslcouldnotloadssllibrary could not load ssl. I'm assuming the ssleay.dll and libeay.dll were in the windows directory and got deleted with the upgrade? I'm working on an android app that indy was working just fine in but now it goes poof! Where should the files reside on windows development system? i put the copies in the embarcadero programs folder (C:\Program Files (x86)\Embarcadero\Studio\22.0\bin\subversion) into Windows\SysWOW and Windows\System32 but it doesn't help. Delphi 11.2
  4. Tim Clover

    Send Email from Android with HTML message body

    Thank you so much for your help Remy and Dave. I gave it the old college try but after ultimately striking out I found this: From StackOverflow 2018: "Google has removed that feature from gmail application so its not possible to send tag content to gmail . " I have tried every permutation with Intents method including all of the suggestions that Remy Lebeau and Dave Nottage so kindly sent me, The email app on the device (GMail) always shows the unformatted text instead of the HTML text. The funny thing is I have a working version that uses Indy that can send an email message body in HTML and will show it (in gmail) formatted properly. The whole reason I went down this rabbit hole was to make setting up the email easier for the user. If you use smtp.gmail.com to send it, you need to jump through a bunch of hoops to do it. ie: set up 2 factor ID, get an app password. Users will just forget about using your app is it is too complicated to set up. Final try works but no HTML shown procedure TfrmMain.SendMailViaIntent(const AText: string); var Intent: JIntent; sMessageBody,sMessagePlaintext:string; Recipients: TJavaObjectArray<JString>; begin sMessageBody:=Body.Lines.Text; sMessagePlaintext:=slMessage.Text; Intent := TJIntent.Create; Intent.setAction(TJIntent.JavaClass.ACTION_SEND); Intent.setFlags(TJIntent.JavaClass.FLAG_ACTIVITY_NEW_TASK); Recipients := TJavaObjectArray<JString>.Create(1); Recipients.Items[0] := StringToJString(AText); Intent.setType(StringToJString('text/html'));//not showing as html Intent.putExtra(TJIntent.JavaClass.EXTRA_EMAIL,Recipients); Intent.putExtra(TJIntent.JavaClass.EXTRA_SUBJECT, StringToJString(edOutSubject.Text)); Intent.putExtra(TJIntent.JavaClass.EXTRA_TEXT,StringToJString(sMessagePlaintext)); Intent.putExtra(TJIntent.JavaClass.EXTRA_HTML_TEXT, TJHtml.JavaClass.fromHtml(StringToJString(sMessageBody), 0)); SharedActivity.startActivity(TJIntent.JavaClass.createChooser(Intent, StrToJCharSequence('Which email app?'))); end; Tim Clover, Cloversoft
  5. Tim Clover

    Send Email from Android with HTML message body

    Thank you all so much for your help! I never would have been able to wade through this aspect of Delphi without your help. I am a self taught Delphi software developer age 70. I created my job and my company in 1993, Tim Clover Cloversoft
  6. Tim Clover

    Send Email from Android with HTML message body

    I will try adding text just to EXTRA_HTML_TEXT as you suggest. I'm not sure how to access Html.FromHtml(), I am using the following units: {$IFDEF ANDROID} Androidapi.Helpers, Androidapi.JNIBridge, Androidapi.JNI.JavaTypes, Androidapi.JNI.GraphicsContentViewText, FMX.Platform.Android, Androidapi.JNI.Os, Androidapi.JNI.Net, Androidapi.JNI.Webkit, {$ENDIF} Is the Html.FromHtml() function part of these units? Could you possibly give me an example of how to call the function? Thank you very much for your response to my question! Tim Clover
  7. I'm having difficulties getting HTML into the body of an email message when I send using intents, which opens the email app on the device to send the message. My application is able to put the html code into the body via this method but the message just shows the html code, not the browser type view of the code. What am I doing wrong? Code follows: procedure TfrmMain.SendMailViaIntent(const AText: string); var Intent: JIntent; sMessageBody:string; Recipients: TJavaObjectArray<JString>; begin sMessageBody:=Body.Lines.Text; //Intent := TJIntent.Create; Intent := TJIntent.JavaClass.init(TJIntent.JavaClass.ACTION_SEND); Recipients := TJavaObjectArray<JString>.Create(1); Recipients.Items[0] := StringToJString(AText); //Intent.setType(StringToJString('message/rfc822')); Intent.setType(StringToJString('text/html'));//not showing as html Intent.putExtra(TJIntent.JavaClass.EXTRA_EMAIL,Recipients); Intent.putExtra(TJIntent.JavaClass.EXTRA_SUBJECT, StringToJString(edOutSubject.Text)); //Intent.putExtra(TJIntent.JavaClass.EXTRA_STREAM, StringToJString(sMessageBody)); Intent.putExtra(TJIntent.JavaClass.EXTRA_TEXT, StringToJString(sMessageBody)); Intent.putExtra(TJIntent.JavaClass.EXTRA_HTML_TEXT, StringToJString(sMessageBody)); TAndroidHelper.Activity.startActivity(TJIntent.JavaClass.createChooser(Intent, StrToJCharSequence('Which email app?'))); end;
×