send me to send a simple app that HTTP_GET request to the server periodically request over 3G, I saw That request sometimes expires (and server-side logging shows that it does not receive the request).
After you try out the different combinations I found a consistent pattern when this problem once occures (out after every 5-15 successful request)
- TelephonyRegistry:. notifyDataConnection () state = 2isDataConnectivityPossible () is correct, reason = null - TelephonyRegistry: broadcastDataConnectionStateChanged () according to the state = CONNECTEDtypes = default Supl, interfaceName = rmnet0 - NetworkLocationProvider: onDataConnectionStateChanged 3 Google, NetworkLocationProvider has been changed to 'DATA_SUSPENDED', which means "The connection is but IP traffic is temporarily unavailable". (See ). Situations where succeed HTTP_GET request, the state is changed to '8' my app does not use location management and would like to do I turn off all other non-critical app running!
I have to know:
- What is the reason for this issue? Why does the connection status go to DATA_SUSPENDED?
- Is it possible to avoid / eliminate this problem?
Any help / insights in this have been greatly appreciated! Thanks in advance!
The only problem with my app on Huawei Aidiios X3 with Android 2.3 I 0.5 . The app sends data to every server using HTT client every minute.
Using lockback, I can see that the data connection has been lost and then restored after a short time. Earlier my app stopped working since it was an exception which was not properly handled because of trying to send data without a connection.
I do not know the reason for the discontinued data connection but now I have data connection before sending data handling the situation or not. In my case it does not matter that some data is never sent. If it was important to avoid data loss, I could buffer data and send it once the connection was back.
public boolean isDataConnection () {TelephonyManager TM = (TelephonyManager) getSystemService (Context.TELEPHONY_SERVICE); Return tm.getDataState () == Telephony Manager. DATA_CONNECTED; }
Comments
Post a Comment