Haiku Proximity

Its not true multitasking, only certain types of multitasking is allowed, such as navigational or playing back audio. The notifications actually happen w/o the app altogether, its just a push service that delivers the notifications to the app through the OS, not the other way around (app to the OS).
 
OK, got it. So the proximity functions is done at iOS level "on request" by the app? And how does it work? Is it like iOS calling Haiku saying "hey, that proximity condition you asked me to check is now true/false!" and then Haiku connecting to my Omni controller and setting the proximity flag accordingly? If so, how does Haiku connects? Using the last used controller? And what if I leave home having the wi fi profile on? It won't set the flag, right?

Would it be possible to fullfill at least my second request: automatically switch to "local wi fi" controller when I'm under my wi fi coverage (when I open the app, before attempting to connect)?

At the moment (I don't know why in fact) I can access via DynDNS only if I'm not under my local network coverage. So when I come back home and I've been using the controller from outside (to switch the proximity flag) I cannot use Haiku unless I wait for it to try to connect via my dyndns address, realize it fails, manually select the home controller and wait for it to be ready.

Hope it was clear.

Also: OK, you can't do it while Haiku is in the background, but what if I keep Haiku open with my "away from home" controller selected while driving home? Then it could detect my Home wi fi SSID connecting and consequently switch to my home controller and then set the flag.

I now this may be pushing it a little too far but with my system limitation the proximity function is not very easy to use.
 
Back to the main problem that originated the post: I'm experiencing the same issue: the flag won't turn on/off properly most of the time. I think this is due to the software losing 3G connection and not automatically trying to recover it.
Also I can confirm that staying constantly inside the perimeter won't switch the flag: I tried setting a HUGE perimeter (>5 km) around my house in my wi fi profile so that I could be certain that I was inside it, let Haiku running almost a whole day without the proximity flag being set.

I made all sorts of experiments: leaving Haiku running in background, in foreground with or without the screen locked but nothing seem to work. It swiches only when I cross the perimeter and in a non constant way.
 
This is how Apples implementation works, it only triggers when you cross the perimiter. Try to place the perimiter in an area with good cell reception. Unfortunately we don't have much control over how this part works, so it's a matter of tweaking the location and/or radius.
 
I'm digging further in the proximity not working issue and I came to the conclusion that the main problem may be the fact that when I cross the border my 3G connection may be off so Haiku fails in sending the command and since iOS only signals the trespassing once it gets lost.

So I may think of 2 possible workarounds:
  1. An "auto reconnect" function (at the moment if a connection fails I'm sent back to the "controllers" screen);
  2. maybe "store" in some place inside Haiku the notification from iOS and send the command later at the first reconnection (but if there's no multitasking I guess it can't be done).
The auto reconnect function could be linked to a "preferred" account or, even better, a list of controllers to try in order for x times before passing to the next. This could solve the problem I underlined in another thread: when I'm at home I must use LAN, when I get away if I forget to switch the controller to the one that uses my WAN connection (which is quite annoying per se) the proximity trigger can't be switched for lack of connection.


What I'd like would be something like:
  • Leaving home with my LAN controller running;
  • when I'm outside but still close to home the connection fails;
  • Haiku tries to reconnect with last connection for a certain number of times;
  • if it fails it tries to change to another controller (n. 1 on the "preferred" list) for X times;
  • if it fails tries the next in the preferred list X times;
  • if everything else fails - back to the controllers selection list as it is now.
I am aware that mine could be a particular case and it may not be of interest to develop such a feature, I'm just pointing out what I will like.
 
You can set the same flag settings for each "controller" you have set up and it will work like you mention (It will try them all). Haiku does retry the connection a few times but it can't keep trying for long because of multitasking limitations. I believe it also tries to set the flag if you manually connect (IIRC). Basically, we're doing a "best attempt" already. However if unlikely the 3G goes down right at that time, there may be no realistic way to make it work. I will have a look at the code to see if we can tweak it a bit to maybe have it wait a bit longer on the second try to see if it gets a connection in time.
 
How long after the first try does the 2nd take place? That would be great if it was at least 30 seconds to a minute.

Thanks,

Jason
 
You can set the same flag settings for each "controller" you have set up and it will work like you mention (It will try them all).

Please explain better: when I go out with my local IP controller, get in a 3G covered zone and switch to Haiku it always tries to reconnect, fails because there's no controller and goes to the controllers list, I never saw it try to reconnect with the 3G contoller. Do I have to wait some time?
 
Please explain better: when I go out with my local IP controller, get in a 3G covered zone and switch to Haiku it always tries to reconnect, fails because there's no controller and goes to the controllers list, I never saw it try to reconnect with the 3G contoller. Do I have to wait some time?

I meant for proximity detection.
 
When going from wifi to 3G a reconnection is required for Haiku, if that's what you mean.


And yes, proximity detection is like geofencing.
 
Back
Top