I have been able to build a quite complicated application with b4a, but am starting to have all kinds of weird problems.
The app is for recording data. Using httputils2, I connect to my php webservice which queries mysql and returns results as JSON, the b4a app stores this into a sqllite db on the device. This all seems to work fine.
Users change data and then click "submit", which creates a JSON string from the sqllite db and uses PostString to send it to the webservice.
99% of the time this works flawlessly. However after running the app sitewide with 25 users, I have noticed an obscure issue, which I am trying to isolate.
The issue is that the data gets submitted twice. Sometimes 2 minutes apart, sometimes 10 minutes afterwards. I know this because mysql timestamps when the webservices receives the posted data. In both cases it is the exact same dataset, and never more than submitted twice. This sounds like a logic error. But I only call the PostString a single time.
There is only a single place the data gets submitted, and this is only called a single place in the b4a app when the user clicks the button. I know users are not clicking the button multiple times.
I am wondering if this could be caused by network issues. Is there anything built into httputils2 that will try and resend data? Could the httpjob be being submitted twice? My app is not programmed to retry, only show an error if it fails.
Could there be a conflict/bug because I run consecutive httpjobs to fetch and post json data?
I am finding a whole range of odd, inconsistent issues, which are almost impossible to reproduce. Often it is errors of views not being initialised (but not always). There is just no logic to the problems. I am finding debugging on android intensely frustrating.
The app is for recording data. Using httputils2, I connect to my php webservice which queries mysql and returns results as JSON, the b4a app stores this into a sqllite db on the device. This all seems to work fine.
Users change data and then click "submit", which creates a JSON string from the sqllite db and uses PostString to send it to the webservice.
99% of the time this works flawlessly. However after running the app sitewide with 25 users, I have noticed an obscure issue, which I am trying to isolate.
The issue is that the data gets submitted twice. Sometimes 2 minutes apart, sometimes 10 minutes afterwards. I know this because mysql timestamps when the webservices receives the posted data. In both cases it is the exact same dataset, and never more than submitted twice. This sounds like a logic error. But I only call the PostString a single time.
There is only a single place the data gets submitted, and this is only called a single place in the b4a app when the user clicks the button. I know users are not clicking the button multiple times.
I am wondering if this could be caused by network issues. Is there anything built into httputils2 that will try and resend data? Could the httpjob be being submitted twice? My app is not programmed to retry, only show an error if it fails.
Could there be a conflict/bug because I run consecutive httpjobs to fetch and post json data?
I am finding a whole range of odd, inconsistent issues, which are almost impossible to reproduce. Often it is errors of views not being initialised (but not always). There is just no logic to the problems. I am finding debugging on android intensely frustrating.