Jump to content

Search the Community

Showing results for tags 'fmx'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 125 results

  1. Hi there, I used a TListview with Text and Detail already some versions ago, mainly for iOS and Android. Representation is like Text / Detail line side by side, while the detail can be multiline text. Usually this looked centered, well arranged I used a CrLf as linebreak by default, and all the time that worked well. Now I realize that the display looks different, since it shows an empty line at the center: / Detail line 1 Text / <empty line> / Detail line 2 When I moved from CrLf to Lf as linebreak, the display seems OK again. So CrLf seems to add two linebreaks, instead of only one (which is understandable on non-windows platforms). So I ask myself, since this was OK earlier with CrLf too, has something changed in the linebreak separation of text in iOS ? Unfortunately I cannot really say since when this was going wrong, for sure Rx10.1/2/3 was OK. Maybe only in the newer versions, I guess, this happened.
  2. FranzB

    Draw TBitmap

    I want to insert a bitmap on it's own left side again using canvas.drawbitmap function but actually this code does not do anything..... can't see my mistake here 😞 procedure InsertonMyleft(aBMP : TBitmap); var tempBMP: TBitmap; RecFull: TRectF; RecLeft: TRectF; begin tempBMP := TBitmap.Create; try aBMP.Canvas.BeginScene; tempBMP.Assign(localBMP); tempBMP.SaveToFile('c:\temp\debugme.bmp'); RecFull := RectF(0, 0, aBMP.Width, aBMP.Height); RecLeft := RectF(0, 0, round(aBMP.Width / 3), round(aBMP.Height / 1)); aBMP.Canvas.DrawBitmap(tempBMP, RecFull, RecLeft, 50, True); aBMP.Canvas.EndScene; aBMP.SaveToFile('c:\temp\debugme2.bmp'); finally tempBMP.Free; end; end;
  3. Hi there, are you able to work with yor projects on Patch 3 on mobile (Android, iOS) ? I've tried a while, but then moved back to Patch 2, which works more or less on Android with API-level 29. That was my main goal why I ported my apps to Patch 3. What are your experiences with that patch on different platforms ?
  4. hello All: . May i know please the right way to work with custom fonts inside android.?i have Patch this unit here: (FMX.FontGlyphs.Android), but no effect....i know that Alcinoe controls are native device controls and the paint in fmx android is ( FPaint: JPaint; )please guide me and if there is any demo or sample will be more helpful..i have watch in youtube how can do that in android studio and i follow the same steps but the controls didn't change their font as i expected ...i deploy a folder inside the res remote path named as (font) an inside that folder i deploy two xml files( attr.xml and myfont_familly.xml) and also deploy my fonts there ..after that i go to my custom styles.xml and i add this line here:<item name="android:fontFamily">@font/myfont_familly</item>but when i compile to run in android no effect happen ???please any reply will be so usefull SMS Read-Write.rar
  5. Hi all, This morning while debugging my FMX app in Windows I suddenly started getting an EOleException within the Notification Center while initialising. onecoreuap\base\diagnosis\platform\notifications\developer\toast.cpp(2389)\wpnapps.dll!63CC11A2: (caller: 63CB5660) ReturnHr(1) tid(14e0) 803E0105 The notification platform is unavailable. First chance exception at $776F9862. Exception class EOleException with message 'The notification platform is unavailable' I've never seen this before, but it may be related to my Windows setup having updated over the weekend to v2004 (19041.388). It looks suspiciously like MS have changed the way their notification APIs work in this update... Has anyone seen this before or know of a way to resolve it? There's nothing useful on Google about this error that I could find. Thanks
  6. sgcWebSockets is a complete package providing access to HTML5 WebSockets API (WebSocket is a web technology providing for bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket) allowing to create WebSocket Servers, and WebSocket clients in VCL, Lazarus and Firemonkey Applications. What's new latest versions - New Telegram API Component for Windows, Android, OSX and Linux. - Improved MQTT client component: support for 3.1.1 and 5.0. - Improved Indy Server + IOCP. - Improved Binance and Kraken APIs, now support full WebSockets and REST Protocols. - Fixed some bugs using OpenSSL 1.1.1 and TLS 1.3 - Several improvements about performance and stability.  Main Features: - WebSocket and HTTP Support: sgcWebSockets includes client and server-side implementations of the WebSocket protocol (RFC 6455). HTTP/s is also full supported. Support for plain TCP is also included. - SSL/TLS for Security: Your messages are secure using our SSL/TLS implementation. Widest compatibility via support for modern TLS 1.3, TLS 1.2, TLS 1.1 and TLS 1.0 - Protocols and APIs: Several protocols are supported: MQTT (3.1.1 and 5.0), STOMP, WEBRTC, SIGNALR CORE, WAMP... Built-in protocols support Transactions, Datasets, QoS, big file transfers and more. APIs supported for third-parties like Pusher, Bitfinex, Huobi, CEX... - Cross-platform: Share your code using our WebSockets library for your Delphi VCL, Firemonkey, Intraweb, Javascript and C# projects. Includes Server, Clients and several protocols for building and connecting to WebSocket applications. - High Performance WebSocket Server based on Microsoft HTTP Framework and IOCP. Trial Version: https://www.esegece.com/websockets/download Compiled Demos: http://www.esegece.com/download/sgcWebSockets_bin.zip More Info: http://www.esegece.com/websockets
  7. Chester Wilson

    GDB server problems in 10.4

    Just put Delphi 10.4 up. Impressed so far, but one problem: Whatever value I put into Run / Parameters / -debugport <nnnnn> on trying to run, it instals the programme fine, the programme works, but there is no debugging. On closing the compile window, the error message "Unable to start GDBserver on port nnnnn. Port is already in use.". I have restarted the system a few times, with no change in the error message.
  8. syaifuddin

    How to flip image taken from front camera

    I use Tcameracomponent in delphi to take a picture, when I take a picture use back camera is ok, but when I use front camera the result is flipped. how to take picture from front camera like back camera?
  9. Hi there, I was trying to extend the iOSapi_AVFoundation.pas module, by adding the following function to the AVAudioSession function setCategoryWithOptionsError( category: NSString; withOptions : AVAudioSessionCategoryOptions; error: NSError): Boolean; cdecl; Unfortunately its crashing with an object is nil error, what do I miss here ? I make a local copy of the unit, and the following additions: uses ... const AVAudioSessionCategoryOptionDuckOthers = 2; //S4: add 14.05.20 ... type AVAudioSessionCategoryOptions = NSUInteger; //S4: add 14.05.20 AVAudioSessionClass = interface(NSObjectClass) ['{B24932F9-3C98-44E4-A4F6-0CB58AF7DE8A}'] //S4: 14.05.20 new GUID {class} function sharedInstance: Pointer; cdecl; end; AVAudioSession = interface(NSObject) ['{0B02D5EC-ED09-421A-84BE-6CEE08420E14}'] //S4: 14.05.20 new GUID ... //S4: Addition 14.05.20, the new function I need //[MethodName('setCategory:withOptions:error:')] function setCategoryWithOptionsError( category: NSString; withOptions : AVAudioSessionCategoryOptions; error: NSError): Boolean; cdecl; ... end. This is derived from the function in the Apple reference https://developer.apple.com/documentation/avfoundation/avaudiosession/1616442-setcategory Could be looking in Objective-C like this AVAudioSessionCategoryOptions AVAudioSessionCategoryOptionsNone = 0; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionsNone error:nil]; I want to call it like this LAVAudioSession := TAVAudioSession.Wrap( TAVAudioSession.OCClass.sharedInstance ); //<-- This is original method, it still can be called without exception LRes := LAVAudioSession.setCategory( AVAudioSessionCategoryPlayback, LError); //<-- This is the new method, crash with exception LRes := LAVAudioSession.setCategoryWithOptionsError( AVAudioSessionCategoryPlayback, AVAudioSessionCategoryOptionDuckOthers, LError); Do I have a stupid typo somewhere ? Can the two modules not coexist, because the old one is linked somewhere else ? Shall I use different GUID for the interfaces, or keep the same, to allow static links to find them ? Is the new method not yet in the Rx10.3.3 libraries, but I updated to latest SDK 13.4.1, they should be in there and FMX able to resolve it ? Does the module need to be initialized somehow ? Is there something missing what is needed for correct linkage ? Maybe its too late already, or I'm to blind to see.
  10. Graham Murt

    MonkeyBuilder beta test

    We’re now looking for a small number of Beta testers to try out our new iOS & Android build automation tool - MonkeyBuilder. The website is still under development but has some information to give you an idea of what it can do. https://www.monkeybuilder.io Beta test numbers are limited to begin with but we hope to open it up to more users over the next couple of weeks. If you are interested, please comment here or contact us via the email form on the website.
  11. Hello all, I would like to know what is best approach for making and displaying custom notifications in windows 10. Let me explain little bit more. I dont want to use standard win 10 notifications because they does not look and feel like they are from my app ( i cannot customize look of them how i want ) I want to show for example 200x100 notification on the right corner of the screen, notification should be 100% customizable to look like my design that i made in photoshop.. So I am not sure should I make some sort of borderless form and put some rectangles, images and labels that will represent look of my notification? Notifications should slide and auto-hide after lets say 5 seconds... So what would be best approach to this ? Also I have to mention that in my app I want to throw a lot of different notifications like when user click to save settings it should show notification, when user receive message it should pop up notification, when someone mention user name it should pop up notification and so on....... So my notifications dont need to stack on each other, if new notification should be displayed i will first remove any other notification and display that newest one thats my plan I am using FMX for this and OS windows Thank you
  12. Hi there, I wanted to call the Bluetooth initWithDictionary and its option CBCentralManagerOptionShowPowerAlertKey; There is little information out there howto create the options for this call in the right way. CBCentralManager = interface(NSObject) ['{587D1855-5B53-43DA-91AF-AF9D93FFDB9F}'] ... function initWithDelegate(delegate: id; queue: dispatch_queue_t; options: NSDictionary): id; cdecl; overload; In XCode that looks quite straightforward, but what about Fmx ? let opts = [CBCentralManagerOptionShowPowerAlertKey: false] let manager = CBCentralManager(delegate: self, queue: nil, options: opts) Info's like this doesn't help much http://codeverge.com/embarcadero.delphi.firemonkey/help-rewrite-objective-c-proced/1046099 Using NSUserDefaults to access the info list properties seems not to work, returning nil. But is NSUserDefaults the right place to look for those keys ? var LDefaults: NSUserDefaults; LDict: NSDictionary; begin LDefaults := TNSUserDefaults.Wrap(TNSUserDefaults.OCClass.standardUserDefaults); LDict := LDefaults.dictionaryForKey( CBCentralManagerOptionShowPowerAlertKey ); // ! This (LDict) is nil if Assigned(lDict) then FCentralManager := TCBCentralManager.Wrap( TCBCentralManager.Alloc.initWithDelegate( GetObjectID, 0, LDict )) I used this function to get the key constant function CBCentralManagerOptionShowPowerAlertKey : NSString; begin Result := CocoaNSStringConst(libCoreBluetooth, 'CBCentralManagerOptionShowPowerAlertKey'); end; Other ways to construct this NSDictionary look to ugly to be true: LDict := TNSDictionary.Wrap( TNSDictionary.OCClass.dictionaryWithObjectsAndKeys( <<This is Pointer to object a nil-terminated list>>)); Maybe somebody can help with some useful hints, to find the right way to access such system options ?
  13. I dropped StyleBook1 on form, i opened it and i edited progress bars,buttons and all other components that my custom style needs. Now i have to update my components to use styles that I made. Is there an option to add some type of global StyleBook component so all of my forms can access it ? I have around 20 forms and i dont want to drop new StyleBook on every form... I was thinking to make some sort of invisible form ( that form will never be displayed ) where I will have my StyleBook component. After that I will include that form in every other form ( I have 20 other forms ) and try to access StyleBook that way.. What are your solutions ?
  14. sgcWebSockets is a complete package providing access to HTML5 WebSockets API (WebSocket is a web technology providing for bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket) allowing to create WebSocket Servers, and WebSocket clients in VCL, Lazarus and Firemonkey Applications. What's new latest versions - New component which supports Google PubSub API. - Improved Binance API, now supports WebSocket live subscriptions, WebSocket User Stream and REST API. - New client component for Amazon SQS. - OAuth2 is now supported in WebSocket and HTTP client components. - Several improvements about performance and stability.  Main Features: - WebSocket and HTTP Support: sgcWebSockets includes client and server-side implementations of the WebSocket protocol (RFC 6455). HTTP/s is also full supported. Support for plain TCP is also included. - SSL/TLS for Security: Your messages are secure using our SSL/TLS implementation. Widest compatibility via support for modern TLS 1.3, TLS 1.2, TLS 1.1 and TLS 1.0 - Protocols and APIs: Several protocols are supported: MQTT (3.1.1 and 5.0), STOMP, WEBRTC, SIGNALR CORE, WAMP... Built-in protocols support Transactions, Datasets, QoS, big file transfers and more. APIs supported for third-parties like Pusher, Bitfinex, Huobi, CEX... - Cross-platform: Share your code using our WebSockets library for your Delphi VCL, Firemonkey, Intraweb, Javascript and C# projects. Includes Server, Clients and several protocols for building and connecting to WebSocket applications. - High Performance WebSocket Server based on Microsoft HTTP Framework and IOCP. Trial Version: https://www.esegece.com/websockets/download Compiled Demos: http://www.esegece.com/download/sgcWebSockets_bin.zip More Info: http://www.esegece.com/websockets
  15. If we talk about windows platform we can embed some resource data ( for example strings ) into our exe. For example we have app "A" and app "B". Lets say that app "A" is our main app. App "B" is secondary app ( .exe - windows compiled ) with some RCDATA strings that are embedded in it. We could load app "B" into app "A" and change resource data in app "B" from app "A" ( this can't be done if app "B" is running, app "B" needs to be closed ). If we talk about windows platform VCL or FMX we could do this with -> https://docs.microsoft.com/en-us/windows/win32/menurc/adding-deleting-and-replacing-resources My question is: What or is there any way to do this multi platform ? ( android,ios,mac,wearables,linux ... ) I suppose that it cannot be done exactly like in windows because some stuff that I mentioned are for windows only.. So what would be the best way to achieve same thing on other platforms ( android,ios,mac,linux,wearables ... ) Also imagine that we have FMX app that is compiled for windows ( we will call it "Win-app" ) and we have other app that is for android and it is built/compiled with delphi FMX ( we will call it "Andro-app" and it will have .apk extension ). Is it possible to load "Andro-app" .apk to "Win-app" and edit embedded resources in "Andro-app" from "Win-app"? <- Is this also possible for other platforms ( Ios,Mac,linux,wearables - make "win-app" that load and edit for example resoruce strings in "ios-app", "mac-app", "linux-app" ...etc... ) I don't need code, I just need someone to point me out and give me directions and I will try to learn on my own since it is so interesting topic. Thank you
  16. Hello, I was developing a mobile application for my school, I were using Delphi Rad Studio Rio 10.3. Here is brief description what application is doing: in some editboxes user adds data -> proceed to next tab On second tab user is choosing video that he wants to preview, while video is playing he is clicking some buttons to mark duration of some activities on video that he loaded ... After that i am making a PDF report and saving to storage. I made whole application and it is working great, problem is that I used this library for slowing down video preview -> https://github.com/Zeus64/alcinoe i had some issues with this library ( most of them were configuration issues ) but at the end I managed to resolve all of them and make my app. So why I used this library? Answer is that it had option to set speed preview of video. Before I started using this library i was trying for a few days to implement this -> https://stackoverflow.com/questions/18526336/playback-video-in-slow-motion-in-android check answer from " karanatwal.github.io " Problem was that I didnt know how to rewrite this android code into delphi FMX code : videoview = (VideoView)findViewById(R.id.videoview); videoview.setVideoURI("Your Video URI"); videoview.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { @Override public void onPrepared(MediaPlayer mp) { //works only from api 23 PlaybackParams myPlayBackParams = new PlaybackParams(); myPlayBackParams.setSpeed(0.5f); //here set speed eg. 0.5 for slow 2 for fast mode mp.setPlaybackParams(myPlayBackParams); videoview.start();//start your video. } }); So now I would like to rebuild my application and exclude this " alcinoe " library cuz I use it only for setting playback speed.. Can somebody help me rewriting this to a delphi code ? Thank you EDIT: I will later post code snippet of how i retrieve path of video and how i load it, code is not that great because it was one of my first projects but maybe it will help someone who reads this.
  17. Tntman

    Animating TListViewItem

    Hello members! I started learning delphi few months ago and recently i discovered that we can make really beautiful user interfaces with delphi FMX styles. I saw on the internet this animation demo ( This is just a design ) and I wanted to implement it in delphi: https://thumbs.gfycat.com/ShamelessConfusedAmbushbug-mobile.mp4 I was thinking to use ListView component in FMX for this with ItemApperance -> DynamicApperance. Everything was cool but i faced one problem. Problem is that I am not sure that TlistViewItem can perform animation when it is been added to the ListView. From my understandings i can only animate "Text1" and other items if i add them -> https://i.imgur.com/Y3SWIsT.jpg There is no option ( or I dont know how to find it ) To animate whole TListItemView when is added to a ListView. **WORKAROUND THAT I HAVE ON MY MIND** I was thinking to drop a ListBox and to add on it "TListBoxItem", after that i would right click it and Go on edit custom style, and try to make it look as i want. I tested this tutorial for editing the look of "TListBoxItem" and it is working nicely: https://www.experts-exchange.com/articles/10054/Implementing-a-ListView-in-Firemonkey.html For animation i planned to use this resources ( not tested, i dont know if it will work ) : So what is my question actually, well i would like to achieve similar design and effect from gif that i showed to you. I would like to use ListView with DynamicApperance. I would like to someone confirm me if that is possible and to give me some references or resource material where i could read more about it.. Also if there is someone who would like to give me a code example i would appreciate a lot. From my tests that i performed ( loop 1000 times, and add 1000 items on ListView and ListBox ) I can say that ListBox performed a lot slower so I would prefer ListView for this, also i think that using ListView here is better practice since ListView is more suitable for this situation based on this post: http://www.delphigroups.info/2/8f/544471.html At the end I just want to point out that im using FMX ONLY because i found it easier to make styles, this program is for Windows only platform. I am using Delphi Rio community ( Free version ). I would also like to add that option " Pull to refresh " that you see on that gif is not needed. Thank you for your answers and help! 🙂
  18. Wij zijn op zoek naar een nieuwe aanwinst voor ons ontwikkel team in Oosterwolde. Syntri ontwikkelt een ERP systeem voor de maakindustrie, waarbij proces en workflow centraal staan. - Delphi 10.3 Rio VCL - iOS en Android ontwikkeling in Firemonkey - REST Api Vacature Software Ontwikkelaar
  19. #ifdef

    XE5 > RIO

    Hi everyone! Need your help with old one sample* from Christen Blom-Dahl: objc_msgSend((FStillImageOutput as ILocalObject).GetObjectID, sel_getUid('addObserver:forKeyPath:options:context:'), FVideoCaptureDelegate.GetObjectID, (NSSTR('capturingStillImage') as ILocalObject).GetObjectID, NSKeyValueObservingOptionNew, (FAVCaptureStillImageIsCapturingStillImageContext as ILocalObject).GetObjectID); * article + listing I have an error message "Too many actual parameters", of course. And don't know what should I do now in Delphi 10.3.3. Found a similar question but it is unanswered too. Any suggestions?
  20. Hi there, I've got a strange exception, only with Android 32-Bit during Debugging, other platforms including IOS work well. With iOS 64 I had no issue seen, but wouldn't count on it right now. I use a TDateTime variable, and want to compare against NULL.. Since TDateTime is a Double with 8 Bytes, a simple cast to Double( Self ) should make not any harm. Maybe there are special conditions on Android, as Extended is reduced to Double, and maybe there are some conversion side effects with Double as well ? I use a class helper for adding such functionality, which is used in a million other places too. function TDateTime_Helper.ToDouble : Double; begin Result := Double( Self ); // Here it crashes, see images enclosed, they only have 2 ARM assembler lines end; and I already extended my conversion routing to separated local variables: // global variable for storage, only reading var LUNull : TDateTime = TDateTime( 0.0 ); class function TDateTime_Helper.Create_Null : TDateTime; begin Result := LUNull; // Could the global variable cause issues in a Thread ? Buts its readonly. end; function TDateTime_Helper.IsNull : Boolean; var LSelf : Double; LNull : Double; begin LSelf := Self.ToDouble; //11.03.20 added local variables, to check Android crash LNull := Create_Null.ToDouble; if SameValue( LSelf, LNull ) then Result := True else Result := False; end; I check a variable, which is called in a thread if FLastUpdate.IsNull then // called like this begin .... end I must confess that I use above scheme in many thousands of places, also heavily within threads (even higher loded), without an error before. The caller can be debugged very reliable, and the error is very reproducable When the caller comes in first, second, third time, with zero, all is fine When the caller comes in with a real Double value, I can debug and see a valid double value in the watch (e.g. FLastUpdate = 43901.1603147338 ) Inside the conversion ToDouble it crashes When entering with Zero, it looks like the images img. 1 and 2 (see the registers changing) When entering with Date, it looks like img. 3, and immediately it crashes at img. 4 What could cause such error, it sounds a little like failure of JNI Bus, but maybe I'M totally on the wrong track ? Probably there is some genius with a good hint how to fix this nasty bug.
  21. ertank

    Android 64bit and 32bit permissions

    Hello, I am using Delphi 10.3.3, targeting Android 64Bit and 32Bit. Attached is a test project I used. If that same project is compiled for Android 32Bit it gets two permission request as can be seen in below pictures However, if same code without changing anything is compiled for Android 64Bit it only asks for a single permission as can be seen in below picture Both bitness apk files are tested on same physical phone running Android 9. I have tried to change order of permissions in request to see if this is related with request order. I always get same above permission asked on 64bit version. Let me know if you think this is a bug in Delphi, please. Thanks & regards, Ertan Android64Bit_Permisions.7z
  22. Hello, I am using Delphi 10.3.3, Indy 10.6.2.5366 (stock Indy version) I am trying to listen broadcast UDP messages on Android (exact version I am testing is 4.4.2, I need to support latest versions, too) connected to a local WiFi. Broadcast messages will be sent in same network. I have found this page https://stackoverflow.com/questions/19040674/delphi-xe5-tidudpserver-does-not-receive-anything-on-android and tried to do it as to my understanding. Project has CHANGE_WIFI_MULTICAST_STATE permission set. UDP server parameters are as following at design time and everything else is left as default: TIdUDPServer.Active = False TIdUDPServer.BroadcastEnable = True TIdUDPServer.DefaultPort = 8080 I have following code where timer is activated as last line in OnFormCreate() event and has 0.5 seconds delay: procedure TForm3.tmrCheckPhoneServiceTimer(Sender: TObject); var WifiManagerObj: JObject; begin // Run just once tmrCheckPhoneService.Enabled := False; // Get necessary OS settings to receive broadcast messages Log('Getting multicast lock...'); WifiManagerObj := TAndroidHelper.Context.getSystemService(TJContext.JavaClass.WIFI_SERVICE); FWifiManager := TJWifiManager.Wrap((WifiManagerObj as ILocalObject).GetObjectID); FMulticastLock := FWifiManager.createMulticastLock(StringToJString('LightFactory Remote')); FMulticastLock.setReferenceCounted(True); FMulticastLock.acquire(); // Try to open a port on Android by sending a broadcast message Log('Sending a broadcast message...'); IdUDPServer1.Broadcast('test', IdUDPServer1.DefaultPort); // Now we can start to listen Log('Activating UDP listener...'); IdUDPServer1.Active := True; if FPhoneDialerService = nil then begin TDialogService.ShowMessage('PhoneDialer service not supported'); Exit(); end; PermissionsService.RequestPermissions([FCallPhonePermission], MakePhoneCallPermissionRequestResult, DisplayRationale); end; I have following code in my OnDestroy() event: procedure TForm3.FormDestroy(Sender: TObject); begin // Stop listenning. IdUDPServer1.Active := False; // Release multicast lock FMulticastLock.release(); end; My broadcast listening code is as following: procedure TForm3.IdUDPServer1UDPRead(AThread: TIdUDPListenerThread; const AData: TIdBytes; ABinding: TIdSocketHandle); var Data: string; begin Data := TEncoding.Default.GetString(AData); TThread.Queue(nil, procedure begin Log('Incoming broadcast message from: ' + ABinding.PeerIP) end); if SameText(Data, 'mytriggerphrase') then begin TThread.Queue(nil, procedure begin TestConnection(ABinding.PeerIP) end); end; end; After I run the app, I have following in my log: 2020-01-14 00:59:33.697 Getting multicast lock... 2020-01-14 00:59:33.736 Sending a broadcast message... 2020-01-14 00:59:33.740 Activating UDP listener... 2020-01-14 00:59:33.804 Incoming broadcast message from: 192.168.1.186 That IP number in above log belongs to Android device itself. I have following problems that I could not figure a solution: 1- I do not get any other broadcast message from my PC application which is sending one broadcast message each second. Is there anything I am doing wrong for that to happen? 2- I get segmentation fault (11) when closing my app. Detailed call stack and exact line is in attached picture. This happens each and every close. I did not understand why. Lastly, I am not sure if my code is doing it correct to keep multicast lock thru all run-time. I read a suggestion to release a multicast lock once finished with it in order to save battery life. So, I wonder if I can release multicast lock right after enabling my TIdUDPServer? Any help is appreciated. Thanks & regards, Ertan
  23. ertank

    Android service compilation fails

    Hello, Using Delphi 10.3.3. I have no problem compiling Android apps. I just needed to use a service to test something and I failed to compile. Below is error message I receive on a new Android Service project: [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. I have no problem running javac on command prompt C:\Users\Ertan>javac Usage: javac <options> <source files> where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath <path> Specify where to find user class files and annotation processors -cp <path> Specify where to find user class files and annotation processors -sourcepath <path> Specify where to find input source files -bootclasspath <path> Override location of bootstrap class files -extdirs <dirs> Override location of installed extensions -endorseddirs <dirs> Override location of endorsed standards path -proc:{none,only} Control whether annotation processing and/or compilation is done. -processor <class1>[,<class2>,<class3>...] Names of the annotation processors to run; bypasses default discovery process -processorpath <path> Specify where to find annotation processors -parameters Generate metadata for reflection on method parameters -d <directory> Specify where to place generated class files -s <directory> Specify where to place generated source files -h <directory> Specify where to place generated native header files -implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files -encoding <encoding> Specify character encoding used by source files -source <release> Provide source compatibility with specified release -target <release> Generate class files for specific VM version -profile <profile> Check that API used is available in the specified profile -version Version information -help Print a synopsis of standard options -Akey[=value] Options to pass to annotation processors -X Print a synopsis of nonstandard options -J<flag> Pass <flag> directly to the runtime system -Werror Terminate compilation if warnings occur @<filename> Read options and filenames from file C:\Users\Ertan> My version of "javac.exe" is located at C:\Program Files\Java\jdk1.8.0_60\bin\javac.exe I have seen some people having exact same error on my searches. No solution that I could find so far. I am planning to setup a virtual machine to install fresh copy of Delphi 10.3.3 and test if working on it. Before I do that I wonder if there is something I need to check. Thanks & regards, Ertan
  24. sgcWebSockets is a complete package providing access to HTML5 WebSockets API (WebSocket is a web technology providing for bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket) allowing to create WebSocket Servers, and WebSocket clients in VCL, Lazarus and Firemonkey Applications. What's new 4.3.3 - Added support for IOCP Indy Server (Websocket and HTTP Servers) - Updated to latest Lazarus 2.0.6 version. - Some improvements about performance and stability.  Main Features: - WebSocket and HTTP Support: sgcWebSockets includes client and server-side implementations of the WebSocket protocol (RFC 6455). HTTP/s is also full supported. Support for plain TCP is also included. - SSL/TLS for Security: Your messages are secure using our SSL/TLS implementation. Widest compatibility via support for modern TLS 1.3, TLS 1.2, TLS 1.1 and TLS 1.0 - Protocols and APIs: Several protocols are supported: MQTT (3.1.1 and 5.0), STOMP, WEBRTC, SIGNALR CORE, WAMP... Built-in protocols support Transactions, Datasets, QoS, big file transfers and more. APIs supported for third-parties like Pusher, Bitfinex, Huobi, CEX... - Cross-platform: Share your code using our WebSockets library for your Delphi VCL, Firemonkey, Intraweb, Javascript and C# projects. Includes Server, Clients and several protocols for building and connecting to WebSocket applications. - High Performance WebSocket Server based on Microsoft HTTP Framework and IOCP. Trial Version: http://www.esegece.com/download/sgcWebSockets.zip Compiled Demos: http://www.esegece.com/download/sgcWebSockets_bin.zip More Info: http://www.esegece.com/websockets
  25. 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
×