Ejemplo n.º 1
0
        static bool n_StartListening_Landroid_location_LocationListener_JF(IntPtr jnienv, IntPtr native__this, IntPtr native_pListener, long pUpdateTime, float pUpdateDistance)
        {
            global::Osmdroid.LocationListenerProxy      __this    = global::Java.Lang.Object.GetObject <global::Osmdroid.LocationListenerProxy> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::Android.Locations.ILocationListener pListener = (global::Android.Locations.ILocationListener)global::Java.Lang.Object.GetObject <global::Android.Locations.ILocationListener> (native_pListener, JniHandleOwnership.DoNotTransfer);
            bool __ret = __this.StartListening(pListener, pUpdateTime, pUpdateDistance);

            return(__ret);
        }
Ejemplo n.º 2
0
        public virtual bool StartListening(global::Android.Locations.ILocationListener pListener, long pUpdateTime, float pUpdateDistance)
        {
            if (id_startListening_Landroid_location_LocationListener_JF == IntPtr.Zero)
            {
                id_startListening_Landroid_location_LocationListener_JF = JNIEnv.GetMethodID(class_ref, "startListening", "(Landroid/location/LocationListener;JF)Z");
            }

            bool __ret;

            if (GetType() == ThresholdType)
            {
                __ret = JNIEnv.CallBooleanMethod(Handle, id_startListening_Landroid_location_LocationListener_JF, new JValue(pListener), new JValue(pUpdateTime), new JValue(pUpdateDistance));
            }
            else
            {
                __ret = JNIEnv.CallNonvirtualBooleanMethod(Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "startListening", "(Landroid/location/LocationListener;JF)Z"), new JValue(pListener), new JValue(pUpdateTime), new JValue(pUpdateDistance));
            }
            return(__ret);
        }