networking - how to save request and resend in android app -


in app trying send data network. app getting slow or gets crashed when network not available.

how save request later , resend once phone has network coverage again?

how this.........

@aleadam right, should post data later once internet connected, can check intent connection method.

public boolean isnetworkavailable() {     connectivitymanager connectivitymanager            = (connectivitymanager) getsystemservice(context.connectivity_service);     networkinfo activenetworkinfo = connectivitymanager.getactivenetworkinfo();     return activenetworkinfo != null; } 

but method require import android libraries here these

import android.content.context; import android.net.connectivitymanager; import android.net.networkinfo; 

i hope help.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -