I have one of those questions which are hard to be asked or answered in a forum. Recently I have been tasked with designing (and implementing) an application which would run on android OS. Since I come from the .net world, I decided to use Xamarin.Android framework (previously known as mono for android). I did some research on the target framework and come up with a rough design. But since I am new to android world, I am not sure my design is the best one(ore even an acceptable one). I will try to be as brief with my description as I can. The basic requirements for the application are:
- The application must be capable of providing different GUI to different users.
- The application must display data fetched from the server.
- The application must provide means for a user to modify the server data.
- When one of the users modifies the server data other users must be notified.
Based on my research I come up with the following:
To provide customized GUI for each user, the application would first authenticate the user than retrieve a xml file from the server which would be than used to programmatically build the GUI. Since I have to support the device rotation and different devices this means a lot of work, so any thoughts on this would be very welcome.
I think the best way for the application to communicate with the server is by calling the REST based services(GET to retrieve the initial data and PUT to update the server state).
When the server state will be modified by one of the users, all other users will be notified using notifications(Google cloud messaging or GCM which replaced the old C2DM). Since most of the activities would rely on notifications to display updates I think the best way to implement this is to create an android service. The service would be started with the application and would run as long as the application. When the service would be started it would register it self with the GCM and than use broadcasts to notify the current activity that something has changed.
I apologise for a long post but I tried to be as brief as I could. As I said, this is a very rough design so any thoughts, ideas or criticism would be very welcome.
Uroš