It has been a while since I've worked with Geofence on Android. The Android docs for the GEOFENCE_NOT_AVAILABLE status code says:
public static final int *GEOFENCE_NOT_AVAILABLE* > > Geofence service is not available now. Typically this is because the user > turned off location access in settings > location access. > Constant Value: 1000 > So check to make sure that you haven't turned off location access. Also check that the app includes the ACCESS_FINE_LOCATION permission: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> (Open the app's manifest and make sure that permission is there, if it isn't there, then you should add it using the android.xpermissions build hint. Let me know if it's not there, as I may need to modify the build server to automatically add it when geofence is used. Best regards Steve On Wed, Apr 5, 2017 at 7:07 PM, <[email protected]> wrote: > Steve: i tryed with android 4.4 and i get the message that geofence its > not avalaible. > > my question was about android version. > > > > thanks > > On Wednesday, April 5, 2017 at 2:42:23 PM UTC-3, Steve Hannah wrote: >> >> It was added in October 2015, so it would have been included with >> Codename One 3.3 and later. >> >> Geofence, like most background functionality, can be tricky to debug. >> You'll want to use DDMS to debug and see where your app is going wrong. >> >> Steve >> >> On Wed, Apr 5, 2017 at 10:20 AM, <[email protected]> wrote: >> >>> steve: i tryed but i cant make it work. >>> >>> do you know since what version of android works the geofence? >>> >>> >>> On Tuesday, April 4, 2017 at 1:11:49 PM UTC-3, roman canoniero wrote: >>>> >>>> Ill check your answear. Thanks >>>> El El mar, 4 de abr. de 2017 a las 13:10, Steve Hannah < >>>> [email protected]> escribió: >>>> >>>>> Geofence isn't implemented in the simulator. Only on iOS and Android. >>>>> >>>>> Steve >>>>> >>>>> On Tue, Apr 4, 2017 at 9:07 AM, roman canoniero <[email protected]> >>>>> wrote: >>>>> >>>>>> Steve: geofence still not working on simulator?? Thanks! >>>>>> >>>>>> >>>>>> El El mar, 4 de abr. de 2017 a las 12:53, Steve Hannah < >>>>>> [email protected]> escribió: >>>>>> >>>>>>> I think you have your "isMinimized()" case reversed. >>>>>>> >>>>>>> if (Display.getInstance().isMinimized()) { >>>>>>> Display.getInstance().callSerially(() -> { >>>>>>> Dialog.show("Welcome", "Thanks for arriving", "OK", >>>>>>> null); >>>>>>> }); >>>>>>> } else { >>>>>>> LocalNotification ln = new LocalNotification(); >>>>>>> ln.setId("LnMessage"); >>>>>>> ln.setAlertTitle("Welcome"); >>>>>>> ln.setAlertBody("Thanks for arriving!"); >>>>>>> try { >>>>>>> Display.getInstance().scheduleLocalNotification(ln, >>>>>>> 10, LocalNotification.REPEAT_NONE); >>>>>>> } catch (Exception ex) { >>>>>>> Alert.show(ex.getMessage()); >>>>>>> } >>>>>>> >>>>>>> } >>>>>>> >>>>>>> You're trying to show a dialog when the app is minimized, and you're >>>>>>> trying to send a local notification when it is not minimized. >>>>>>> >>>>>>> Steve >>>>>>> >>>>>>> On Mon, Apr 3, 2017 at 6:26 PM, <[email protected]> wrote: >>>>>>> >>>>>>>> Hi! im tryng to implement the geofence in my code but it didnt >>>>>>>> work. is a problem in the class or i'm no doing something? im testing >>>>>>>> on >>>>>>>> android. >>>>>>>> >>>>>>>> >>>>>>>> my code is attached >>>>>>>> >>>>>>>> thanks! Roman >>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "CodenameOne Discussions" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to codenameone-discussions+unsubs >>>>>>>> [email protected]. >>>>>>>> Visit this group at https://groups.google.com/grou >>>>>>>> p/codenameone-discussions. >>>>>>>> To view this discussion on the web visit >>>>>>>> https://groups.google.com/d/msgid/codenameone-discussions/64 >>>>>>>> 73483c-1e37-4397-a4a6-73c411081f2c%40googlegroups.com >>>>>>>> <https://groups.google.com/d/msgid/codenameone-discussions/6473483c-1e37-4397-a4a6-73c411081f2c%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>>> . >>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Steve Hannah >>>>>>> Software Developer >>>>>>> Codename One >>>>>>> http://www.codenameone.com >>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to a topic in >>>>>>> the Google Groups "CodenameOne Discussions" group. >>>>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>>>>>> pic/codenameone-discussions/xG9tFYglvgg/unsubscribe. >>>>>>> To unsubscribe from this group and all its topics, send an email to >>>>>>> [email protected]. >>>>>>> Visit this group at https://groups.google.com/grou >>>>>>> p/codenameone-discussions. >>>>>>> To view this discussion on the web visit >>>>>>> https://groups.google.com/d/msgid/codenameone-discussions/CA >>>>>>> GOYrKWF_8jr2sjO5onXnWtuvm%3DJXr4ofUBTAvdpeO7J7pxAXA%40mail.gmail.com >>>>>>> <https://groups.google.com/d/msgid/codenameone-discussions/CAGOYrKWF_8jr2sjO5onXnWtuvm%3DJXr4ofUBTAvdpeO7J7pxAXA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>>> . >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "CodenameOne Discussions" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected] >>>>>> . >>>>>> Visit this group at https://groups.google.com/grou >>>>>> p/codenameone-discussions. >>>>>> >>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/codenameone-discussions/CA >>>>>> O%3DXYf1JBP_HKp%3D9kBk2eh3dYr-SQe7EO93_pFvSHZ4cRVEJ%2BA% >>>>>> 40mail.gmail.com >>>>>> <https://groups.google.com/d/msgid/codenameone-discussions/CAO%3DXYf1JBP_HKp%3D9kBk2eh3dYr-SQe7EO93_pFvSHZ4cRVEJ%2BA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>> >>>>> >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Steve Hannah >>>>> Software Developer >>>>> Codename One >>>>> http://www.codenameone.com >>>>> >>>>> -- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "CodenameOne Discussions" group. >>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>>>> pic/codenameone-discussions/xG9tFYglvgg/unsubscribe. >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> [email protected]. >>>>> Visit this group at https://groups.google.com/grou >>>>> p/codenameone-discussions. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/codenameone-discussions/CA >>>>> GOYrKUB3z4-AjqvgT3mHPjKMTDrz%2BO1VuKNXZorz7KHoaRx6g%40mail.gmail.com >>>>> <https://groups.google.com/d/msgid/codenameone-discussions/CAGOYrKUB3z4-AjqvgT3mHPjKMTDrz%2BO1VuKNXZorz7KHoaRx6g%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "CodenameOne Discussions" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> Visit this group at https://groups.google.com/grou >>> p/codenameone-discussions. >>> To view this discussion on the web visit https://groups.google.com/d/ms >>> gid/codenameone-discussions/484a2b10-afe0-47d7-9bd4-0519ebf9 >>> 28aa%40googlegroups.com >>> <https://groups.google.com/d/msgid/codenameone-discussions/484a2b10-afe0-47d7-9bd4-0519ebf928aa%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Steve Hannah >> Software Developer >> Codename One >> http://www.codenameone.com >> > -- > You received this message because you are subscribed to the Google Groups > "CodenameOne Discussions" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > Visit this group at https://groups.google.com/ > group/codenameone-discussions. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/codenameone-discussions/a8aaea52-4c5c-4565-b01c- > 25c4ce043b60%40googlegroups.com > <https://groups.google.com/d/msgid/codenameone-discussions/a8aaea52-4c5c-4565-b01c-25c4ce043b60%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Steve Hannah Software Developer Codename One http://www.codenameone.com -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/CAGOYrKW%2B0fGjtaOfzv2i0koy%2BZ-zw%3Dyd4tDfAOcfXwHY6nTnPw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
