Skip to content

Instantly share code, notes, and snippets.

View prashantvc's full-sized avatar
:octocat:
Working

Prashant Cholachagudda prashantvc

:octocat:
Working
View GitHub Profile
using System.Collections.Generic;
using Android.App;
using Android.Views;
using Android.Widget;
using R = ClickEvents.Resource;
using Android.Text;
using System;
namespace ClickEvents
{
2014-01-14 12:16:04.235 MoPubSDKBindingTest[4248:60b] Delegate loaded
2014-01-14 12:16:04.296 MoPubSDKBindingTest[4248:60b] MOPUB: Interstitial controller is loading ad with MoPub server URL: http://ads.mopub.com/m/ad?v=8&udid=ifa:E6B06DE7-058B-4F9B-B91B-59FEFC9B0D09&id=a1c58c5ac9084eeca746af006c9b4d2c&nv=1.17.0.0&o=p&sc=2.0&z=+0530&mr=1&ct=2&av=1.0&cn=AirTel&iso=in&mnc=45&mcc=404&dn=iPhone6%2C2
2014-01-14 12:16:04.928 MoPubSDKBindingTest[4248:60b] MOPUB: Could not find custom event class named MPGoogleAdMobInterstitialCustomEvent
2014-01-14 12:16:04.930 MoPubSDKBindingTest[4248:60b] MOPUB: Interstatial ad view is fetching ad network type: admob_full
2014-01-14 12:16:04.931 MoPubSDKBindingTest[4248:60b] MOPUB: Interstitial controller is loading ad with MoPub server URL: http://ads.mopub.com/m/ad?v=8&udid=ifa:E6B06DE7-058B-4F9B-B91B-59FEFC9B0D09&id=a1c58c5ac9084eeca746af006c9b4d2c&nv=1.17.0.0&o=p&sc=2.0&z=+0530&mr=1&ct=2&av=1.0&cn=AirTel&iso=in&mnc=45&mcc=404&dn=iPhone6%2C2&request_id=89dc53de7ce711e3b00000259
using System;
using Android.App;
using Android.Widget;
using Android.OS;
using Java.Lang;
namespace UnhandledCrash
{
[Activity (Label = "UnhandledCrash", MainLauncher = true)]
public class MainActivity : Activity
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace LinguisticTagger
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
void PrintNetworkInfo(){
using (var wifi = (WifiManager)GetSystemService (Context.WifiService)) {
using (var dhcp = wifi.DhcpInfo) {
var gateway = dhcp.Gateway;
var ip = dhcp.IpAddress;
Console.WriteLine (Formatter.FormatIpAddress (gateway));
Console.WriteLine (Formatter.FormatIpAddress (ip));
}
}
using Android.App;
using Android.Content;
using Android.Widget;
using Android.OS;
using Android.Text;
using Android.Graphics.Drawables;
namespace TextviweWithImage
{
[Activity (Label = "TextviweWithImage", MainLauncher = true)]
Task<int> ShowModalAletViewAsync (string title, string message, params string[] buttons)
{
var alertView = new UIAlertView (title, message, null, null, buttons);
alertView.Show ();
var tsc = new TaskCompletionSource<int> ();
alertView.Clicked += (sender, buttonArgs) => {
Console.WriteLine ("User clicked on {0}", buttonArgs.ButtonIndex);
tsc.TrySetResult(buttonArgs.ButtonIndex);
};
int ShowModalAletView (string title, string message, params string[] buttons)
{
int clicked = -1;
var alertView = new UIAlertView (title, message, null, null, buttons);
alertView.Show ();
bool done = false;
alertView.Clicked += (sender, buttonArgs) => {
Console.WriteLine ("User clicked on {0}", buttonArgs.ButtonIndex);
clicked = buttonArgs.ButtonIndex;
};
using System;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using System.Threading.Tasks;
namespace BasicTable {
public class TableSource : UITableViewSource {
protected string[] tableItems;
protected string cellIdentifier = "TableCell";
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using MonoTouch.Dialog;
namespace LinqMtd
{
// The UIApplicationDelegate for the application. This class is responsible for launching the