ertank
Members-
Content Count
246 -
Joined
-
Last visited
-
Days Won
1
Everything posted by ertank
-
Here is complete output of messages Build Checking project dependencies... Building Project2.dproj (Debug, Android) brcc32 command line for "Project2.vrc" c:\program files (x86)\embarcadero\studio\20.0\bin\cgrc.exe -c65001 Project2.vrc -foProject2.res [Exec Error] The command ""\bin\javac" -d "C:\Users\Ertan\Documents\Embarcadero\Studio\Projects\JavaClasses\Project2" -Xlint:deprecation -classpath "C:\Users\Public\Documents\Embarcadero\Studio\20.0\CatalogRepository\AndroidSDK-2525_20.0.36039.7899\platforms\android-26\android.jar";"c:\program files (x86)\embarcadero\studio\20.0\lib\Android\Debug\android-support-v4.jar";"c:\program files (x86)\embarcadero\studio\20.0\lib\Android\Debug\fmx.jar" -bootclasspath "C:\Users\Public\Documents\Embarcadero\Studio\20.0\CatalogRepository\AndroidSDK-2525_20.0.36039.7899\platforms\android-26\android.jar" -encoding UTF-8 -target 1.6 -g -source 1.6 .\Android\Debug\Project2.java .\Android\Debug\Project2ProxyInterface.java" exited with code 3. Failed Elapsed time: 00:00:00.8 Output Build started 12.01.2020 12:06:25. __________________________________________________ Project "C:\Users\Ertan\Documents\Embarcadero\Studio\Projects\Project2.dproj" (Build target(s)): Target BuildVersionResource: c:\program files (x86)\embarcadero\studio\20.0\bin\cgrc.exe -c65001 Project2.vrc -foProject2.res CodeGear Resource Compiler/Binder Version 1.2.2 Copyright (c) 2008-2012 Embarcadero Technologies Inc. Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0 Copyright (C) Microsoft Corporation. All rights reserved. Deleting file "Project2.vrc". Target BuildAndroidServiceJarFile: "\bin\javac" -d "C:\Users\Ertan\Documents\Embarcadero\Studio\Projects\JavaClasses\Project2" -Xlint:deprecation -classpath "C:\Users\Public\Documents\Embarcadero\Studio\20.0\CatalogRepository\AndroidSDK-2525_20.0.36039.7899\platforms\android-26\android.jar";"c:\program files (x86)\embarcadero\studio\20.0\lib\Android\Debug\android-support-v4.jar";"c:\program files (x86)\embarcadero\studio\20.0\lib\Android\Debug\fmx.jar" -bootclasspath "C:\Users\Public\Documents\Embarcadero\Studio\20.0\CatalogRepository\AndroidSDK-2525_20.0.36039.7899\platforms\android-26\android.jar" -encoding UTF-8 -target 1.6 -g -source 1.6 .\Android\Debug\Project2.java .\Android\Debug\Project2ProxyInterface.java The system cannot find the path specified. c:\program files (x86)\embarcadero\studio\20.0\bin\CodeGear.Common.Targets(871,5): error MSB3073: The command ""\bin\javac" -d "C:\Users\Ertan\Documents\Embarcadero\Studio\Projects\JavaClasses\Project2" -Xlint:deprecation -classpath "C:\Users\Public\Documents\Embarcadero\Studio\20.0\CatalogRepository\AndroidSDK-2525_20.0.36039.7899\platforms\android-26\android.jar";"c:\program files (x86)\embarcadero\studio\20.0\lib\Android\Debug\android-support-v4.jar";"c:\program files (x86)\embarcadero\studio\20.0\lib\Android\Debug\fmx.jar" -bootclasspath "C:\Users\Public\Documents\Embarcadero\Studio\20.0\CatalogRepository\AndroidSDK-2525_20.0.36039.7899\platforms\android-26\android.jar" -encoding UTF-8 -target 1.6 -g -source 1.6 .\Android\Debug\Project2.java .\Android\Debug\Project2ProxyInterface.java" exited with code 3. Done building target "BuildAndroidServiceJarFile" in project "Project2.dproj" -- FAILED. Done building project "Project2.dproj" -- FAILED. Build FAILED. c:\program files (x86)\embarcadero\studio\20.0\bin\CodeGear.Common.Targets(871,5): error MSB3073: The command ""\bin\javac" -d "C:\Users\Ertan\Documents\Embarcadero\Studio\Projects\JavaClasses\Project2" -Xlint:deprecation -classpath "C:\Users\Public\Documents\Embarcadero\Studio\20.0\CatalogRepository\AndroidSDK-2525_20.0.36039.7899\platforms\android-26\android.jar";"c:\program files (x86)\embarcadero\studio\20.0\lib\Android\Debug\android-support-v4.jar";"c:\program files (x86)\embarcadero\studio\20.0\lib\Android\Debug\fmx.jar" -bootclasspath "C:\Users\Public\Documents\Embarcadero\Studio\20.0\CatalogRepository\AndroidSDK-2525_20.0.36039.7899\platforms\android-26\android.jar" -encoding UTF-8 -target 1.6 -g -source 1.6 .\Android\Debug\Project2.java .\Android\Debug\Project2ProxyInterface.java" exited with code 3. 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.63 I read "The system cannot find the path specified." along the lines. That I presume goes for "\bin\javac" as every other file/directory listed do exist in my system. I am uncertain why. Registry search did not find me anything that I think is relevant. There is no "javac" location setting in SDK settings. I am clueless.
-
Hello, I am using Delphi 10.3.3. I would like to read caller number right at the time phone is ringing. Edit: I am looking for a solution for Android platform only. Using google, I have found a lot of samples from past about reading call logs, placing calls, etc. I could not find how I should be reading caller number right at the time of a call. Any help is appreciated. Thanks & regards, Ertan
-
Actually, I did added tags in my initial question, just forgot to mention about that I am only interested in Android platform. I have edited my question and added that information now. Thanks.
-
Hello, I am using Delphi 10.3.3. For certain reasons I need to use WinInet directly. It has to run on Windows XP and higher versions. I have found below code (slightly changed to compile under my Delphi version) on Stackoverflow by @Remy Lebeau which works good on Windows 7 and higher. procedure WebPostData(const UserAgent: string; const Server: string; const Resource: string; const Data: Pointer; DataSize: UInt32; const ContentType: string; Response: TStream); var hInet: HINTERNET; hHTTP: HINTERNET; hReq: HINTERNET; Heade: string; Buffer: array[0..1023] of Byte; BytesRead: DWORD; const accept: packed array[0..1] of PChar = (PChar('*/*'), nil); begin hInet := InternetOpen(PChar(UserAgent), INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0); if not Assigned(hInet) then RaiseLastOSError; try hHTTP := InternetConnect(hInet, PChar(Server), INTERNET_DEFAULT_HTTPS_PORT, nil, nil, INTERNET_SERVICE_HTTP, 0, 1); if not Assigned(hHTTP) then RaiseLastOSError; try hReq := HttpOpenRequest(hHTTP, PChar('POST'), PChar(Resource), nil, nil, @accept, INTERNET_FLAG_SECURE or INTERNET_FLAG_KEEP_CONNECTION, 1); if not Assigned(hReq) then RaiseLastOSError; try Heade := 'User-Agent: ' + UserAgent + #13#10 + 'Accept-Language: en-us,en;q=0.5'#13#10 + 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7'#13#10 + 'Content-Type: ' + ContentType + #13#10 + 'Keep-Alive: 300'#13#10; if not HttpAddRequestHeaders(hReq, PChar(Heade), Length(Heade), HTTP_ADDREQ_FLAG_ADD) then RaiseLastOSError; if not HTTPSendRequest(hReq, nil, 0, Data, DataSize) then RaiseLastOSError; repeat if not InternetReadFile(hReq, @Buffer, SizeOf(Buffer), BytesRead) then RaiseLastOSError; if (BytesRead = 0) then Break; if Response <> nil then Response.WriteBuffer(Buffer, BytesRead); until False; finally InternetCloseHandle(hReq); end; finally InternetCloseHandle(hHTTP); end; finally InternetCloseHandle(hInet); end; end; When I try that code on Windows XP I get below error. System Error. Code: 12157. I do not know if that is possible what I would like to do, but I appreciate any help. Thanks & regards, Ertan
-
I have a friend using ReportBuilder and for export purposes he uses Gnostice PDF Toolkit because ReportBuilder is not capable of building quality and glitch free PDF, PNG, etc files. Gnostice has support for ReportBuilder.
-
Add a TMemo on your form. When showing a message, add a line on memo. You will see that order of messages displayed will be same as your code order. You will see messages displayed will be reversed. This is because each message dialog displayed on top of existing one Yes, just test it.
-
If application is running on Android, message dialog on that OS is asynchronous. Meaning, they do not block code execution. What happens at run-time, I think is; First dialog displayed first, code continue to execute, second dialog displayed second. However, as second is displayed as the last message, it appeared on top of all others.
-
Hello, I am trying to install Indy on a Linux x86_64 using fpcupdeluxe and following line seems broken. /fpcupdeluxe/ccr/indy/Lib/./System/IdGlobal.pas(7536,11) Error: (2021) ENDIF without IF(N)DEF /fpcupdeluxe/ccr/indy/Lib/./System/IdGlobal.pas(7536,11) Error: (2021) ENDIF without IF(N)DEF It is simply missing a $ sign.
-
You are most likely to know more than me. I was just trying to get latest version that can be compiled under Linux. I will see if anything I can do though.
-
Latest clone as of several minutes ago and IdStackUnix.pas cannot be compiled for Lazarus under Linux x86_64 /fpcupdeluxe/ccr/indy/Lib/./System/IdStackUnix.pas(701,21) Error: (5000) Identifier not found "FIONBIO" /fpcupdeluxe/ccr/indy/Lib/./System/IdStackUnix.pas(1053,40) Error: (5000) Identifier not found "FIONBIO" /fpcupdeluxe/ccr/indy/Lib/./System/IdStackUnix.pas(1058,26) Error: (5000) Identifier not found "EAGAIN" /fpcupdeluxe/ccr/indy/Lib/./System/IdStackUnix.pas(1058,34) Error: (5000) Identifier not found "EWOULDBLOCK" /fpcupdeluxe/ccr/indy/Lib/./System/IdStackUnix.pas(1058,47) Error: (5000) Identifier not found "EINPROGRESS"
-
I just used fpcupdeluxe and it seems to be broken on somewhere else now: /fpcupdeluxe/ccr/indy/Lib/./System/IdStack.pas(247,57) Error: (4001) Incompatible types: got "LongInt" expected "LongWord" BTW, this is Linux x86_64 I am trying to build Indy on.
-
Yes, please.
-
Hello, I am using Delphi 10.3.3 to build an Android 32Bit app running on embedded device with Android 5.1.1 installed. Device has 32Bit CPU and I cannot try to see if building my app for 64Bit helps. There are several operations that app doing in a thread which total takes 6-10 seconds on average. In order to keep user patient, I put a label on screen showing operation is advancing step by step. That label is updated from inside a thread. Thread is started using "TThread.CreateAnonymousThread(<relevant procedure calling code here>).Start()" and Label update code is something as following: TThread.Synchronize(nil, procedure begin StatusUpdateLabel.Text := '1/' + MaxSteps.ToString(); StatusUpdateLabel.Repaint(); end); My initial code did not have that "StatusUpdateLabel.Repaint();" part in above code. Once I started to have that problem, I just try to see if it helps. My case it did not help at all. Label is placed on a TFrame and aligned to Top. Font Family is Default, Size is set to 30, Style is set to Bold. Following is a video I try to put together for better understanding. Try to watch it at full screen. That video displays problem only for 1/9 at the beginning. Problem I am having is with number 1 in that video. That exact problem maybe on number 9, or both 1 and 9 numbers and it maybe in a total different step of the operation. It may happen more than once, too. Interestingly forward slash never has a problem at all. Moreover, I do not always have that problem. It sometimes displays everything as it should be. My guess, depending on internet speed some steps are completed fast. Sometimes pretty fast. When that happens, I get a very tiny text displayed on that Label. I did not have a chance to try reproducing that on a regular mobile phone. Once I find time, I am going to do that for sure. I wonder if that is some kind of a known problem and if there is a way to fix it. Thanks & regards, Ertan thread updated label display problem.mp4
-
What about string variable pointing to "1/9" as value and that is not going to be 4 characters in total ever?
-
Do I still need to do such protection for reading only? Thread will be the only process which is writing into a string variable.
-
I did not have any problem using web installer for several versions now. My 10.3.2 was a web installer installed. I choose not to remove all registry settings when asked. Installer first uninstalled 10.3.2 and after installed 10.3.3 just fine. I did not have to re-install any of my components except Ide FixPack. You better have a fast internet connection for web installer, let it install over night or something similar though.
-
Hello, I have found that stackoverflow code of @David Heffernan https://stackoverflow.com/questions/4354071/how-can-i-allow-a-form-to-accept-file-dropping-without-handling-windows-messages Attached is a project where I put it all together for my use case. However, it seems to leak some memory. I do not know why but TForm2.DestroyWnd seems not executed at all. I simply run and close the application without doing anything. Below dialog is my leak report message Any help is appreciated. Thanks & regards, Ertan DragDrop.7z
-
That did solve my problem.
-
I do debug run and execution does not stop at first line of DestroyWnd procedure at all.
-
Cross-platform solution to forcefully end a thread
ertank replied to aehimself's topic in Cross-platform
Maybe you can run two threads? Something like your thread-1 does the loop. Upon a variable trigger or a procedure call, thread-1 runs the possibly never ending code in thread-2. After that thread-1 checks if that thread-2 terminates in a given time limits. If there is a timeout, your main app can provide a feedback to user and maybe an option to re-start the app or something. -
Delphi 10.3.2 CE: ReadOnly on units doesn't work anymore
ertank replied to Silver Black's topic in Delphi IDE and APIs
I have CE and it works on in it. -
I started an Android project and did not give its package name a proper name. Now project is almost finished and remember to provide it a proper package name before releasing. - I changed the package name. - I removed installed app on my test phone. - Restarted the phone. - Tried to install same app with a new package name. That simply failed and displayed a window with "Unable to create process: Unable to install '<path>'. Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]" I believe I need to do more, but do not know what exactly. Google searches are not helpful. Most likely I am not choosing correct words. This has happened to me before and I did not solve it properly back then (changed package name back to default). I want to learn the way to do it right, now. Any help is appreciated. Thanks & regards, Ertan
-
It turned out to be a problem of package name. Android does not like domain names starting with numbers like "com.1stlevel.mypackage_name" However, converting numbers to letters works just fine like "com.firstlevel.mypackage_name".
-
Thank you. I have just slightly modified provided code to my taste and get rid of "deprecated" message for JObjectToID on Delphi 10.3.2. Final working for me version is below. uses System.SysUtils, Androidapi.JNI, Androidapi.JNI.Java.Net, Androidapi.JNI.JavaTypes, Androidapi.Helpers, Androidapi.JNIBridge; function BytesToHex(const ABytes: TBytes): string; var I: Integer; begin Result := EmptyStr; for I := Low(ABytes) to High(ABytes) do Result := Result + IntToHex(ABytes[I], 2) + ':'; SetLength(Result, Result.Length - 1); end; function GetMacAddress(const InterfaceName: string = 'wlan0'): string; var LInterfaces: JEnumeration; LInterface: JNetworkInterface; LJavaBytes: TJavaArray<Byte>; LBytes: TBytes; I: Integer; begin Result := EmptyStr; LInterfaces := TJNetworkInterface.JavaClass.getNetworkInterfaces; while LInterfaces.hasMoreElements do begin LInterface := TJNetworkInterface.Wrap(TAndroidHelper.JObjectToID(LInterfaces.nextElement)); if JStringToString(LInterface.getName).ToLower().Equals(InterfaceName) then begin LJavaBytes := LInterface.getHardwareAddress; if LJavaBytes <> nil then begin SetLength(LBytes, LJavaBytes.Length); for I := 0 to LJavaBytes.Length - 1 do LBytes[I] := LJavaBytes.Items[I]; Result := BytesToHex(LBytes); Exit(); end; end; end; end; It seems Mac address is still way to go. At least for a while.
-
Hello, When I work on forms I have Style selection on screen. When I work on Frames, I do not see that Style selection and it always sticks to Windows Style even if my target is selected as Android. This makes it difficult to position some screen components. Is this a known problem or a feature of frames? Can I have platform specific design in a way with frames? Thanks & regards, Ertan