Cordova Android 14 (SDK 34) Issues

Has anyone else had any issues caused by Android 14 (SDK 34) ?

Having re-built my app (without making any other changes to it) for Android 14 with VoltBuilder, and running the app on an actual device with Android 14 (SDK 34), this seems to be causing 1 specific function to not work as expected.

Having spent 3 days trying to narrow down the cause of this (without any success), out of curiosity I loaded the same app on to an old device which has Android 7 (SDK 24) and it works fine.

Any ideas on the changes with Android 14 which would cause any bugs?

Config:

<preference name="android-minSdkVersion" value="21" />
<preference name="android-targetSdkVersion" value="34" />
<engine name="android" spec="13.0.0" />

Results:
Tested on a device with Android 14 = Doesn’t work as expected.
Tested on a device with Android 7 = Works as expected.

All previous build versions of this app have all worked as expected, so something in Android 14 has changed, any ideas?

Can you give more information on the function that isn’t working? It might help to understand what is going on.

Also, does the Chrome Debugger Console have any messages?

Hi, no errors in the console.

It’s a bit complicated, I have a native app with a local SQLite database. A user can enter data into a html form and that data saves to the database with a UID.

They can print that form or create a PDF file from it.

The print and create PDF function buttons are on the same screen as the form input screen on the header. When one of the print/create pdf buttons are pressed I copy the data from the current screen inputs to a hidden html template (Form 2), for example Form2_input1.value = Form1_input1.value

I then use a HTML to PDF function to save Form2 as a PDF file.

Each time a user completes Form1 and saves that to the db it will use a UID each time, each completed form is listed in <ul>, the user can click on a specific <li> to view it and print/create a PDF. When a specific <li> is clicked the data for that item is loaded from the DB into Form1.

So far this still all works as expected.

The issue starts here:-
I have a function where the user can create a single PDF file for ALL of the <li> items with a Print All button.

I get all of the UIDs and loop through them. The loop uses the existing functions to load the data for each UID item from the DB into Form2, then create a PDF file (saved to tmp storage). Once the loop has finished I then get all the pdf files saved from tmp storage and merge them together as 1 pdf file.

The issue is that after the 1st generated PDF file, the PDF files are missing the data (loaded from the DB). I use the same function as above to load the data and create the single PDF file (which works).

Note: I increased the setTimeout (to allow time for the data to load from the db in to Form2 before calling the generate PDF function but that didn’t help.

I intend to replace the setTimeouts with function callbacks at a later date, I just need to get this update out asap.

Older versions of Android are going to have differences in the browser environment. Based on what you’re saying, I suspect that something is taking a bit longer and your setTimeouts are no longer waiting long enough. You could increase them to be much longer and that might help, but honestly using callbacks/promises/async is the right way to go.