-
Content Count
139 -
Joined
-
Last visited
-
Days Won
1
Everything posted by microtronx
-
Hi Lars, No rights are there. I'm requesting all rights on application start so we have access to filesystem ... as said, it works when i create all db-components in code and i can write / read.
-
I don't think it has to do with that, because I can use the sqlite db with creating components in code and excluding Data.DB from uses.
-
Good morning Dave, it is crazy but possible it has to do with Android 9? In my case everything works if i don't use the Data.DB and that means, i have to create all DB-Components in code. I'm doing this, using tSQLConnection and tSQLQuery for all access to SQLite Database files from app and from service. It works but something is not ok in Delphi. I use latest Rio with all available patches.
-
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 ...
-
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...
-
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,
-
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.
-
Need help: Datasnap, Rest, Json and Marshalling
microtronx replied to microtronx's topic in Network, Cloud and Web
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. -
Why i can't use TDSRestConnection in Rio and Android Service ... not starting any more
microtronx posted a topic in FMX
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? -
Why i can't use TDSRestConnection in Rio and Android Service ... not starting any more
microtronx replied to microtronx's topic in FMX
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. -
Why i can't use TDSRestConnection in Rio and Android Service ... not starting any more
microtronx replied to microtronx's topic in FMX
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? -
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!
-
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.
-
Simple Android App Template
microtronx replied to microtronx's topic in Job Opportunities / Coder for Hire
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 😉 -
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
-
New projects are not using things like "tstringlist" as a result ... Yep, we will change all "old" projects. Thx.
-
Great, so all rest-server-apps are not compatible with prior clients ...
-
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
-
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.
-
The Rest-Application's difference is between Tokyo and Rio. I'll try to isolate that at a later time ...
-
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 !
-
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 ...
-
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?
-
What about assigning the Subject and Body as Utf8Encoded with msg.Subject := UTF8Encode(Subject); if not IsBodyHtml then msg.Body.Text := UTF8Encode(EmailBody);
-
Drag and Drop Component Suite + Drop to Outlook not working
microtronx replied to microtronx's topic in VCL
Changed to tDropEmptySource with tDataFormatAdapter set to TVirtualFileStreamDataFormat and now it looks like it works ... +Anders: Thanks a lot for you tip!