Windows Phone App local storage and Azure

Have a few questions regarding the best way to go about building a WP8 app that will link in with cloud storage via Azure.

My first problem is that I need to store all records on the phone as there may not always be a usable internet connection. My current solution uses SQLite, I thought it was potentially overkill to have a local db as well as all the Azure cloud code. Or should I be using SQL Server CE and that way my model (X) classes will match with what Azure needs when I'm calling App.MobileService.GetTable().InsertAsync(record);

One other option would be to save the records on the phone as JSON strings but I'll need to manage PKs myself and these won't match up with the PKs that Azure uses. I'll also need to push the device ID to Azure so I know which devices have pushed which records...

I was out field testing my app in Uganda and one main problem was the lack of reliable internet connectivity, I was trying to push records to Parse ( but apparently their "saveEventually" API hasn't been implemented for .NET, it kept crashing the app with the record code "OtherError" and that was when I had 3G/Wi-Fi access. So I figured I'd ditch Parse and go with something a bit more reliable like Azure.

I don't know whether I should try and push each record to the cloud as they're saved on the app or wait and push a load of them in one go to the cloud when there is a Wi-Fi connection available. I could check if there's a Wi-Fi connection each time the app is launched for example.

Is NetworkInterface.GetIsNetworkAvailable() alone sufficient in trying to ascertain if a network connection is available? My problem is that in places like Uganda, 3G is sometimes available so the app will think there is a 3G connection even if the user doesn't have any data allowance left (or a similar thing is where you connect to Wi-fi in a hotel but you can only access the hotel's login page, again the app would probably think there's a valid connection). I thought checking to see if I could hit my Azure URL and see if there's any response before proceeding with saving the record?

I appreciate that my questions are quite vague but just looking for some general advice on how to go about this. I'm pretty sure there are other apps out there that make use of some kind of local storage as well as Azure for cloud storage (with poor internet conditions).



I recommend the use of Azure and MobileServices, essential for a mobile application, sql lite still too early to see it now, if you want to keep the data in the local choice to make now for my experience and LinqToSQL and a database. sdf or SqlCompact , great for mobile applications.

Need Your Help

How to use NSPredicate to find an NSString begins with numbers or special characters in ios?

ios nspredicate

Could you please help, how to use NSPredicate to find an NSString beginsWith numbers or other special characters (But not begin with alphabets)? I want to sort an array name that contains any numbe...

dynamically remove td from table inside gridview

c# .net gridview

I have a situation in which i have to show data in following manner.