Listview data retrieved from Firebase Realtime Database: it works in Companion, not in apk

Hi everyone.

I have build my app and I’m testing it on my smartphone.

I see that a listview is empty. The listview retrieves data from a Firebase Realtime Database an it perfectly works in Companion. I don’t understand what is the problem!

Please, help me :slight_smile:

Show your specific relevant blocks

Mmm… this will be a time consuming activity, the app is 11500 blocks, but I wil try.

In meantime, do you have an idea?

Remember, the app perfectly works in companion.

Are you using the Firebase component or the Web component to access Firebase ?

I’m using the web component.

I followed steps in your web page

A quick test here shows everything to be working, I get results back in a compiled app.

Mmm….this is a big problem.

I have to check my blocks :frowning:

The question is: where I have to check… where could I find a bug that makes my app not working in apk but working in companion?

Track back from where you set the listview elements

Hi @TIMAI2

there are news related the problem in switching to apk from companion.

I was working to find the cause in my blocks and I find other very strange behiavours starting from the time I downloaded and installed the apk on my smartphone. Important info: after a first test I disinstalled the app from my smartphone. I have changed NOTHING in blocks.

1 - listview is now empty also if I use companion

2 - the aesthetic appearance of lists in spinners are now changed also if I use companion

3 - other is changed because if I add an item in a dictionary (in Firebase Realtime DB), this now results in overwrite previous data in dictionary

…what is appening?

Something, or many things are broken in your app.

You will need to carry out more bug tracking using Do it in Companion app to find the source/s of the problems.

It is always worth creating small test aia projects of the particular areas of your main project that a causing issues, this can help with bug fixing.

Are you getting any runtime errors when you run the app?

No

@TIMAI2 I understand what you say related to bug tracking and small test aia…and I will do it if needed.

But behaviour of companion is very strange…

Could be related to new Companion version nb204 updated on my phone march 16th ?

Debugging is an inherent phase in every program: log to file, some print/notifier… ( there is also a debug extension from @Kumaraswamy, which works even on apk, but I’m not able to make it work )…

…don’t you use any debugging feature in your “small” program?

P.S.

As pointed out by @TIMAI2 it should be even easier to setup a minimalistic test app that reproduces the issue…

Hi @davidefa

(se sei italiano, siamo in due)

For the entire development I have used an approach like: make a project of a little piece of app, test it on companion, debug it, integrate it in my full app and finally test in companion the result.

In this way, I’m now on the finish line. Final app was working well in companion and I have build the apk.

Ok. Now, when I return to use companion, I find bad news… my app doesn't work like before I build and run apk on my phone…

NO changes made in blocks!!!

Something related to new version of companion app?

Something related to the fact that I produced my apk using “code server”?

Something changed in local database due to apk installation?

But no apk testing along the way !

No…

But now, first of all, I have problems in companion…

And my think was that companion is a good simulator for apk…for this reason I not tested every time the apk.

Yes I’m italian ( but we should be 60M roughly ; - )

I understand what you say ( the problem you are facing is/could be caused by some changes in app inventor ), but in any case being able to understand what’s going on is always desirable…