I started to analyze my form which works fine for the last 3 years and found out that I loose 1% of my form submitions every day. It happens that the forms which submitted on Android(smartphone with resolution 320-450) doesn't pass any hidden or unhidden field values.
I searched the internet. No chances. It happens very rarely and only on smartphones. It was even hard to detect the case. The problem was discovered when I started to log serialized $_REQUEST. When form fails I get empty serialized array.
More info: I can see from my special software (video tracker) that user do fills the form and hits the button "submit".
Any idea or hint will be hightly appreciated.
SOLVED. I changed form "POST" method to "GET" method. Maybe there are some cheap not orginal mobile phones which don't allow/have restriction with post data. Sending data as "GET" solved the problem.
But still, the situation is weird.
Related
I have been implementing my own turn based board game. Whole game is based on PlayGameService's SkeletonTbmp example with some modifications.
My problem is that a player sometimes receives its own data that it sent to the opponent using takeTurn(). I have checked many times that getNextParticipantId() returns the right id. For example my emulator persists a move data and sends it correctly to my actual Android phone and my phone unpersists as implemented in the example. Then some seconds later my emulator receives this same data without actual device persisting it and calling takeTurn(). This also happens sometimes on game start on the first turn, emulator receives the first "dummy" turn data without actual device sending anything yet. It does not happen every single turn, just occasionally.
Could this be something with my Google Play Console settings or does these turns buffer some how and then they are released at some point?
As you have not giving any codes i cannot pinpoint the problem. But just for the explanation, as long as the match is going, match will contain data, whether its your turn or not. To pinpoint the exact place this is happening, put checks at the execution of updatematch() as it must be firing without actual need. (on login, reconnect, initiate, connectionhint etc). Can't be sure about your code but alternate approach to bypass the bug, you can actually put check on turncounter in addition of MATCH_TURN_STATUS_MY_TURN otherwise pass the null turn. Hope it helps as further i cant help without your code.
It seems that i just forgot to always remove the old games from the "check games"-UI, thats why it sends the same data after a while, when i am already attending to a new game with same opponent.
I am developing an SMS app. I am getting messages from the Android Database every time user opens the App.
On a device with around 100 messages, it works fine. But with a device with 10,000 messages the app takes around 20 seconds to display the list after getting all the information.
To solve this, I am thinking about three possible options here:
Should I consider saving all the data to my own database? Will it make it faster?
Should I get some messages first, and then the rest in the background?
Any other option you might suggest.
Thanks in advance.
Below are the answers of your question
1. Should I consider saving all the data to my own database? Will it
make it faster?
No, don't do that. This will not make it faster. Same response you will get.
2. Should I get some messages first, and then the rest in the
background?
You can do this, but there is no need to do this to get all messages in background.Because User can see limited number of messages and chances are he will not see all messages down the bottom. So it will be useless to get those in background (untill or unless there is a business requirement)
Any other option you might suggest.
Yes, you need to implement pagination and need to keep track how many messages are needed to be loaded first time and while user scrolls then get more messages. In this case you need to keep track your own about how many messages you have already loaded and how many more you want to load. TO achive this, you will be required to implement PULL TO REFERESH mechanism of android. And a lot of tutorials can be found over the web.
Hope that answers your question.
I am making an android app and facing this similar issue I am sending data my SQL server using FCM which received in onMessage function in my app, but at the time of receiving the data I am not sure weather that specific screen exist or not? maybe user was on another screen at that time.
And along with this there will be number of different data objects for different screens? How can I make sure that data will properly update the existing data I know how to update data so please don't think about that, problem is how to call update functions of different screen which may or may not exist at that time.
I have spent more than 3 days on this solution but can't figure out. Please any good suggestion could prove a lot of help.
I am working on an application (API > 15) which reads all phone contacts and then suggests all people who are on our application.
Data required :
1. Phone numbers
2. Email ids
The flow is :
1. Read all phone contacts
2. Send them to the server
3. Match with existing contacts
4. Send the matched contacts back to client
5. Suggest the user those contacts.
Now issue is I have close to 2000 contacts in my phone. For that it is taking 46 sec. This is too much. I can't make the user wait so much.
Possible Solution :
Read contacts in several batches of 200 contacts each using different threads. Run them parallely and consolidate the results.
Issue
I tried it but still taking too much time. I think content resolver is thread safe. So it is still not able to service different thread requests parallely and taking same time. Infact a little more than before now.
I think there should be some other solution which all these messaging apps like whatsapp uses. Anyone have any idea?
I can post the code as well but it is the common default one only which everyone uses. I have done all type of optimisations there including not making any extra String variables which might interest android to run garbage collector again and again and increase processing time.
Put everything in a service when the user launcher your app. do everything in background. once you finish popup something to the user.
This is what am doing right now and I hope I help.
I have a web application written in ASP.NET.
I have some wierd problems sometimes in which I get ThrowMacValidationError/Invalid viewstate.
I have noticed that these errors occur in android clients and/or iphone clients.
However, I've tested my site in both devices and did not have this problem.
What can cause this?
Thanks!
Update: It happens on IE9 too sometimes.
This seems to be very 1 out of many requests... I cant point my finger on this.
There are many conditions that may throw a ViewState Exception but I guess that this link Does viewstate expire may answer the most likely case, especial for mobile device.
Here is why mobile device are more exposed to this issue:
I visit MyPage.aspx with one PostBack link called MyPostBackLink.
Before clicking on that link I get a SMS or any other distraction that causes me to forget about the web page.
20 minutes later (default Session expire time) I remember about that web page.
Open the Mobile browser and MyPage.aspx is still there and loaded.
Click on MyPostBackLink and I get a generic ViewState exception.
Does viewstate expire also gives different ways of "fixing" this.