Netwrok connectivity issue while calling App42 Api server

0 votes

Hi,

 

I have a query related to network connectivity.

In my android app, while calling every module I check for the GPRS/wifi connectivity, and that works fine.

But the problem is,

 

Suppose my netwrk is connected properly when the module is called.

Now after a series of some execution, i call the the App42 service for retreivng data.

 

storageService.findAllDocuments(dbName, collectionAttendance, new App42CallBack()
{  
public void onSuccess(Object response)   
{
Multiple steps performed ere
}  
 
public void onException(final Exception ex)  
{  
}
}
 
The prob is, suppose after onSuccess() is called, the network (GPRS/WIFI) connectivity is lost,
so in this case neither the onException is called, nor the program flow moves ahead.
The app stops responding :(
 
Is there any way i can handle the network connectivity all the time?
 
Please help me
 
Regards,
Hitesh Jain
asked Feb 7, 2015 in App42 Cloud API-BaaS by Hitesh Jain (16 points)

1 Answer

0 votes

Hello Hitesh,

You can use caching & offline storage to resolve to resolve this issue. To make your non responsive, you can save your data in app local storage & when you recieve the internet connectivity, update your data on server. Please have a look at this link & let us know if it helps.

Thanks,

Himanshu Sharma

answered Feb 8, 2015 by hs00105 (2,005 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...