Databinding a ListView with Mono for Android: Listing 1

Making a Twitter request.

string twitterSearch = Intent.GetStringExtra("TwitterSearch");
string Url = "http://search.twitter.com/search.json?rpp=30&include_entities=true&result_type=mixed&q=" + twitterSearch;
try
{
    // Create the web request
    HttpWebRequest request = WebRequest.Create(Url) as HttpWebRequest;

    request.Method = "GET";
    request.ContentType = "application/json";
    request.BeginGetResponse(new AsyncCallback(ProcessRestJsonLINQHttpResponse), request);
}
catch (WebException we)
{
    Android.Util.Log.Error("http request", "Exception: " + we.Message);
}
catch (System.Exception sysExc)
{
    Android.Util.Log.Error("http request", "Exception: " + sysExc.Message);
}

About the Author

Wallace (Wally) B. McClure has authored books on iPhone programming with Mono/Monotouch, Android programming with Mono for Android, application architecture, ADO.NET, SQL Server and AJAX. He's a Microsoft MVP, an ASPInsider and a partner at Scalable Development Inc. He maintains a blog, and can be followed on Twitter.

comments powered by Disqus

Featured

  • Black White Wave IMage

    Neural Regression Using PyTorch: Training

    The goal of a regression problem is to predict a single numeric value, for example, predicting the annual revenue of a new restaurant based on variables such as menu prices, number of tables, location and so on.

  • Microsoft Ships Visual Studio 2019 v16.9 Servicing Baseline Release

    Microsoft is urging enterprises and professional coders to standardize on the new Visual Studio 2019 v16.9, a servicing baseline release that's guaranteed to receive official support for an extended period.

  • Microsoft Extends Low-Code Push with Power Fx Programming Language

    "Using formulas that are already familiar to hundreds of millions of users, Power Fx allows a broad range of people to bring skills they already know to low code solutions."

  • Microsoft's Tools to Fight Solorigate Attack Are Now Open Source

    Microsoft open sourced homegrown tools it used to check its systems for code related to the recent massive breach of supply chains that the company has named Solorigate.

Upcoming Events