Jump to content

Search the Community

Showing results for tags 'android'.



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 149 results

  1. StephanWeber

    Photo app for Android and iPhone

    Hi, I made some apps with RAD Studio XE8 which run fine under Android and Windows. I have no commercial interests. But now I got an iphone SE 2020. Can anybody compile the apps for this? Looks more difficult. I can deliver the full sources, and the one doing this can use it freely and earn money. Have also a nice bow shooting app (Win and Android). And also many electrical engineering apps (Windows only). Note: Attached picture is German, but we can make it of course also in English. Bye Stephan
  2. Hi, Trying to set up a customized view for Samsung Tab S7 which has an 11" screen. I have been using the view for Android 10" and that works perfectly with the Samsung Tab S6 Lite but the customer now wants to use the Tab S7 and that places some of the buttons, nav bars in different positions on the S7 screen. The manufacture specs for the S7 state resolution 1600X2560 pixels, 16:10 ratio, ~274 PPI. Trying to followed the tutorial in the help file on Adding a Customized View to the View Selector but not sure where to get further information required such as MinPhysicalSize, MinLogicalSize and MaxLogicalSize as I am assuming the spec pixel size (1600 X 2560) is the MaxPhysicalSize. Also don't understand where to get the 'Artwork' for this device. Has anybody managed to setup a customized view for this device that could help me with the required figures or am I going in the wrong direction. Any help would be appreciated. Bill Zwirs
  3. Hello, I have my HTTPS proxy for my HTTP REST server. Both running on my development computer. I setup HTTPS proxy following instructions here: https://twigstechtips.blogspot.com/2016/01/nginx-how-to-set-up-ssl-reverse-proxy.html These instructions makes you generate two certificate files. KEY and PEM files. I added that PEM file in my project resources as resource type RCDATA and used identifier "my_ca". I used below link to prepare my security config xml https://stackoverflow.com/questions/56301765/self-signed-certificate-in-android-application-of-rad Using "@raw/my_ca" as in that stackoverflow question is failing with below error (while packaging the app) when I try to debug run the app. network_security_config.xml:6: error: Error: No resource found that matches the given name (at 'src' with value '@raw/my_ca/') So, I prepared my XML file as following: <?xml version="1.0" encoding="utf-8"?> <network-security-config> <domain-config> <domain includeSubdomains="true">yourdomain.com</domain> <trust-anchors> <certificates src="my_ca"/> </trust-anchors> </domain-config> </network-security-config> When I try to access my REST server like https://192.168.1.152/... I get following error Failed to parse XML configuration from network_security_config On the other hand, I can get results just fine using identical URL and Postman on Windows OS. I simply failed to figure how to add that self signed certificate in my app package and use it. Any help is appreciated. Thanks & Regards, Ertan
  4. Alexandre Pires

    How to read a table every x time.

    Hi Guys, I need my Android background service to read a table from my database every 30 seconds. What would be the best way to do this? I am currently using an infinite loop in a thread and sleep, but I believe it is not the best approach. @Dave Nottage Is there any kastri component that helps to do this? I am using Delphi 10.3 Thanks for some help Alexandre
  5. Hello everyone, I am having trouble showing a secondary form from the main form OnShow event for (only) the Android platform. The Show call does nothing at all except for a short delay. The main form stays active and functions correctly. The program runs nicely on Windows. This second form is StayOnTop and position=Designed with the same size as the main form. Thanks in advance for any help I can get. procedure TMainForm.FormShow(Sender: TObject); begin SetScreensLang; if MustSignIn then begin TabControl1.ActiveTab := PersonalTabItem; SignForm.Show; end else begin CheckAlerts; TabControl1.ActiveTab := AlertsTabItem; AlertsTabItemClick(nil); end; end;
  6. Hi there, I want to use the TRestClient components mainly under mobile platforms (iOS, Android), and I want to enhance and ensure the security concept for a new app. So far that means I need to verify the certifications under all conditions, same like browsers do. Since I have seen issues with apps which doesn't check certificates properly, but since Rx10.2.2 there should be all the events in place now. The client throws an event OnValidateCertificate, which could be used to verify a certificate, I think that is the right one, not really the OnNeedCertificate event, as noted in the blog from Marco above. This event returns certain infos in the TCertificate object, which are helpful to identify and verify the certificates: TCertificate = record CertName: string; SerialNum: string; Expiry: TDateTime; Start: TDateTime; Subject: string; Issuer: string; ProtocolName: string; AlgSignature: string; AlgEncryption: string; KeySize: Integer; function IsEmpty: Boolean; end; Unfortunately there is no real simple way to check the certificate status provided, e.g. from a test-site like BadSsl.com. It seems that this can be achieved only by heavy OpenSSL and touching the OCSP protocol, maybe then the app can be able to check the full status correctly and completely. While on the other side the native browsers can do this easily, as a side-effect more or less. From my understanding of the System.Net libraries, their basic idea is to use the underlying OS SSL systems, which works well for the HTTPS connection part. But I cannot really find any simple way to make use of the underlying OS for checking certifications, even if everything for checking certificates, like OpenSSL, should be in place in the OS. So I think about using the browsers of the OS, which have such support integrated, and should be perfect candidate to check the status (Safari, Chrome). But there is also no easy way to get data from the browsers from an app either, or is there any documented way I haven't seen yet ? Moreover, even if there would be a way to get that data: Would the access to the system browser be considered as "safe", from a high security standpoint ? There could be still a man-in-the-middle attack taken place, although the risk is IMHO quite low. Is there any simple Delphi/FMX "certification checker" out there which I haven't seen yet, or do I have to re-invent the wheel ? Maybe some security experts have tips to flatten the way, to reach a high security certification of the apps.
  7. Hi there, I'm sure most of you were aware of @Dave Nottage and his very helpful (live-saving) Kastri(Free) projects. Now with the presentation of the Memorizer, there are certain discussions about issues in the cross-platform world. Same as Dave I try to postpone permission requests to the bitter end, just before touching the hardware. For camera, sensors, etc. thats usually no issue. The problems may start when using local notifications, or related permissions, like Bluetooth and location. The local notifications permissions are fired right at startup, and thats annoying. You can imagine if you need a few permissions at startup, then they all will appear, and the user has to click them away before showing any useful screen. But for local notifications permission this might be maybe the right way too, because in mobile you also can run in foreground or background. So I would like to discuss the possibilities and pros and cons we have, for the permission settings from a users point-of-view. 1. Ask permission right after startup (as is now) - this is annoying to the user, especially if several requests appear one after the other - works in all cases, also for background mode, as it forces the user to decide - its a little like the old "Android way", permit all before use anything, but Androids style has changed meanwhile (for good reasons) - sometimes the app runs in background, and has no other chance to notify, than by local notification So the local notification permission shall be given at startup, to ensure this works. 2. Ask permission short before usage (in foreground) - thats what I like too, users shall decide each function before they use it. - but when moving to background w/o giving permission before, this might fail. A user cannot give permission while in background mode, the function simply fail or crash. 3. Ask permission short before going to background - this is not possible, because the app cannot do much when changing the states, especially no long-lasting alerts. 4. Allow permission in a special setup dialog - This is the "windows" setup philosophy, I think very much out of fashion in mobile: Force the user to visit setup first. - This will solve the issue in 2.), but I really try to to avoid this forcing of "setup" style design. Are there any other ideas or use-cases ? So far I think 1.) (as is) has its need too, and its not easy to cover all use-cases with one solution in mobile, there are too many options. Beside that, Android and iOS might have different philosophies as well, howto get them all under one umbrella ?
  8. Hi, After updating to delphi 10.4 and SDK 29 the camera and gallery do not work on Android 10 Also delphi examples don't work. After taking a photo from the camera the app doesn't return anything while the gallery, after choosing the photo, raises this execption First chance exception at $ 00000074D87D473C. Exception class EBitmapLoadingFailed with message 'Loading bitmap failed (/data/user/0/com.embarcadero.CameraRoll/cache/IMG_20200911_1728082355078942815963051.jpg).'. Process CameraRoll.apk (11714) any ideas?
  9. Hi, I try to run the following code on Android (10.4 Sydney) fn:=TPath.Combine(TPath.GetSharedDocumentsPath(),'OLA'); TDirectory.CreateDirectory(fn); // or ForceDirectories(fn) -> I tried both functions if TDirectory.Exists(fn,false) then showmessage('Ok') else showmessage('Failed'); And the code fail. The same code works without any problem with 10.3.3 (using the same phone) Note: On both environments I have used default User Permissions. including "Write external storage" Did you encountered this problem? - how did you solved? Thank you in advance, Pavel
  10. Hi there, I'm looking for a scripting engine in my projects, and since I had last time contact with scripting this is some years ago. I would like to check out the pros and cons of the solutions, to find the best fitting match for me. Since paxCompiler seems gone by Apex, this is maybe out of sight now, but I'm not so sure about that. DwScript is not available on mobile, as far as I know. DwScript is somewhat available in different forks (so it seems), not sure which one is the right one to choose. Maybe the list of engines is nit final, please let me know if there is something missing. What I'm looking for is a script engine that has the following features (I've put the most important in bold) usage for some base analysis and event control lightweight very stable well supported and documented Pascal supporting multiple languages would perfect, but not a main criteria (JS, C++, C#, Basic) Multiple platforms Win, Macos, Linux, iOS, Android is a must have supporting full language support is nice to have, but not a must (I can skip the special stuff I would say). performance (not that critical, but should be able to process dynamic protocols behaviour reasonable well ) memory footprint good, active community Free to use in commercial products I hope you can bring some light in this dark forest of possibilities, and share some experiences.
  11. Few months ago I prepared small demo application used FireDAC SQLite connection on an Android system. And it worked fine in an application built in Delphi 10.3. Then I updated Delphi to 10.4. And now I got: Project xxx.apk raised exception class ESQLiteNativeException with message ''. and after that: [FireDAC][Phys][SQLite] ERROR: no such table: items. Even table 'items' exists in the database file and I did not any changes in sources. Anyone had the same issue?
  12. i am using Delphi 10.3.3, and i develop app for Android with local language fonts (Sinhala Sri Lankan Language), same font i can see in my mobile no issue, but when use the same font for my app fonts shows weird, for your reference i am attaching 2 screenshot with the app and same text with my mail phone and the fonts i use. and i already add to the deployment, and given the path .\assets\internal as well still the problem same, if you can help me i relay appreciate, since i am not professional developer still i am just learner, Noto Sans Sinhala.ttf
  13. 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 ?
  14. Hi I'm using Delphi 10.3.3. I have a problem with TLabels on Android. There are horizontal or vertical lines on some letters in the TLabel. As you can see on the attached image, the "d", "y" and "A" of the label "Cloudy Apple Juice" have lines on them. So do the "h", "O", "u", "c" and "e" of the label "Fresh Orange Juice". I'm using Java JDK version 1.8.0_261. I don't know if this has anything to do with it, but lately I had to uninstall the JDK (of which I don't remember what the version was) and reinstall it (version 1.80._261). Has anyone encountered this before? And what is the default version installed by Delphi 10.3.3.
  15. Hi I'm using Delphi 10.3.3. I have a problem with TLabels on Android. There are horizontal or vertical lines on some letters in the TLabel. As you can see on the attached image, the "d", "y" and "A" of the label "Cloudy Apple Juice" have lines on them. So do the "h", "O", "u", "c" and "e" of the label "Fresh Orange Juice". I'm using Java JDK version 1.8.0_261. I don't know if this has anything to do with it, but lately I had to uninstall the JDK (of which I don't remember what the version was) and reinstall it (version 1.80._261). Has anyone encountered this before?
  16. 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
  17. How limit to one instance on android, windows, linux and mac ? There is any cross platform code? Thank you in advance. Pavel
  18. Chester Wilson

    Manual handling of virtual keyboard

    Is there a way to stop the automatic pop up / pop down of the android virtual keyboard? (So I can do it manually when I want it.) The application has a tMemo which provides information to the user. As there is not much room on a small android, it requires scrolling up and down at times. At these times the bloody keyboard comes up and gets right in the way!
  19. Hi there, I'm checking in iOS (and later for Android, Windows, etc.), what is the best, right way to Sleep in a background mode of the OS. The implementation for iOS seems to be same, as Posix, for iOS, Android, Macos, but I didn't checked that. My goal is to stop any OS operation in the background mode, to avoid killed apps by the OS. While the Thead loop is still active, but only throttled. TThread.Sleep - uses usleep, which is external function, as far as I know based on nanosleep - is this really affecting the current thread only ? class procedure TThread.Sleep(Timeout: Integer); begin {$IF Defined(MSWINDOWS)} Winapi.Windows.Sleep(Timeout); {$ELSEIF Defined(POSIX)} usleep(Timeout * 1000); {$ENDIF POSIX} end; System.SysUtils.Sleep - is bascially same {$IFDEF MSWINDOWS} procedure Sleep; external kernel32 name 'Sleep'; stdcall; {$ENDIF MSWINDOWS} {$IFDEF POSIX} procedure Sleep(milliseconds: Cardinal); begin usleep(milliseconds * 1000); // usleep is in microseconds end; {$ENDIF POSIX} System.SyncObjs.TEvent.WaitFor - is defintively based differently - uses a sem_timedwait (here and here also) - this probably waits by counting in a semaphore, so its not a "real" sleep of the OS, right ? Shall I better use Sleep or TEvent.WaitFor, to let threads sleep in the OS, while avoiding too many wakeups and operations in the background ? Is TEvent.WaitFor really sleeping, from a iOS OS perspective, or will it be seen as running app ? What I assumed before is that TThread.Sleep really stops the thread, and passes back CPU operation to other tasks, but I'm not so sure anymore under IOS.
  20. I was able to use Firemonkey to develop a multi-platform game, specifically for Android at first. After thoroughly debugging the app when running in Windows, I then deployed it in my Android tablet, and there were several problems, especially with regard to drag-and-drop, plus images that would remain on the screen when they should have disappeared. These problems were intermittent -- difficult to re-produce reliably. Nevertheless, I spent many hours trying every little trick I could think of in terms of structuring the code (e.g. different ways of trying to make a glyph disappear), but still could not get the functionality to where it needed to be. I was using Android 32-bit - Android SDK 25.2.5. Again, this app would run consistently and perfectly when running the Windows version! Unfortunately, I'll have to give up on this project unless someone has a bright idea.
  21. 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.
  22. I developed an application using Delphi Firemonkey for managing my own commercial complex. I have named it EasyTenant. Overall development experience is good, though not excellent. Development was really faster because of the RAD nature. Third party components are limited for Android Firemonkey. GUI is average, not rich like other languages like Swift, Java, etc. Delphi lovers please give your feedback by looking at the screenshots. UX for me is okay not excellent.
  23. 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.
  24. microtronx

    Android Service using local sqlite DB

    As in different old topics written, it is still not possible to have a android service with a tfdconnection or a tsqlconnection on it. The service is not starting any more, you use this. Here's a link: https://forums.embarcadero.com/thread.jspa?threadID=229761 But what can we do? Is there a known solution? I'm not able to find one. Have tried to create all components in service's code but still, i don't even get a log entry that means the service still can't be created and the app hangs on trying to start the service. Anone out there who can give some tips?
  25. We've implemented InAppPurchases, it works but if the user buyes a 12 months subscription on finsih i get this error is returned in "OnError" as tFailureKind.Purchase: IabResult: IAB gab keine purchaseData oder dataSignature zurück (response: Unbekannter Fehler) But Google says purchase is successful. I see the subscription activated. If i do a InAppPurchase.QueryProducts the product is listed as activated. Is someone using this with Rio and working? Is there any other component available than the integrated from embc. Such a base-function should work out of the box but does not.
×