Example #1
0
        public NewsService()
        {
            if (DeviceInfo.DeviceType == DeviceType.Virtual && DeviceInfo.Platform == DevicePlatform.Android)
            {
                newsFunctionUrl = "http://10.0.2.2:7071/api";
            }

            newsFunctionAPI = RestService.For <INewsFunctionAPI>(newsFunctionUrl);
        }
Example #2
0
        public NewsService()
        {
            if (Device.RuntimePlatform == Device.Android)
            {
                newsFunctionUrl = "http://10.0.2.2:7071/api";
            }

            newsFunctionAPI = RestService.For <INewsFunctionAPI>(newsFunctionUrl);
        }
Example #3
0
        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);
        }