Example #1
0
        static IntPtr n_RequestSingleLocation_Lcom_urbanairship_location_LocationCallback_Lcom_urbanairship_location_LocationRequestOptions_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1)
        {
            global::UrbanAirship.Location.UALocationManager      __this = global::Java.Lang.Object.GetObject <global::UrbanAirship.Location.UALocationManager> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::UrbanAirship.Location.ILocationCallback      p0     = (global::UrbanAirship.Location.ILocationCallback)global::Java.Lang.Object.GetObject <global::UrbanAirship.Location.ILocationCallback> (native_p0, JniHandleOwnership.DoNotTransfer);
            global::UrbanAirship.Location.LocationRequestOptions p1     = global::Java.Lang.Object.GetObject <global::UrbanAirship.Location.LocationRequestOptions> (native_p1, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.RequestSingleLocation(p0, p1));

            return(__ret);
        }
Example #2
0
        public virtual unsafe global::UrbanAirship.ICancelable RequestSingleLocation(global::UrbanAirship.Location.ILocationCallback p0, global::UrbanAirship.Location.LocationRequestOptions p1)
        {
            if (id_requestSingleLocation_Lcom_urbanairship_location_LocationCallback_Lcom_urbanairship_location_LocationRequestOptions_ == IntPtr.Zero)
            {
                id_requestSingleLocation_Lcom_urbanairship_location_LocationCallback_Lcom_urbanairship_location_LocationRequestOptions_ = JNIEnv.GetMethodID(class_ref, "requestSingleLocation", "(Lcom/urbanairship/location/LocationCallback;Lcom/urbanairship/location/LocationRequestOptions;)Lcom/urbanairship/Cancelable;");
            }
            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(p1);

                global::UrbanAirship.ICancelable __ret;
                if (GetType() == ThresholdType)
                {
                    __ret = global::Java.Lang.Object.GetObject <global::UrbanAirship.ICancelable> (JNIEnv.CallObjectMethod(Handle, id_requestSingleLocation_Lcom_urbanairship_location_LocationCallback_Lcom_urbanairship_location_LocationRequestOptions_, __args), JniHandleOwnership.TransferLocalRef);
                }
                else
                {
                    __ret = global::Java.Lang.Object.GetObject <global::UrbanAirship.ICancelable> (JNIEnv.CallNonvirtualObjectMethod(Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "requestSingleLocation", "(Lcom/urbanairship/location/LocationCallback;Lcom/urbanairship/location/LocationRequestOptions;)Lcom/urbanairship/Cancelable;"), __args), JniHandleOwnership.TransferLocalRef);
                }
                return(__ret);
            } finally {
            }
        }