Skip to content

Instantly share code, notes, and snippets.

@dannycabrera
dannycabrera / AppDelegate.cs
Created Dec 30, 2015
Xamarin.iOS Blur screen with OnResignActivation
View AppDelegate.cs
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
UIVisualEffectView _blurView = null;
public override void OnActivated (UIApplication application)
{
try {
if (_blurView != null) {
_blurView.RemoveFromSuperview ();
@dannycabrera
dannycabrera / SafariBiometricTesting.html
Last active Oct 21, 2020
Safari Biometric (Touch/Face ID) Testing
View SafariBiometricTesting.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0; maximum-scale=1.0; user-scalable=no; width=device-width">
<script type="text/javascript">
function testBiometrics() {
// Detects if device is on iOS
@dannycabrera
dannycabrera / GetDroidModel_Changes_9-29-2020.csv
Created Sep 29, 2020
GetDroidModel device changes 9-29-2020
View GetDroidModel_Changes_9-29-2020.csv
Retail Branding Marketing Name Device Model
A1 A1 Alpha 20+ P671F60 A1 Alpha 20+
AG Mobile AGM A10 SHARKL5 AGM A10
AG Mobile AGM A10 SHARKL5 Android
ALMATEEN LXL43G7H-AT samseong AI PONT
ANAM ANAM seocho ANAM 4K Android TV
ANDRINO Andrino bangbae andrino 4K Android TV
AT&T U318AA U318AA U318AA
AT&T U705AA U705AA U705AA
AZOM TECH Desert2 Desert2 Desert2
@dannycabrera
dannycabrera / GetDroidModel_Changes_8-24-2018.csv
Created Aug 24, 2018
GetDroidModel device changes 8-24-2018
View GetDroidModel_Changes_8-24-2018.csv
Retail Branding Marketing Name Device Model
3Go GT10K3IPS GT10K3IPS GT10K3IPS
A1 A1 Smart N9 VFD720 VFD 720
AOC A741 A741 A741
AOC A941 A941 A941
ASTCA AA 787 S SURGE_AA_787_S AA 787 S
AT&T QS5509A QS5509QL QS5509A
AURII AURII_AMUSE_4G AURII_AMUSE_4G AURII_AMUSE_4G
AVH San Luis S.A. ExcerG5.6 ExcerG5_6 ExcerG5.6
Accent CAMELEON C5 CAMELEON_C5 CAMELEON C5
@dannycabrera
dannycabrera / AppDelegate.cs
Created Nov 2, 2016
Get notified when user takes screenshot on Xamarin.iOS
View AppDelegate.cs
using Foundation;
using UIKit;
namespace YourApp
{
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
NSObject _screenshotNotification = null;
View Xamarin.iOS GetSSID
public static string GetSSID(bool withMacAddress = true)
{
try {
NSDictionary dict;
var status = CaptiveNetwork.TryCopyCurrentNetworkInfo ("en0", out dict);
if (status == StatusCode.NoKey)
return "";
var bssid = dict [CaptiveNetwork.NetworkInfoKeyBSSID];
View GetDroidModel_Changes_04012020.csv
Retail Branding Marketing Name Device Model
1&1 DIW387-1&1 diw387_1u1 DIW387 1U1
A1 ADT-3 adt3 ADT-3
AT&T U202AA U202AA U202AA
ATM (Brazil) R5 R5 R5
AZPEN A1052 A1052 A1052
Accent FAST10 FAST10 FAST10
Acer Acer One 10 T4-129LI AcerO10T412LI Acer One 10 T4-129LI
Acer Acer One 10 T8-129L Acer_One_10_T8-129L Acer_One_10_T8-129L
Advan digital NASA ADVAN_NASA 5202
@dannycabrera
dannycabrera / GetDroidModel_Changes_01262020.csv
Last active Jan 26, 2020
GetDroidModel_Changes_01262020.csv
View GetDroidModel_Changes_01262020.csv
Retail Branding Marketing Name Device Model
1&1 1&1 Puck diw362_1u1 DIW362P 1U1
1&1 1&1 TV Box diw387_1u1 DIW387 1U1
10.or 10or_G2 G2 10or G2
10.or G2 G2 G2
3222222 Satelital G706 G706 G706
3Go GT70053G GT70053G GT70053G
3Go GT7007EQC GT7007EQC GT7007EQC
7mobile Kamba 2 7mobile_Kamba_2 Kamba_2
7mobile Swegue 2 Swegue_2 Swegue 2
@dannycabrera
dannycabrera / Log.cs
Created Mar 24, 2017
NSLog workaround for Xamarin Console.WriteLine bug
View Log.cs
const string FoundationLibrary = "/System/Library/Frameworks/Foundation.framework/Foundation";
[System.Runtime.InteropServices.DllImport(FoundationLibrary)]
extern static void NSLog(IntPtr format, IntPtr s);
[System.Runtime.InteropServices.DllImport(FoundationLibrary, EntryPoint = "NSLog")]
extern static void NSLog_ARM64(IntPtr format, IntPtr p2, IntPtr p3, IntPtr p4, IntPtr p5, IntPtr p6, IntPtr p7, IntPtr p8, IntPtr s);
static readonly bool Is64Bit = IntPtr.Size == 8;
static readonly bool IsDevice = ObjCRuntime.Runtime.Arch == ObjCRuntime.Arch.DEVICE;
@dannycabrera
dannycabrera / Program.cs
Created Aug 21, 2019
FaxApp Program.cs
View Program.cs
using Microsoft.Owin.Hosting;
using System;
using Twilio;
using Twilio.Rest.Fax.V1;
namespace FaxApp
{
class Program
{
static IDisposable _app = null;