android-geofence

Why is Network access in my geofence broadcast receiver unreliable?

不羁岁月 提交于 2019-12-11 13:44:37
问题 Use case: When geofence triggers we need to contact server ASAP. We have solved this with an implicit BroadcastReceiver calling a Service for several years, but problematic in new versions due to Doze and Oreo background restrictions. Attempted fixes: We moved geofence registering from implicit -> explicit broadcast receiver to get around the "background mode" restriction. We tried to do it as in Googles examples, i.e. the broadcast receiver calling enqueueWork() on a JobIntentService . The

Is there a limit to the radius of a geofence in Android?

戏子无情 提交于 2019-12-11 02:30:06
问题 I develop an application that uses the Android Geofence API. Now I have the problem that, when the radius of the geofence is as large as 10 kilometers, it does not work, but when it is as small as 10 meters, then it works. In the documentation, Google does not say much about the radius: Android Sample Geofence API Geofence Builder API Thank you very much! 回答1: The radius determines how large or small the circle is that is drawn around the geopoint. There is not a maximum limit for the size of

android : not able to add geofence from service

99封情书 提交于 2019-12-11 00:47:55
问题 I am not able to add geofence from service class. Below is my code: GeoFenceService: package com.example.admin.reminderapp.services; import android.app.PendingIntent; import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.Binder; import android.os.Bundle; import android.os.IBinder; import android.support.annotation.NonNull; import android.util.Log; import android.widget.Toast; import com.example.admin.reminderapp.R; import com.example

Android: What is the minimum and maximum radius for geofence

不问归期 提交于 2019-12-10 18:47:43
问题 I am working on an Android app which makes use of geofence. I want user to decide the radius of geofence. But I want to know what is the minimum and maximum radius for the geofence so that app will work fine. 回答1: Maximum- the radius of the earth. GPS is confirmed not to work on the moon. Minimum- depends on the accuracy of your gps hardware, atmospheric conditions, etc. If everything is great, probably 10 meters reliably. If you fall back to network location, probably about 500 meters. 回答2:

Geofence Notification not triggered when app in background

只愿长相守 提交于 2019-12-10 15:27:11
问题 I have already gone through many SO posts , but nothing has worked yet for me. I am trying to trigger notification when device enters a geofence . But it does not trigger until app is opened. How would it be possible to trigger notification when app is in backgroud ? Geofencing: public class Geofencing implements ResultCallback { // Constants public static final String TAG = Geofencing.class.getSimpleName(); private static final float GEOFENCE_RADIUS = 50; // 50 meters private static final

Do Android Geofences remain active until removed/expired or only until my PendingIntent is launched

岁酱吖の 提交于 2019-12-10 03:45:55
问题 I'm about to implement a feature with geofences and before I get any serious work done, I need to know whether geofences remain active after the first transition. The core of the feature is: every time I'm within x meters of point P (call this Area A ), I want Action B to occur. What I need to know is Do I just have to add a geofence with Geofence.NEVER_EXPIRE and rest assured that I will get a PendingIntent every time I enter the specified area regardless of elapsed time, reboots, etc OR Do

Android Geofence not triggers once location OFF and ON again [duplicate]

会有一股神秘感。 提交于 2019-12-09 07:11:32
问题 This question already has answers here : How to check if Location Services are enabled? (18 answers) Closed 4 years ago . I am using Android Geofencing API.After add geofence it works fine when location is ON.But If I OFF location and ON again,afterwards Geofencing not triggers when enter or exit.I have tested on my Moto G with Android 5.0.2 device. Is it Geofence will expire If location is off? I have seen on Android document as, In case network location provider is disabled by the user, the

Geofence triggering issues in Android

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-09 03:06:27
I'm using android device's native Geofence service. Here are implementation details: Tracked transition type: ENTER Range: 500 meters (1640 feet) Notification responsive time: 500ms Added Geofence count: 15-20 Initial trigger (setInitialTrigger()): Not set Location accuracy on device: High Location permissions: FINE LOCATION and COARSE LOCATION Location service on device: ON Location permission to app: Yes Android Oreo support: Yes (Used Broadcast receiver and JobIntentService) Issues: On some device, same notification is triggering again and again when user is moving withing same geofence. On

Geofence triggering issues in Android

て烟熏妆下的殇ゞ 提交于 2019-12-08 03:27:51
问题 I'm using android device's native Geofence service. Here are implementation details: Tracked transition type: ENTER Range: 500 meters (1640 feet) Notification responsive time: 500ms Added Geofence count: 15-20 Initial trigger (setInitialTrigger()): Not set Location accuracy on device: High Location permissions: FINE LOCATION and COARSE LOCATION Location service on device: ON Location permission to app: Yes Android Oreo support: Yes (Used Broadcast receiver and JobIntentService) Issues: On

Geofence - problem in triggering 'GEOFENCE_NOT_AVAILABLE'

混江龙づ霸主 提交于 2019-12-08 02:25:49
问题 I do app with geofencing use and since I started to work with it I get to broadcastReceiver the transitions and when I turned off the GPS location I got an alert with code GEOFENCE_NOT_AVAILABLE and I started a service to reregister the geofences when I will turn on the GPS. Now I took a few days break and suddenly my broadcastReceiver doesn't get alerts when I turn off the GPS. I don't understand why? *when I enter/exit from location (like I defined in the geofences init) I trigger the