My app cant be installed on Samsung Tab S10+

It shows up when I start the IDE and also when I press F5 in the IDE? Wenn I then press OK, it continues to the first debug point. On Android the app icon is not shown. In the console of Chrome the message is:
Error while trying to use the following icon from the Manifest: http://127.0.0.1:50443/Bilanz004/nsb/images/bilanz72k.png (Resource size is not correct - typo in the Manifest?)
The icon is shown correctly in the (top-)tab of the Chrome debugger.

There is no error message in Chrome debugger. It passes addEventListener and returns reasonable results. In the Version 5 version I placed this code in the Form1 Code area. Now I have a new code tab for this code, since, when I put it as text in Form1’s code area, there occurs strange coding format (unusual colors). In the meantime I loaded Form1 once again and its code is perfect. So I will go on testing.

You seem to be making good progress, but I’m not sure which issues remain outstanding. Can you let me know if there are still any?

  1. One issue is the app icon. I want to show my own app icon on my samsung tab S10+ homescreen. What do I have to do? I deleted the icon in the project properties and the message “Not found …/images/myicon.png” is still popping up if I press F5
  2. addEventListener is still not working in the native Android app. (Chrome is ok). here is my code in the Form1 section inside Sub Main():
    document.addEventListener(“deviceready”, onDeviceReady, False)
  3. Today the strange behavior in the coding section of Form1 came back: after every code line there appears 1 blank line. How can I get rid of them?

Overall I am convinced to reach my goal migrating my old app to Version 9 of NSB to do further new development.

  1. You need to set up the icon and splash screen in Project Properties, under the VoltBuilder tab. The Help box will show the specs for those.
  2. Is Sub Main() getting called? Why not do the onDeviceReady code in Sub Main()? Sub Main() gets partly from the deviceready event.
  3. Have you opened your code files in an external editor? Windows uses CR/NL which can cause this.

concerning Problem 1:
I specified the icon in Project Properties , under the VoltBuilder tab and now voltbuilder says: ‘UserError: Missing valid source image for Android icons See’ and don’t succeed. The icon has dimension 1024x1024.
Which help box do you mean ? What is the correct complete path before /nsb/images/ ?
concerning Problem 2 (the more serious one):
onDeviceReady is in Main() (part of Form1 code) and onDeviceReady() is located in another code tab. No success. Or do you mean onDeviceReady() should be inside Sub Main?

Here’s a screen shot of where to set the icon property, as well as showing the Help window:

Screenshot 2025-01-03 at 7.35.14 AM

Try putting just onDeviceReady() inside Sub Main, instead of addEventListener(“deviceready”,…)

Chrome debugger says: Uncaught (in promise) TypeError: document.onDeviceReady is not a function and the native app on Android stops. Is there a sample which handles this topic ? I didn’t find any.
Do you mean to put the code of the onDeviceReady handler inside Main ?
I tried that and it has problems with: ‘Uncaught (in promise) ReferenceError: LocalFileSystem is not defined at onDeviceReady (code.js:1571:5) at Main (code.js:594:3)
at Object.preMain (appstudioFunctions.js:2031:2)’
in Chrome and didn’t get out of that statement in the native app
I need to do local file reads and writes of text files in the native app to get some data into a spl db. I didn’t find any sample for file handling. Were that changed since version 5 ?
icon: I did it as you show, but the message ‘not found nsb/images/myicon.png’ persists and hinders Voltbuilder to create a apk file. I have to delete it in the prperties in order to get an apk

onDeviceReady()

Were you missing the ()?

What is LocalFileSystem? How is it defined?

Local file reads and writes may fail due to CORS, which is a (somewhat) recent new requirement in Android OS. If that is indeed the case, you will see errors on the remote console.

What is the actual path of myicon.png in your project?

In version 5 I used successfully the folowing code in Form1:

document.addEventListener("deviceready", onDeviceReady, False)

Function onDeviceReady()
  window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFileSystem, failReqFS)
  ....
End function

Which statement do I have to insert in config.xml ?
“plugin name=“cordova-plugin-???” source=“npm” /” ?

There are literally thousands of plugins. Some are supported by Cordova, others by independent developers.

Here are the Cordova plugins:
https://cordova.apache.org/docs/en/latest/#plugins

Other plugins can be found here:

I got an error on my native device with the hint: line 1617 column 69. How can I figure out, which line of my cod it is?

Have you tried the Chrome Remote Debugger?

Is there a difference between Chrom debugger and Chrom remote debugger? Chrom debugger doesn’t fire on OnDeviceReady, so I cannot test reading and writing files with it.

You can only debug your native device using the Chrome Remote Debugger. If you are getting an error on your device, it’s the best way to get more information.

Can you tell me how to start Chrome Remote Debugger, please. So far I only used F5.

Lots of resources on the web…

Thank you for your tip about the Chrome Remote Debugger, it’s a very nice tool that I didn’t know about before. When I tried to read a local file, I first did
window.requestFileSystem(…) according to the documentation (after onDeviceReady).
This resulted in the error: fileEntry undefined. How can I get a fileEntry ?

window.requestFileSystem() has been deprecated - you probably should find a better way to do this:

Can you recommend me another possibility to read and write text files. I have a sql database and want to backup its content.
I also use this backup (text files) to synchronize this database on other devices.
The example ‘ReadAsText’ works on the Windows PC but not in the native app on Android.