Jump to content

microtronx

Members
  • Content Count

    136
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by microtronx

  1. microtronx

    Android Service using local sqlite DB

    I have removed all occurences of Data.DB Unit from my project and units and now the Service is working without problems. Seems that Delphi Rio latest Version has problems there ...
  2. microtronx

    Android Service using local sqlite DB

    I was able to track down things, it seems if we use Data.DB in tServiceModule or another unit which is used by the android-service the service is not able to start. Now i create a tFdConnection directly in the tServiceModule by using only these units: FireDAC.Phys.SQLite, FireDAC.Phys.SQLiteDef, FireDAC.Comp.Client, and now the Android Service is running fine. Next I will check if same happens, if we remote Data.DB from ClientModuleUnit's from Rest-Client ... Edit: those FireDAC units are not enough, adding others >> service hangs .. i think some of them uses Data.DB ... Ohh Embarcadero...
  3. microtronx

    Android Service using local sqlite DB

    Hi Cristian, I configure and connect the connection at runtime after the service starts up. It is not connected at designtime. 1. if i remove the unit from implementation uses where tDatamodule with tsqlconnection / tfdconnection is, than the app and service starts. 2. If i let the unit in implementation uses and delete the tfdconnection/tsqlconnection from datamodule but let the interface-uses: Data.DbxSqlite, Data.FMTBcd, Data.DB, Data.SqlExpr; than it hangs! 3. if i do the 2. but remote the units " Data.DbxSqlite, Data.FMTBcd, Data.DB, Data.SqlExpr;" from interface-uses than it hangs 4. if i create the tsqlconnection and a tsqltable directly within the tServiceModule at runtime and add the needed units (see 2.) to interface-uses than it hangs 5. if i change the project file and remove the units for tDatamodule than i can create components at runtime within tServiceModule and it works !! Seems that the problem is connected with tDatamodule? Dont know really... crazy,
  4. Hi, i'm searching now for days how to setup datasnap / json to automatically Marshall and UnMarshall following Object; __Constants = record public vname:string; vwert:variant; end; tmyObject = class(tObject) private [JSONMarshalled(False)] fData:tDictionary<string, __Constants>; fJsonValue:string; fname:string; function getJsonValue():string; procedure setJsonValue(vValue:string); function fData_get(vindex:int64):_Constants; public constructor Create; destructor Destroy; override; property cName:string read fname write fname; property cData[index:int64]:__Constants read fData_get; [JSONMarshalled(true)] property JsonValue:string read getJsonValue write setJsonValue; end; I hoped that the marshaller get's the value of property JsonValue so the getJsonValue() is called and converts the fData to Json but it does not. The Marshaller directly read the fJsonValue which is empty. Also i can't find any good documentation about the attributes like [JSONMarshalled(false|true)] Any help is appreciated.
  5. Thanks for link to rsp. I have read a lot regarding DBXJSONReflect but there is no good documentation so i don't know how to create a custom converter for my object, so that datasnap uses the registered converters for Marshal and UnMarshal.
  6. Hi Folks, i'm new to Android Services world but have successful created my first app with a background-service (used demo of Kastrifree / CrossPlatformLocation) as base. It works good, but as soon i add a tfdconnection for a local sqlite table or a TDSRestConnection for connecting to a remote-server in the service-module it does not start. My question is: What are the limits of a android-service-module created with Delphi Rio? What is blocking the service from starting if we add one of those components?
  7. Now i can note, that only adding the servermethodsclient's unit to implementation use clause is enough so the service is not starting any more. You don't have to use anything in your source.
  8. If i open the demo, select the service as active project and add a new clientmodule to a datasnap-server, save it and change the code in locationchangehandler to this: procedure TServiceModule.LocationChangeHandler(Sender: TObject; const ALocation: TLocationCoord2D; const ASource: TLocationSource); var LStatus: Integer; begin // This is where to use the location data to update a server, or to a database when not connected to the internet and the data is to be sent later LStatus := 0; // Service in foreground means app is inactive if IsForeground then LStatus := 1; if FBackgroundMonitor.IsDozed then LStatus := 2; // FUpdater.SendLocation(ALocation, LStatus); try if locationClientModule.ServerMethodsClient.savelocation('hardwareidxx', aLocation.Latitude, aLocation.Longitude, lStatus, now())=true then begin toslog.d('savelocation REST OK'); end; except on e:Exception do begin toslog.d('savelocation REST Error:'+e.message); end; end; end; plus add the locationclientmodule's unit to implementation/uses the module does not start any more, this is from logcat: 01-22 12:40:55.046 1491 1510 W ActivityManager: Timeout executing service: ServiceRecord{8ba5020 u0 org.xxxx.xxxx/com.embarcadero.services.xxxxLocationService} 01-22 12:40:57.623 1491 1510 E ActivityManager: Reason: executing service org.xxxx.xxxx/com.embarcadero.services.xxxxLocationService I have also tried to add only a tfdConnection and a tfdQuery onto service-module and same problem, the service can't be started. the device i'm testing this is a Huawei P30-Lite with Android 9 on it. Possible that the problem is connected with this?
  9. microtronx

    PaxCompiler

    Guys, have heard about htscripter from Delphihtlmcomponents? We are using it as runtime interpreter and it is working very good and stable plus it registers classes with only few lines of code (rtti) and the most important thing is: it is still developed and optimized by the developer. We have switched over from jvInterpreter! and it was a very good decision!
  10. microtronx

    EDI (Electronic Data Interchange)

    Hi CarloM, we've used https://www.nsoftware.com/in/edi/ to create our own converter which can read and write all versions of Edifact. So give it a try.
  11. microtronx

    Simple Android App Template

    Hi Dave, give me a while so i can check the projects in limelect's suggestion. If i can start with something from there i will need only the service programmed by someone. So yes i'm interested. But i have not too much time so if someone is willing to create everything on his side i can invest my time for serverside so the beta in january is not impossible 😉
  12. Hi programmers, i'm a Delphi programmer now for 20+ years since Delphi 3, having subscription and now on Delphi Rio 10.3.3. Because of not having enough experiences with Android i need a template for starting projects with android: I need at least following functionality: * Login Screen with Register new user screen (all data can be saved / received later from a restserver) * List of Functions Screen like the settings screen on android 9 with a search-area on top + in same area my details with login/registrationdata and below a list of different functions with icon+caption + small description (smaller font) * Function details screen where we have different options details etc (can be made later by us) * An android service in backgroud which can i.e. collect gps positions each x minutes into a table for later use within the app For now this is all. I'm searching for a programmer which has enough experiences with android to create this template / app for us so we can use it as "starting template" with latest Delphi Rio. Offers welcome. Yusuf Zorlu / MicrotronX
  13. microtronx

    RAD Studio 10.3.3 now available

    New projects are not using things like "tstringlist" as a result ... Yep, we will change all "old" projects. Thx.
  14. microtronx

    RAD Studio 10.3.3 now available

    Great, so all rest-server-apps are not compatible with prior clients ...
  15. microtronx

    RAD Studio 10.3.3 now available

    I do nothing special, i open the project compile it with Tokyo and it works, i open the same project without changing anything with Rio 10.3.3 and it does not work. In Rio and in Tokyo it shows System.Classes.xxx when i move the mouse over tStrings and tStringList
  16. microtronx

    RAD Studio 10.3.3 now available

    Here's a example. 1. Servers method: function tmyServerMethods.Load_Scanning_Functions(vuserid:longint):tstrings; var i:integer; begin result:=tstringlist.create; // data is a query ... for i:=1 to vdata.recordcount do begin result.add(inttostr(vdata.fieldbyname('statusid').asinteger)+'|'+vdata.fieldbyname('statusname').asstring); end; vdata.next; end; end; 2. Answer compiled with Tokyo: {"result":[{"type":"System.Classes.TStringList","id":1,"fields":{"FList":[["10|Einlagern",null],["30|Umlagern",null],["400|Kundenbarcode",null],["100|St\u00FCckgutverladung",null],["400|NVE zu Kundenbarcode",null],["",null],["",null],["",null]],"FCount":5,"FCapacity":8,"FSorted":false,"FDuplicates":"dupIgnore","FCaseSensitive":false,"FOwnsObject":false,"FEncoding":null,"FDefaultEncoding":{"type":"System.SysUtils.TMBCSEncoding","id":2,"fields":{"FCodePage":1252,"FMBToWCharFlags":0,"FWCharToMBFlags":0,"FIsSingleByte":true,"FMaxCharSize":1}},"FLineBreak":"\r\n","FUpdateCount":0,"FDelimiter":",","FQuoteChar":"\"","FNameValueSeparator":"="}}]} 3. Answer compiled with Rio: {"result":[{"type":"System.Classes.TStringList","id":1,"fields":{"FList":[["10|Einlagern",null],["30|Umlagern",null],["400|Kundenbarcode",null],["100|St\u00FCckgutverladung",null],["400|NVE zu Kundenbarcode",null],["",null],["",null],["",null]],"FCount":5,"FCapacity":8,"FSorted":false,"FDuplicates":"dupIgnore","FCaseSensitive":false,"FOwnsObject":false,"FCompareStringsOverriden":false,"FEncoding":"","FDefaultEncoding":"1252","FLineBreak":"\r\n","FUpdateCount":0,"FDelimiter":",","FQuoteChar":"\"","FNameValueSeparator":"="}}]} 4. In the client app (compiled with Tokyo) cannot work with the result. We're no able to update the client apps at the moment.
  17. microtronx

    RAD Studio 10.3.3 now available

    The Rest-Application's difference is between Tokyo and Rio. I'll try to isolate that at a later time ...
  18. microtronx

    RAD Studio 10.3.3 now available

    Good / Great news: Some problems with Regular Expressions in 10.3.2 are not appearing in 10.3.3 so this is a good bugfix update! Bad news: A Datasnap Rest Application Server compiled with 10.2 Tokyo is working very good for months without restart, compiled with 10.3.3 it answers with different REST / JSON encoding so client apps don't work any more !
  19. microtronx

    Best components for creating windows service apps

    That means it is still supported? I have send two request to their mails but have not received any answers so i thinked that they not "online" anymore ...
  20. microtronx

    Best components for creating windows service apps

    Thanks for your tips, will think about creating a class for all logic. Has someone used SvCom in the past; are the components still supported?
  21. microtronx

    Sending HTML based eMails with UTF8 encoding and SSL

    What about assigning the Subject and Body as Utf8Encoded with msg.Subject := UTF8Encode(Subject); if not IsBodyHtml then msg.Body.Text := UTF8Encode(EmailBody);
  22. microtronx

    Drag and Drop Component Suite + Drop to Outlook not working

    Changed to tDropEmptySource with tDataFormatAdapter set to TVirtualFileStreamDataFormat and now it looks like it works ... +Anders: Thanks a lot for you tip!
  23. Hi, on my side i can drop from delphi app with this component to desktop without problems but drop to a new message window in outlook is not working. It shows the [+] sign when moving the mouse on that new message form but dropping does nothing See: https://github.com/DelphiPraxis/The-Drag-and-Drop-Component-Suite-for-Delphi/issues/38 Anyone having same issues or a solution?
  24. microtronx

    Drag and Drop Component Suite + Drop to Outlook not working

    Thank you very much Anders, i will try to work with FileContents and FileGroupDescriptor if possible. But it must be possible to drag&drop to desktop or any other target. We have 99.99% only files which are saved to a temporary folder and added to dropsource. If we get it work, we will post it here.
  25. microtronx

    Drag and Drop Component Suite + Drop to Outlook not working

    Here's my Outlook 2019 in 64bit, can someone test this with new Outlook in 32bit so we can compare: TDropFileSource,Execute,>>> TDropFileSource,OnGetDragImage, TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnGetData,IsShowingText TDropFileSource,OnGetData,UsingDefaultDragImage TDropFileSource,OnGetData,DragSourceHelperFlags TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnGetData,DragContext TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnFeedback, TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnGetData,IsShowingText TDropFileSource,OnGetData,UsingDefaultDragImage TDropFileSource,OnGetData,DragSourceHelperFlags TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnGetData,DragContext TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnGetData,Preferred DropEffect TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnGetData,DropEffectFolderList TDropFileSource,OnGetData,Preferred DropEffect TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback,19 TDropFileSource,OnDrop, TDropFileSource,OnGetData,Object Descriptor TDropFileSource,OnGetData,FileName TDropFileSource,OnGetData,CF_HDROP TDropFileSource,OnAfterDrop, TDropFileSource,Execute,<<<
×