Jump to content

Search the Community

Showing results for tags 'android 13'.



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

  1. hackbrew

    App persistence and restoring state

    Currently, I'm working on an Android 13 FireMonkey mobile app (Delphi 11.3) with a TabControl with about four tabs. The app is grabbing JSON data from a URL and manually parses and loads the data into a FDMemTable. The app has very small data requirements (ie., single user, single table, and the JSON file would exchange only about 25 records per day containing about a dozen or so key/value pairs). Besides the memory table, I'm using an embedded database (SQLite) to store the data on device using LocalSQL features to implement database CRUD operations. My concern is persistence and restoring state if the app were to say crash/lose focus/device reset. Right now each time the app gains focus it starts from the beginning. For example, when running the app and then a call comes in on the device, my app loses its focus. When you return back to the app it starts as in the first time. I would like it if when the app restarts to remain in the same state it was before going to the background. I played around with the OnSaveState event on my main form, but it didn't behave the way I expected. For example, I send a mapping intent from my app to the default mapping app on the device for navigation. In this instance, the user temporarily leaves my app when the mapping app opens, and when closed, the user should return to my app. When I implement the OnSaveState event into my app (to read/write data to a stream) the user never returns to my app after closing the mapping app. But, if I remove the OnSaveState event, it does return back to my app, which is the desired behavior. How should persistence and restoring state be handled in an Android app?
  2. hackbrew

    Handling Androids Navigation buttons

    I'm working on an Android 13 FireMonkey mobile app in Delphi 11.3 which has a TabControl with four tabs. I'm having trouble with managing the Androids Navigation buttons and wondering if it's a preferred practice to hide the buttons and have the user use gestures instead. Right now, if the user presses the back button, I'm capturing the key in the OnKeyUp on my apps MainForm via if Key = vkHardwareBack then I move back a tab and/or display an exit dialog if the user is on the first tab. That works fine, but when the user taps the home or overview buttons and then comes back to my app, it starts from the beginning. What is the recommended process on how to make an Android app behave if the user taps on any of Androids Navigation buttons (back/home/overview)? Is it considered a best practice to hide them and have the user use gestures instead?
×