public static string GetDeviceId(Android.Content.Context context) { if (deviceID == String.Empty) { Android.Telephony.TelephonyManager telephonyMgr = context.GetSystemService(Android.Content.Context.TelephonyService) as Android.Telephony.TelephonyManager; deviceID = telephonyMgr.DeviceId == null ? "UNAVAILABLE" : telephonyMgr.DeviceId; //deviceID = telephonyMgr.Line1Number == null ? "UNAVAILABLE" : telephonyMgr.Line1Number; } return deviceID; }
public override ObjectAnimator GetAppearingAnimator (Android.Content.Context context) { Point outPoint = new Point (); IWindowManager wm = context.GetSystemService (Context.WindowService).JavaCast<IWindowManager>(); wm.DefaultDisplay.GetSize (outPoint); ObjectAnimator animator = ObjectAnimator.OfPropertyValuesHolder ( PropertyValuesHolder.OfFloat ("alpha", 0f, 1f), PropertyValuesHolder.OfFloat ("translationY", outPoint.Y / 2f, 0f), PropertyValuesHolder.OfFloat ("rotation", -45f, 0f)); animator.SetDuration ((long)(200 * mSpeedFactor)); return animator; }
public static void SetTeleManager(Android.Content.Context a) { TeleManager = (Android.Telephony.TelephonyManager)a.GetSystemService(Context.TelephonyService); }