public NewsService() { if (DeviceInfo.DeviceType == DeviceType.Virtual && DeviceInfo.Platform == DevicePlatform.Android) { newsFunctionUrl = "http://10.0.2.2:7071/api"; } newsFunctionAPI = RestService.For <INewsFunctionAPI>(newsFunctionUrl); }
public NewsService() { if (Device.RuntimePlatform == Device.Android) { newsFunctionUrl = "http://10.0.2.2:7071/api"; } newsFunctionAPI = RestService.For <INewsFunctionAPI>(newsFunctionUrl); }
public NewsService() { // this is to account for Android emulator pecularities in local networking // https://developer.android.com/studio/run/emulator-networking.html if (DeviceInfo.DeviceType == DeviceType.Virtual && DeviceInfo.Platform == DevicePlatform.Android) { newsFunctionUrl = "http://10.0.2.2:7071/api"; } newsFunctionAPI = RestService.For <INewsFunctionAPI>(newsFunctionUrl); }