August 2016
Beginner to intermediate
1049 pages
23h 17m
English
In this section, we will have a look at two common patterns that are common to mobile applications and how to implement these usage scenarios in a platform agnostic manner.
Application preferences is a common scenario in mobile applications. In order to use the previously described property list on iOS and SharedPreferences on Android, a common dictionary interface is often the most appropriate approach. The interface would then be inherited on platform-specific projects and can be injected into the common library.
For a simple demonstration, we can define a simple interface that will retrieve and save string values. The code is as follows:
public interface ISettingsProvider { string this[string ...Read now
Unlock full access