Ejemplo n.º 1
0
        public override string getTutorial()
        {
            Uri staticFiles = new Uri(BuildSettings.getStaticServerBaseUrl() + "tutorial_feed.JSON");

            WebRequest   req             = WebRequest.Create(staticFiles);
            WebResponse  resp            = WebRequestExtensions.GetResponse(req);
            Stream       dataStream      = resp.GetResponseStream();
            StreamReader reader          = new StreamReader(dataStream);
            string       summaryResponse = reader.ReadToEnd();

            return(summaryResponse);
        }
Ejemplo n.º 2
0
        public override string getStrings()
        {
            Uri staticFiles = new Uri(BuildSettings.getStaticServerBaseUrl() + "strings.JSON");

            WebRequest   req             = WebRequest.Create(staticFiles);
            WebResponse  resp            = WebRequestExtensions.GetResponse(req);
            Stream       dataStream      = resp.GetResponseStream();
            StreamReader reader          = new StreamReader(dataStream, System.Text.Encoding.GetEncoding("iso-8859-1"));
            string       summaryResponse = reader.ReadToEnd();

            return(summaryResponse);
        }
Ejemplo n.º 3
0
        public override String makeRequest(String jsonPostString)
        {
            String debugURL = null;

            if (jsonPostString.ToLower().Contains("getcustomersegment"))
            {
                debugURL = BuildSettings.getStaticServerBaseUrl() + "getcustomersegment.JSON";
            }
            else if (jsonPostString.ToLower().Contains("getpostpayaccountsummary"))
            {
                debugURL = BuildSettings.getStaticServerBaseUrl() + "getpostpayaccountsummary.JSON";
            }
            else if (jsonPostString.ToLower().Contains("getpostpaybillbalance"))
            {
                throw new Exception("Should not use this anymore!! getpostpaybillbalance");
            }
            else if (jsonPostString.ToLower().Contains("getprepaysubinfo"))
            {
                debugURL = BuildSettings.getStaticServerBaseUrl() + "getprepaysubinfo.JSON";
            }
            else if (jsonPostString.Contains("getpostpaypriceplan"))
            {
                debugURL = BuildSettings.getStaticServerBaseUrl() + "getpostpaypriceplan.JSON";
            }
            else if (jsonPostString.ToLower().Contains("getconfigdetails"))
            {
                debugURL = BuildSettings.getStaticServerBaseUrl() + "getconfigdetails.JSON";
            }
            // else tips
            else
            {
                debugURL = BuildSettings.getStaticServerBaseUrl() + "gethelp.JSON";
            }
            Random rnd = new Random();

            debugURL = debugURL + "?param=" + rnd.Next(10000);
            Log.d(TAG, "loading url - " + debugURL);

            Uri staticFiles = new Uri(debugURL);

            WebRequest   req            = WebRequest.Create(staticFiles);
            WebResponse  resp           = WebRequestExtensions.GetResponse(req);
            Stream       dataStream     = resp.GetResponseStream();
            StreamReader reader         = new StreamReader(dataStream, System.Text.Encoding.GetEncoding("iso-8859-1"));
            string       prepayResponse = reader.ReadToEnd();

            return(prepayResponse);
        }