Important: These forums are for discussions between SkyDemon users. They are not routinely monitored by SkyDemon staff so any urgent issues should be sent directly to our Customer Support.

FLARM IP Connection not closed when closing SD App


Author
Message
BerndHS
BerndHS
Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)
Group: Forum Members
Posts: 28, Visits: 180
Hi Tim,
I am currently developing a Wifi connector that allows multiple SD devices (e.g. Pilot / CoPilot, Instructor) to receive FLARM/GPS signals via Wifi from one single FLARM device at the same time. IP connections between my AP and SD are being opened and closed from SD as expected as long as SD navigation mode is finished explicitly via 'Stop Navigation' option. But if you just leave/close the application via Android 'back' button and confirm to leave in the pop up window, the IP connection stays open. If you now re-open SD and want to connect to FLARM again you cannot join this session because it is still bound to some kind of 'zombie' process (the closed SD). If you want to switch to flying mode with FLARM again a new IP connection has to be initiated while the old one (unnecessarily) still exists. I can kill this old connection from my code but with some side effects resulting in error messages in SD etc. And there are also WiFly devices out in the world that just do not allow to have more than one connection open at a time. This makes reconnect to FLARM complicated and confusing.
My request: Please simply close the IP connection when confirming to close the App the same way as if explicitly stopping navigation mode. That should solve the problem.
My SD version: 3.6.1.
Thanks
-B


Edited 6/19/2016 5:59:49 PM by BerndHS
Tim Dawson
Tim Dawson
SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)
Group: Forum Members
Posts: 7.8K, Visits: 8.4K
If the IP connection is not closed when SkyDemon is closed, that is a (quite serious) Android bug. If you forcibly terminate the app, is the result the same?
BerndHS
BerndHS
Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)
Group: Forum Members
Posts: 28, Visits: 180
If I force the App to stop, the connection is being terminated correctly.
I tried these two methods:

1. SD running normally and connected to my AP.
Then go to Settings|Apps and find SD in the 'Downloaded' list (strangely I couldn't locate it in the 'Running' list) . Pressing 'Force Stop' closes the App and cleanly disconnects from the AP (closes the IP connection).

2. SD running normally and connected to my AP.
Then close SD by Android back button and confirming to exit. IP connection still open now. If I then go to the list of current Apps I can see SD with the last dialog open ('are you sure to exit?'). If I close this App window by wiping it away from the list or hitting the X in the heading bar, SD is being closed and the IP connection ist cleanly disconnected too.

This behaves the same way on different devices and different versions of Android. Details can be provided if needed.

-B

Edited 6/20/2016 4:36:55 PM by BerndHS
Tim Dawson
Tim Dawson
SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)
Group: Forum Members
Posts: 7.8K, Visits: 8.4K
I don't think SkyDemon is actually being closed on your device when you "exit" the app by pressing the Back button. This would explain why the IP connection remains. I am not sure what to do about that.
BerndHS
BerndHS
Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)
Group: Forum Members
Posts: 28, Visits: 180
Hi Tim,
I agree - the App is not really closed - and that's the reason for the problem. But this seems not to be device specific. It probably happens on all devices. I have used it on a Samsung Tablet 10.1,  an S3, a Huawei G-700 and a Nexus 7. They all behave the same way and I assume that this is how Android handles theses 'exited' Apps in general.
But anyway. If someone closes SD he obviously does not want to use the App any more for now - and even does not want to navigate as well.  So why not close the IP connection? It will be useless anyway.
If you tap on this 'closed' App lateron, it even does not look as if it is re-used in some way. It comes up with a new welcome screen and behaves exactly the same way as if you tap on the blue ball icon on the 'desktop' to open a fresh instance from there.
With this said, I think it makes absolute sense to close the IP connection thru SD code when closing/exiting the App using the back button. From my point of view this could probably be done the same way which is used when explicitly ending navigation mode via the 'Stop Navigating' option. Then we would have a clean IP condition when the user decides to use SD again. Whether from the 'Desktop' or from the list of (not really...) 'closed' Apps.
What do you think?
-B

Tim Dawson
Tim Dawson
SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)SkyDemon Team (616K reputation)
Group: Forum Members
Posts: 7.8K, Visits: 8.4K
I agree. I've made the change ready for the 3.6.1 version.
BerndHS
BerndHS
Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)
Group: Forum Members
Posts: 28, Visits: 180
Hi Tim,
thank you!
That's what I call 'to be close to the customer...'
perfect!
;-)

-B

Edited 6/23/2016 6:30:36 PM by BerndHS
BerndHS
BerndHS
Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)Too Much Forum (3.7K reputation)
Group: Forum Members
Posts: 28, Visits: 180
Tim, I just checked the functionality with the new release version (3.6.1.19137) and it now works as expected - very well.
Thank You again!
-B


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Login

Explore
Messages
Mentions
Search