Jump to content

ToddFrankson

Members
  • Content Count

    21
  • Joined

  • Last visited

Everything posted by ToddFrankson

  1. ToddFrankson

    Android and services...

    I need some help in figuring out services.... I will be writing an app that needs to stay running, and every certain interval of time (at least 15 minutes or more-user configurable), open a file(in the apps folder) read it and then close the file(there's more to it but that is basics). I believe a foreground service is best, with it sticky, and start on boot.... I have those pieces. So the questions I have are the following: Like a weather app, I'd like it to stay in the Notification Panel at the top. How does that work? anyone have sample code? See the image.....How do I make my App stay like that in the notification panel, and then when the panel is "closed" it displays the current temperature. Has anyone done that in Delphi? I also will have the interface allowing to see the contents of the file the service opens, I believe I have some samples for that, but if it helps it will be a few configuration text items, and the UI will also open the same file, blocking the Service from doing so when the UI is launched. I believe I have that covered as well....
  2. ToddFrankson

    Android and services...

    Not necessarily solved. Just trying to understand the process.......... I've read that foreground services have some specific permissions that need to be requested, along with specific reasons why. I think I have a grasp on that now... As for the notifications, I can get that working by modifying your Kastri Demo Actually.....I used the JNotification_Builder and JNotificationManager to create the first Notification. For updates, I used the JNotificationCompat_Builder Still having issues getting the App Icon Using the following: var MainAppContext: JContext; AppIcon: Integer; Begin // Get the main application context by package name MainAppContext := TAndroidHelper.Context.getApplicationContext; // Fetch the application icon from the main application context AppIcon := MainAppContext.getPackageManager.getApplicationInfo( MainAppContext.getPackageName, 0).icon; ...... //other code related to building either the Notification_Builder or JNotificationCompat_Builder. .... End; The Icon is always a white box.
  3. So out of the box, the demo doesn't work for me. The first problem was the Read and Write External Storage permissions are deprecated. So, I changed the permissions to use the media files..... changed the line in the service from : LFileName := TPath.Combine(TPath.GetSharedDownloadsPath, LFileName); to LFileName := TPath.Combine(TPath.GetDocumentsPath, LFileName); in hopes it would work. Still nothing. This is my first pass at services, so I don't know diddly...... 1-Can I debug a service? I have tried but can't seem to make it happen. 2- Does the service and the App reside in the same "directory" on android, and have access to the same folders? I'm at a point where the app runs fine, but no notification comes from the server indicating the file downloaded, and the app never loads it....... Any one have 2 cents??
  4. Disregard.....Needed the Post notification permission
  5. ToddFrankson

    What new features would you like to see in Delphi 13?

    Dave, it would be best to have a private conversation regarding why. I actually have been thinking of reaching out to you.... I'll PM you.
  6. ToddFrankson

    What new features would you like to see in Delphi 13?

    While that is awesome, it should have been provided, and in the future, should be provided by the producer of the software. No one there ever thought, "I bet people will love installing 200+ addons one at a time, instead of a select a group and install...."
  7. ToddFrankson

    What new features would you like to see in Delphi 13?

    Android Auto built in Apple CarPlay Built In IOS Debugging (not on emulator) Ability to select multiple Getit Packages and install at once instead of having to select and install each one
  8. For some reason, the Android Service Demos don't work for me. I follow the instructions, and deploy fine, but the service never starts. Is there a "fix" or something I need to do? Embarcadero® Delphi 12 Version 29.0.51961.7529 12.1 patch
  9. ToddFrankson

    Mobile Zoom & Pan

    I have been looking into Zoom and Pan on mobile.... Almost every example I find involves zooming and panning an Image... Anyone have an example using a TVertScrollBox and the components on it?
  10. ToddFrankson

    Weird new IOS Issue-

    So, I have been working on a multi platform project, that has worked fine on Windows Android and IOS. IOS just updated to 17.5.1 The code works fine Prior to the update, but not after. I use TNetHttpClient to do a get of a web page. Prior to the Get, a Head returns just fine, to ensure internet access. I made a simple sample of the code. tap a button to initiate the Get and load the same page in a Twebbrowser. Can anyone text the attached code and tell me why the Get doesn't "get"? And why it works fine Prior to 17.5.1, and on all other platforms?? When the button is clicked, the Webbrowser browses the page, and the memo never gets filled. AndroidManifest.template.xml Entitlement.TemplateiOS.xml info.plist.TemplateiOS.xml Project1.deployproj Project1.dpr Project1.dproj Project1.dproj.local Project1.dsk Project1.identcache Project1.res Unit1.fmx Unit1.pas
  11. ToddFrankson

    Weird new IOS Issue-

    Yes, several files. Everytime I get a cannot write..... user doesn't have sufficient rights error, only displaying when I specifically show the error in a message. When I remove the try except, the file doesn't exist to open. I just spent the day on the main project, using message dialogs to find this out. I am now using temppath.
  12. ToddFrankson

    Weird new IOS Issue-

    Ios 17.5.1? 17.5 sdk?
  13. ToddFrankson

    Weird new IOS Issue-

    The failure Occurs in the code i posted with the Stringlist.SavetoFile. No ERROR PRESENTED. I had to wrap almost everything with message Dialogs to find the failure. I tried Assign /reset just on a whim . I have attached a new unit.pas. On line 92 & 93 put a URL you know you can get too. Unit1.pas
  14. ToddFrankson

    Weird new IOS Issue-

    So, I have figured out my problem. Please alter the code with a web page you can hit. It seems that IOS No longer likes Getdocumentspath....A Stringlist failed to write to it, using Assign and reset failed to open or read the file.... All in development mode. Can anyone check this?
  15. ToddFrankson

    Weird new IOS Issue-

    Can Anyone else get to this website https://gis.cravencountync.gov/images/activebookings.html ?
  16. ToddFrankson

    Weird new IOS Issue-

    Interesting. It's a local county government page.
  17. ToddFrankson

    Weird new IOS Issue-

    I never had to set anything before. Especially in the sandbox.
  18. ToddFrankson

    Payment - Monetization - Good international PSP

    Do you have sample code of the paypal processing? I want to use paypal for a project and need guidance. Not to well versed in JSon
  19. Interesting. Let me post my Sample project. see if that does it. I used android 32 on a Motorola Edge (2020) and a Samsung Galaxy S22 64 bit. Haven't tried IOS yet. I have a screen recording, but the file is to large to post here. test.deployproj test.dpr test.dproj test.dproj.local test.dsk test.identcache test.res Unit1.fmx Unit1.pas
  20. After a bit more looking into it, It occurs for me on android when I have a tabcontrol, within a tabcontrols Item Tabcontrol L Item1 L Item2 L Tabcontrol2 L Item1 L Vertscrollbox Add a few group boxes, enough to scroll Add 2 edits to the top group box, Tap into it then scroll.
  21. I have the same issue since about 3 weeks ago in one of my apps: List index out of bounds (3) TList<FMX.Controls.TControl> range is 0..2 I have a Tabcontrol, with 3 tabs. 1 tab has a VertScrollbox. I dynamically create 24 group boxes, each with either 1 edit, and 1 text or 2 of each in it. Groupboxes are aligned to the top All children of group boxes are aligned to the top. Running on windows, no error. Run on Android, the error occurs every time an edit had focus (Cursor in the edit, keyboard displaying), but the scroll works fine after that selected edit has gone off screen, either top or bottom. Happens the first time, meaning if I scroll up and get the error, I scroll down passing the top, no error. if I tap outside of the edit, no error, ever. It just started last week with this little utility I am putting together for a friend. I can't debug it because I can't find where the error is originating, IE-Groupbox,Scrollbox, etc., since it is a generic tcontrol error. Like somewhere a count was not set to the right number of controls. Delphi 12 Version 29.0.51961.7529
×