I see on the main Parrot USA website that GroundSDK can be integrated with ATAK. (Home > Newsroom > 4 reasons to Combine TAK suite & ANAFI USA)
I’m building off an existing Java-based plugin for ATAK and integrating GroundSDK 7.7.0 due to some project limitations. I have managed to get the SDK working correctly in a standalone test app, but I am facing a fundamental initialization problem within the ATAK plugin architecture.
My core issue is initializing the GroundSDK session from within an ATAK Fragment
.
- The
ManagedGroundSdk.obtainSession()
helper isn’t an option, as it requires anActivity
context which I don’t have in this part of the plugin. - Using the direct
GroundSdk.newSession(context)
call leads to a Catch-22 depending on which context I provide:- Passing the ATAK
pluginContext
fails internally with aClassCastException
because the SDK can’t get a standardApplication
object from it. - Passing a standard Android
requireContext()
fails with aResources$NotFoundException
because the SDK can’t find its own internal configuration files.
- Passing the ATAK
- I have tried workarounds. However they all fail. An attempt to use a separate
Activity
works for initialization on a small level, but is not a viable solution as it covers the ATAK UI and its lifecycle is temporary.
What is the recommended approach or best practice for initializing the GroundSDK session from within an ATAK plugin Fragment
, given these context limitations? Is there a specific configuration needed for this environment? Is there a different SDK that Parrot offers specifically for ATAK?