Hello community, I apologize for my poor English; I use a translator.
I'm attaching the AIA file for a simple project; it's a counter. Every time I press the ADD button, the value in the text box is incremented by one.
When I run RefreshCompanionScreen, the last saved value is displayed in the text box, and if I press the ADD button, the text box value is incremented by 1 again.
Why does the app work with the Companion, but if I install the APK on my Android S9, I get an error message when I press the ADD button?
Thanks to the community in advance for their help.
Counter.aia (2.1 KB)
Hello community, I apologize for my poor English; I use translator.
I'm attaching the AIA file for a simple project; it's a counter. Every time I press the ADD button, the TextBox value is incremented by one.
When I run the RefreshCom
Counter.aia (2.1 KB)
Make sure the Textbox has a number value when you press the add button. It can not be empty.
As @Kevinkun has already said, the operands cannot be empty.
In your code, there is also a problem with the type of data: in case of non-existent data in the TinyDB, you respond with a "empty character" while the mathematical operator 'sum' (+) wants numbers. Therefore to solve your problem you simply have to change the empty character with a '0', like below:
Last comment is: in your designer page, please tick the "numbers only" so to avoid entering non numerical data.
Thanks Ugo for your help, now I understand where the mistake was.
Sometimes you get lost in a glass of water, I'll be more careful in the future.
Thank you and the community for your valuable contribution.