Using a Public Dropbox File as Data Source for Our Apps – Boredom Challenge Day 5

Standard

If you are an individual developer (and especially a new-grad or a student), chances are you won’t have the resources to have a backend for your app, or maybe you need to just keep a small amount of information that you don’t want to get a server or hosting provider for. In this case, we can use an online storage service (SkyDrive, Dropbox, Google Drive, whatever you wish) to provide read only data for our apps.

1

For example, you want to create a TV app that gets video streams for multiple different TV channels. If you hard-code them into your app, you’ll start getting errors when a TV channel decides to change the address of their stream, and to replace it you have to change the link in your code and publish an update for you application (which will take several days, at least). Instead, you could put the links of the streams in a public file and then read them in your app when your app starts, which will give you the opportunity to change them any time, and your changes will be effective instantly. Heck, don’t just keep the links, keep the name and picture link and any other information you want about that TV channel (you can use XML or Json formatting) and then read all of this data in your app: This way you can instantly add new channels, edit existing ones or remove them whenever you want.

Therefore, if it is not a problem for the file to be publicly visible, this is a free (emphasis on free), quick, easy to use and effective method for providing read only data to our apps. In this article, we’ll use a public Dropbox file and see how we can use this in a Windows Store app.

➤ For bonus points, you can read app settings (like background color) from this file and change it whenever you want… 😛

Advertisements