Click on Notification

Hello, i have another problem. If i click on the notification Screen1 opens and then the virtual screen "ScreenVerlauf" opens. So far so good. But the listview is empty and the buttons dont work.


First i add an item to the listview and then i create the notification

click
Here i close the virtual screen "ScreenHauptmenü" and open the virtual screen "ScreenVerlauf" where the listview is.

I hope sombeody can help me.

@AndiArbeit I don't know if I can help that much but can I get the .aia so I can try some stuff on the script.

Here you go
Briefkasten.aia (166.1 KB)

I think that is has to do with your if block, the If: Get(global BT_Data) = (P), because your list appears empty. you might have had an error there or at any block designed to set Bt_Data.

Ok that is strange. But i know that it works. I saw that he add items to the listview

You already appear to be on Screen1 ?

yes

A connection to the BTC should be established first. So, if BT enabled and BTC.IsConnected, BTC.ReceiveText...

What's up with your transparent backgrounds (PNGs)? I don't see any point in them. Besides, they crash the app (at least on the Google Pixel 7 Pro, Android 15 with Companion).


Apart from that, you have to request the Android version-dependent BT permissions. This issue has been discussed hundreds of times in the forum over the past few years and conclusively resolved, not least by me. → Bluetooth liste of devices deosn't work anymore - #7 by Anke

I got no problems with connection or sending/receiving data. My problem is when i click the notification it opens screen1 and then set the visibility of a VerticalArrangement (called "ScreenVerlauf") to true. But then it feels like the screen is static because the buttons dont work and there are no entries in the listview even there where entries beforehand.

but you are already on Screen1 ???

no i am on my home screen
tested it if i am already on screen1 and then click the notification the same happens.

:question:

There is only one screen (Screen1).

i meant the home screen of my phone

As I said, your app doesn't run with either the companion app or the APK (Android 9, 15). The app crashes or won't even start. Before we continue, first make sure your app can even start.

Well my app does start and i can use it. It seems to be crashing when i click on the notification.

Apparently Screen1 is reopened and reinitialized, so the ListView is empty again.

Device name & Android version?
I checked in on a Pixel and a Galaxy device → crash!

Samsung Galaxy S20 Ultra with Andorid 13

Pixel 4XL, Android 13:

Same on Android 11 (Pixel 2XL)...