DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

App developers: is background/foreground cross-talk actually possible?

Prismatic

Well-Known Member
Joined
Feb 26, 2018
Messages
587
Reactions
644
Age
70
Location
Northern Colorado
It seems all the various control apps--Go4, Litchi, Dronelink, FT Aviator, you name it--advise the user to force-kill all other apps that use the DJI SDK before starting theirs.

But then I also read of pilots who don't do that and never, in dozens-to-hundreds of flights, have encountered a problem. And my understanding of things suggests that's to be expected: an app in "background" is in suspended state. It should not (can not?) have access to the USB port, or in any other way interfere with the functioning of the foreground app.

My career was in software (I'm retired), but never on iOS or Android, so those ecosystems are a bit of a black box to me. Still, it seems inconceivable that either would permit destructive cross-talk between a foreground app and any background app.

I'd be most interested if an experienced app developer, for iOS and/or Android, could shed light on the question!
 
It seems all the various control apps--Go4, Litchi, Dronelink, FT Aviator, you name it--advise the user to force-kill all other apps that use the DJI SDK before starting theirs.

But then I also read of pilots who don't do that and never, in dozens-to-hundreds of flights, have encountered a problem. And my understanding of things suggests that's to be expected: an app in "background" is in suspended state. It should not (can not?) have access to the USB port, or in any other way interfere with the functioning of the foreground app.

My career was in software (I'm retired), but never on iOS or Android, so those ecosystems are a bit of a black box to me. Still, it seems inconceivable that either would permit destructive cross-talk between a foreground app and any background app.

I'd be most interested if an experienced app developer, for iOS and/or Android, could shed light on the question!
You are probably correct in theory but I have seen bugs where apps accessing the same system process can screw each other up.

There was once an app where you would log in using Facebook credentials. Well it turned out if you were logged into the Facebook app running in the background you could not log into this particular app using Facebook credentials. I never got into the details but I alerted the dev who said there were all kinds of people having trouble logging in via Facebook credentials and he was flabbergasted upon hearing my solution, which was to force close the Facebook app. It worked.

DJI Go 4 and Litchi use many of the same system resources like GPS, compass etc and other sub-processes. While there may not be direct cross-talk there’s the chance that some similar situation could occur where an app in the background wants to use a resource already in use by a background process and be unable to do so due to some unforeseen bug. Not only that but both Litchi and DJI Go 4 use up lots of processing power and memory. Especially in older devices it’s probably good practice to close other resources hogs while using them.

Now the system should prioritize system resources to the foreground app but bugs happen.
 
  • Like
Reactions: RodPad
The issue that has came up that I know about was between Litchi and DJi-Go and only on Androids.

Yes it does seem odd, and like you say not have exclusive control over the USB port.

But these mobile devices and apps share so much. An example just the sound, playing audio from a music app in your vehicle and getting driving directions. The phone rings, the audio pauses and your using the audio system in your vehicle for the conservation.

I was going to talk about location sharing next. Compass / GPS
@brett8883 post is right on the direction I was headed.

I got one to add for a twist, some of these Phantoms don't use USB to connect to your mobile.
They use WiFi. ;)

@Prismatic,
Do you know much about Visual Foxpro, making 16 bit programs work on 64 bit machines. ;)

Rod