Git Product home page Git Product logo

androidtacticalassaultkit-civ's Introduction

AndroidTacticalAssaultKit-CIV

This repository contains the source code for the Android Tactical Assault Kit for Civilian Use (ATAK-CIV), the official geospatial-temporal and situational awareness tool used by the US Government. ATAK-CIV is managed by the Tactical Assault Kit Configuration Steering Board (TAK CSB) and is designed for use by federal employees.

This website's source code is made available to the open source community with the hope that community contributions will improve functionality, add features, and mature this work.

Dependencies

ATAK-CIV makes use of many open source libraries as dependencies. While each of these has a license that allows for use within ATAK-CIV, be sure to check that their license authorizes your particular use. A list of all dependencies and the license that binary/source is distributed under can be found in THIRDPARTY.md.

Contributing

For details on setting up your development environment and contributing to this project, see CONTRIBUTING.md.

License

As part of the TAK CSB's goal of bringing technology industry practices to the U.S. Department of Defense, we welcome contributions to this repository from the open source community. If you are interested in contributing to this project, please review CONTRIBUTING.md and LICENSE.md. Those files describe how to contribute to this work. A list of contributors to this project is maintained in CONTRIBUTORS.md.

Works created by U.S. Federal employees as part of their jobs typically are not eligible for copyright in the United States. In places where the contributions of U.S. Federal employees are not eligible for copyright, this work is in the public domain. In places where it is eligible for copyright, such as some foreign jurisdictions, this work is licensed as described in LICENSE.md.

androidtacticalassaultkit-civ's People

Contributors

bradh avatar matt-msi avatar midnightcomm avatar steveturner avatar takdeveloper avatar timv-dds avatar uvatbc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

androidtacticalassaultkit-civ's Issues

main.jar & atak-javadoc.jar

Hi, where can I find main.jar & atak-javadoc.jar for plugin development? I was unable to find them in the git repository. Thanks.

How to build atak-gradle-takdev?

I understand that atak-gradle-takdev library is used by the plugin framework.
I couldn't find any build info or pre-build binary for 4.3 ATAK source or scripts to generate the library.
I am new to this application development and appreciate for any suggestions/comments from tak developers.

java.lang.SecurityException: Permission Denial: starting intent

I am trying to implement the Activity Recognition Transition API in an ATAK plugin. This API requires the ACTIVITY_RECOGNITION permission to be approved, however, is denied in ATAK.

In order to manually override it, I have attempted to start an activity within the onReceive() method in the PluginDropDownReceiver class.

val startIntent = Intent()
startIntent.setClassName(packageName, className)
startIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
context.startActivity(startIntent)

This too fails with a SecurityException being thrown.

Is there a way to call startActivity(intent) in an ATAK plugin without a SecurityException being thrown?

Web KML link (Garmin InReach) only displays at tight zoom levels

Using a tracker KML from Garmin inreach as an example, the web kml only displays at extremely tight zoom levels.(2 tightest scales on OSM). When zoomed further out the KML icon disappears. This makes gaining SA on the position of the KML tracker difficult.

Android 10 - ATAK-CIV 4.4

Imagery From Files Fail To Render on ATAK

Versions:
ATAK-CIV - 4.3.1.X
Android 11 - GrapheneOS RQ2A.210505.002.2021.05.19.06

Howdy all,

For the past few versions of ATAK, my custom imagery has not been able to render properly. I have taken all the steps that includes reinstalling imagery, reinstalling ATAK, downgrading to the earliest version of ATAK that's in 4.3, attempting this on another device, etc. I believe patch 4.3.1.5 was the last version that my imagery worked.

The following image depicts how the imagery is not rendering. Regardless of the zoom setting.
IMG_20210524_131227

Now when I attempt to load online imagery, it loads just fine.
IMG_20210524_131329

I am not sure why this is happening. I've used imagery from different sources to no avail. I usually use imagery from TNRIS.ORG, specifically Texas NAIP 2020 imagery. WinTAK loads the imagery just fine.
I do not believe that any update from GrapheneOS has caused a rendering bug of any sorts.

I appreciate the read. For any further information on my testing environment, please let know. Thanks!

Build a plugin for ATAK Version number and above

Hi takdeveloper,

can I ask a quick question? Can I build a plugin for an array of ATAK releases, v4.2, v4.3 v4.4 etc. It's a user issue; if we create a plugin that will integrate with our hardware, do we have to issue a new plugin for each ATAK release, or can we specify say 4.x?

I really appreciate any help you can provide.

Osmdroid Sqlite tiles format

How to convert MBTILES Raster Tiles to OSMDROID SQLite? Or Folder of TMS or XYZ png tiles to OSMDROID format that this app uses?
How are standard Tile Numbers (integers)
Zoom_level
Tile_Column
Tile_Row
Converted to KEY column?

Is the Tile (similar to tile_data blob) store same PNG/JPG/WEBP Image 256x256 or Multiples or is the Tile Blob different?

I can find documentation about this format
We have lots of mbtiles and want to convert them

implementation vs documentation on '"Mesh Network" Protocol Negotiation'

/takproto/README.md has a section entitled '"Mesh Network" Protocol Negotiation' in which there are a set of rules regarding protocol version in "TAK products".

The gist appears to be that all devices have to actively track the version of all other devices and adapt their protocol to suit the lowest common denominator.

This may have had noble intentions, but this seems to only serve as an incentive to only implement protocol 0 (legacy XML), as targeting the higher version (currently 1) would only open up the added requirements to have to write code to support all other protocol versions... not to mention the additional code complexity of receiving and maintaining a database of peer device protocols and adapting protocol behavior.

Furthermore, at least in my testing so far, it seems like CivTAK doesn't bother to honor its own specification. (Is this a case of 'do as I say, not as I do'?)

If I send CoT XML messages (protocol 0) to the 239.2.3.1:6969 multicast address, CivTAK displays those SA events, but it continues to send its inter-ATAK messages on the same multicast address at protocol 1. It does not bother adapting its protocol version to the lowest common denominator as /takproto/README.md dictates.

Personally, I'm fine with that, as it seems like there would be plenty of applications where SA CoT data is only a source that ATAK clients sink. The protocol 1 protobuf specification just has a generic Details text string to cover everything beyond the basic CoT fields, so with a Details field of any notable size, it is not like the newer protocol even has appreciable storage efficiency advantage over the legacy XML.

However, if someone felt the need to write these rules in /takproto/README.md, is there going to be a problem going forward with using legacy XML for SA data?

I also notice that there is an option under Show All Preferences > Network Preferences > Network Connection Preferences > Manage Inputs for a "SA Multicast : Sensor Data" that has a default multicast address of 239.5.5.55 7171. When enabled, it seems to accept legacy XML just as easily. Should that address be used in preference to the "SA Multicast" 239.2.3.1:6969?

What's the scoop? Thanks.

Your CI pipeline needs an enema

A PR (#4) failed step 1 (build) in your pipeline due to a lack of space left on the device.

Pipeline ID:
https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/runs/1349971846

Execution failed for task ':ATAKMapEngine:lib:copyCivSdkJniLibsProjectAndLocalJars'. 1624 1 exception was raised by workers: 1625 java.nio.file.FileSystemException: /home/runner/work/AndroidTacticalAssaultKit-CIV/AndroidTacticalAssaultKit-CIV/atak/ATAKMapEngine/lib/build/intermediates/stripped_native_libs/civSdk/out/lib/armeabi-v7a/libgdal.so -> /home/runner/work/AndroidTacticalAssaultKit-CIV/AndroidTacticalAssaultKit-CIV/atak/ATAKMapEngine/lib/build/intermediates/library_and_local_jars_jni/civSdk/jni/armeabi-v7a/libgdal.so: No space left on device

STL Soft Cloning Location Clarification in BUILDING.md

In ATAK BUILDING.md the following is stated:

requires STL Soft 1.9. The repository should be cloned under takengine/thirdparty/stlsoft.

There is a takengine folder and a takthirdparty folder, however there is no takengine/thirdparty path. Which of these paths should STL Soft be cloned to, takengine/stlsoft or takthirdparty/stlsoft? Thanks.

Crash pressing OK after taking a photo

Hi, this issue happens on two devices we have

Samsung Galaxy Tab A, SM-T515
moto g8 power lite

It's worth noting that neither of these devices has a compass. On my Pixel 4, I don't see the issue.

I've caught the issue while debugging, it stops on the return statement of Tessellate_polygon, in Tessellate.h

template
Util::TAKErr Tessellate_polygon(VertexDataPtr &value, std::size_t *dstCount, const VertexData &src, const std::size_t count, const double threshold, Algorithm &algorithm) NOTHROWS
{

            if(sizeof(T)*src.size > src.stride)
                return Util::TE_InvalidArg;
            ReadVertexFn readV;
            WriteVertexFn writeV;
            if (src.stride > sizeof(T)*src.size) {
                readV = readVertexImpl_stride<T>;
                writeV = writeVertexImpl_stride<T>;
            } else {
                readV = readVertexImpl_nostride<T>;
                writeV = writeVertexImpl_nostride<T>;
            }
           

           //Here is where the issue occurs
            return Tessellate_polygon(value, dstCount, src, count, threshold, algorithm, readV, writeV);
        }
    }

Values read

Signal = SIGABRT (signal SIGABRT)
value = {TAK::Engine::Renderer::VertexDataPtr &const} nullptr
dstCount = {std::size_t * | 0xb4064460} 0xb4064460
src = {const TAK::Engine::Renderer::VertexData &const}
count = {std::size_t} 10
threshold = {const double} 0
algorithm = {TAK::Engine::Renderer::Algorithm &const}
readV = {TAK::Engine::Renderer::ReadVertexFn | 0xb58d1241} (libatakjni.soTAK::Engine::Util::TAKErr TAK::Engine::Renderer::readVertexImpl_nostride<double>(TAK::Engine::Math::Point2<double>*, TAK::Engine::Util::MemBuffer2&, TAK::Engine::Renderer::VertexData const&) + 1 at Tessellate.h:47) writeV = {TAK::Engine::Renderer::WriteVertexFn | 0xb58d12e9} (libatakjni.soTAK::Engine::Util::TAKErr TAK::Engine::Renderer::writeVertexImpl_nostride(TAK::Engine::Util::MemBuffer2&, TAK::Engine::Renderer::VertexData const&, TAK::Engine::Math::Point2 const&) + 1 at Tessellate.h:82)

Missing externals for Windows build.

We're trying to build the takengine in Windows using the new CMake scripts. It appears there are missing external packages. For instance the CMakeLists.txt in /takengine has:

# only for windows right now
if (WIN32)
    add_subdirectory (taktcm)
endif ()

However there is no taktcm folder. There are also various references to:

#ifdef MSVC
#include "vscompat.h"
#endif

However there is no vscompat.h file anywhere in the repo. I understand that a Windows build may not be officially supported, but is it possible to obtain or include these missing resources?

Documentation

Hi,
I'm a developer working on a plugin for ATAK.

Is there any documentation for the codebase?
I'm trying to get the user's current zoom level from the MapView.

Thanks!

Re-lock widget not working

The re-lock feature has an issue where sometimes it does not hold the lock. After selecting the "Re-lock" button in the widget the previously locked item is locked, then after a second or two the lock is released and the map recenters on the self marker.

Steps to Reproduce:

  1. Launch ATAK
  2. Tap on any team/buddy marker
  3. Radial menu appears
  4. Tap on lock on friendly icon
  5. Friendly icon is now locked at the center of the map
  6. Tap on self marker
  7. Radial menu appears
  8. Re-lock menu appears on left side of the screen
  9. Tap on the re-lock icon
  10. Locked on friendly toast message appears
  11. Map re-locks for 1 second, then changes the lock target back to the self marker (PROBLEM)

Hardware: Samsung Galaxy Tab A (8.0", 2019)
Model Number: SM-T290
OS: Android 11
Software: ATAK 4.3.0.0, ATAK 4.4.0.6 (2e7a914b

relock_issue.mp4

Network KML double tap

Using CIVTAK 4.3.0.0 on a Samsung Galaxy tab.
Adding a network KML with a 10 second refresh causes a double tap at the server, thereby doubling the bandwidth on the network for the layer.

    • [21/Apr/2021:16:53:50 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:53:50 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:53:59 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:00 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:09 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:10 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:19 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:20 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:29 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:30 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:39 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:40 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:49 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:50 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:59 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:00 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:09 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:10 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:19 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:20 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:29 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:30 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:39 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:40 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:49 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:50 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:59 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:56:00 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:56:09 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:56:10 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"

Support for GARS grid lines

Today ATAK support MGRS grid lines, and that is great for land operations. For allocating air space GARS is commonly used, https://earth-info.nga.mil/GandG/coordsys/grids/gars.html, and if would be great if that also was supported. I tried to add gars as a KML overlay, but if you want to cover a fairly large area, it will make ATAK crash.
If there is another way for supporting GARS in ATAK, please let me know.

BUILDING doc issues

Just some errors in the BUILDING.md that will cause some confusion.

  • The doc says to fetch says to fetch stlsoft into the takengine/thirdparty directory. That directory does not exist. The "prebuild" script creates the directory and downloads stlsoft into root.

  • Additional tools required to install on Linux: dos2unix, tcl, autoconf, libtool, swig, ant. Perhaps some configure scripts could check for these as well? These are not normally installed on Ubuntu, even with "build-essential" and a JDK installed.

GPLv3 license

Is it possible to convert the license to something more permissive like MIT or Apache 2.0?

Looking at your dependencies the only one that has a GPLv3 license is libstdc++, however if you look at the license terms for libstdc++ it has an exception that allows it to be used in proprietary software free of restrictions:

https://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html

https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.license.any_program

https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.license.what_restrictions

Compile Issue - Manual and Script

I feel like this due to something I am doing wrong.

System: VMware running Linux 20.04 LTS, Civ - 4.3.0 and Android Studio 4.2

The issue is two fold..
While compiling manually:
Each of the 3 make commands yield the same result, only the build target name changes, obviously:
"cp: cannot stat '../assimp': No such file or directory
make: *** [mk/assimp-common.mk:27: /home/tak/AndroidTacticalAssaultKit-CIV/takthirdparty/builds/android-arm64-v8a-release/assimp] Error 1"

While using the convenience script:
Everything compiles, but I do not have the assorted Tasks in the gradle tab in Android Studios.

I have been at this for 3 days, tried the compile directions from the readme file and from a blog. No dice.

pluginsdk.zip ## 4.1.1.2

Hi
Changes to the build.gradle (Module: .....). means that the pluginsdk will not compile anymore in AndroidStudio, with the following error.

Deveopment/AndroidTacticalAssaultKit-CIV/atak/ATAK/plugin1/app/src/main/java/com/atakmap/android/plugintemplate/plugin/PluginTemplateTool.java:4: error: package com.atakmap.android.ipc does not exist

Is there any more information that needs to be set up before this will compile?

Thank you.

SSL Issues with the Data Package Server

I am the author of taky, a small experimental Python server for ATAK. I have successfully setup SSL connections between ATAK and the server, both for the COT server (port 8089 and the "Client Certificate") and the Marti endpoints (port 8443 and the "Trust Store").

While the COT Server requires client certificates, the Marti endpoints do not. This makes it difficult to secure a public TAK server, as anyone can execute requests. (For example, an anonymous user could query for uploaded data packages.) Additionally, it makes it difficult to verify which client uploaded the files. A user can claim they are "JENNY", but without the client certificate that claim is baseless.

As an aside, it appears that ATAK and the Marti endpoints actually support indicating which client certificate uploaded the file, in MissionPackageQueryResult.java#L37

On ATAK 4.2.1.7 (b8b47239), when I require client certificates on the server side, I get an SSL error: TLSV1_ALERT_UNKNOWN_CA. This seems rather confusing, as ATAK seemed to be perfectly happy with the server certificate when there was no check for client certs. I tried installing the CA to the Android system, and that did not seem help. (Regrettably, I am not very experienced with Android, so I may have made a mistake.)

One thing I have not checked is to see if ATAK is actually sending the client certificate using VerifyMode.CERT_OPTIONAL -- so I will try to get back to this issue with more information. If it would be helpful, I can also setup a sample server and client certificates for you to connect to, or attempt to submit a debug log.

To summarize the issue:

  • I would like to secure the Marti endpoints by requiring the client certificate
  • This feature seems to be indicated in MissionPackageQueryResult.java#L37
  • When I try to enforce client certificates, I get TLSV1_ALERT_UNKNOWN_CA from ATAK

Building ATAK on macOS

Hi, I am trying to use the convenience script on macOS, but it is failing.

First, it fails to compile SQLite due to this line: https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/master/takthirdparty/mk/sqlite.mk#L26

which I changed to:

$(CC) -c -v -I ./ -I $(OUTDIR_CYGSAFE)/include $(sqlite_CFLAGS) $(sqlite_fixedflags) -o $(OUTDIR_CYGSAFE)/$(sqlite_srcdir)/sqlite3.o $(OUTDIR_CYGSAFE)/$(sqlite_srcdir)/sqlite3.c

However, it is now failing on this line: https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/master/takthirdparty/mk/ogdi-common.mk#L16

it is attempting to patch ogdi/config/unix.mak via /takthirdparty/distfiles/ogdi-pgsc.patch and it fails on that "hunk" for an unknown reason.

I tried using --ignore-whitespace --fuzz 3 in the patch call in ogdi-common.mk but that didn't work.

Any suggestions?

CoT stale timestamp not honored when <image> is included

When CivTAK (and presumably other variants of the same code) receives a CoT event containing an image, the "stale" field is not reliably honored when the stale time is the same or before the "time" and "start" fields.

This issue was seen on ATAK v4.4.0.6 (2e7a914b) which is the latest available available on the Play Store at the time of writing.

Since this reproducing this issue is very particular, I’ve provided example multi-platform source code for a simple command line tool.

This issue happens whether the event comes to CivTAK/ATAK via a server or is provided directly to CivTAK/ATAK. For simplicity these instructions use the latter mechanism (send CoT event directly to the wide open 4242 TCP port on the CivTAK/ATAK client).

To follow these instructions, you need to know the IP address of the CivTAK/ATAK client under test and you need a PC that can access said IP address and can run this sample code.

Compile the provided demostale.c source code and run it. For this example, the TAK client is 192.168.1.2:

./demostale 192.168.1.2 4242 5

The code generates a CoT event with an image (TAK logo).

You should see the event appear, and the event should gray out after about 5 seconds (5 is the third command line parameter). The user can run this tool multiple times and the icon should gray out after roughly 5 seconds after the last event. You can change the "5" command line argument to some other positive, non-zero integer number to change the time behavior.

However, try this:

./demostale 192.168.1.2 4242 0
./demostale 192.168.1.2 4242 0

Upon running the first line, you will see CivTAK/ATAK create and immediately gray out the the event. This seems to be the expected behavior.

However, upon running the second line, the event becomes active and subsequently never becomes stale. Running the tool additional times does not change the behavior. The third parameter can also be a negative integer (causing the stale time to be before time and start) and the behavior is the same.

/*
  THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE
  WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

#if defined(_MSC_VER) || defined(__MINGW32__)
	#include <windows.h>
#else
	#include <sys/types.h>
	#include <sys/socket.h>
	#include <arpa/inet.h>
	#include <unistd.h>
	typedef struct sockaddr * LPSOCKADDR;
	typedef int SOCKET;
	typedef struct sockaddr_in SOCKADDR_IN;
#endif

int main(int argc, char *argv[])
{
	int outcome, portno;
#if defined(_MSC_VER) || defined(__MINGW32__)
	WSADATA wsaData;
#endif
	SOCKADDR_IN Server;
	SOCKET tcpSocket;
	char sn[64];
	double lat = 38.678315, lon = -77.138435, hae = 250.0;
	int stale_secs = 10;
	const char *ipaddr;
	time_t t, ft;
	char datetime[128], staledatetime[128];
	int length;
	static char buffer[2048];

	if (argc < 3)
	{
		printf("%s <ip_addr> <tcp_port> [stale_secs]\n", argv[0]);
		return -1;
	}

	if (argc > 3) stale_secs = atoi(argv[3]);

//	srand(time(NULL));
	snprintf(sn, sizeof(sn), "%x", rand());

	ipaddr = argv[1];
	portno = atoi(argv[2]);

#if defined(_MSC_VER) || defined(__MINGW32__)
	outcome = WSAStartup(MAKEWORD(2,0), &wsaData);

	/* check the version */
	if (wsaData.wVersion != MAKEWORD(2,0)) return -1;
#endif

	Server.sin_family = AF_INET;
	Server.sin_addr.s_addr = inet_addr(ipaddr);
	Server.sin_port = htons((unsigned short)portno);

#if defined(_MSC_VER) || defined(__MINGW32__)
	tcpSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

	if (INVALID_SOCKET == tcpSocket) return -1;
#else
	tcpSocket = socket(AF_INET, SOCK_STREAM, 0);

	if (tcpSocket <= 0) return -1;
#endif

	outcome = connect(tcpSocket, (LPSOCKADDR)&Server, sizeof(Server));

	t = time(NULL);
	ft = t + stale_secs;

	strftime(datetime, sizeof(datetime), "%Y-%m-%dT%H:%M:%S.000Z", gmtime(&t));
	strftime(staledatetime, sizeof(staledatetime), "%Y-%m-%dT%H:%M:%S.000Z", gmtime(&ft));

	snprintf(buffer, sizeof(buffer),
		"<?xml version=\"1.0\"?>\xA<event how=\"m-g\" stale=\"%s\" time=\"%s\" " \
		"type=\"a-h-A-M-H-Q\" uid=\"%s\" start=\"%s\" version=\"2.0\"><detail>" \
		"<_flow_tags pubsrv=\"%s\"/><image mime=\"image/png\" resolution=\"1\" " \
		"type=\"EO\" size=\"983\">\xA" \
		"iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAAAAADH8yjkAAADnklEQVR4nO1ZSZLkIAxMV/QX5Uei\xA" \
		"R9IHNgmEgC47Yg6jQ1UYgxIlWjBcEe/K56z7ffEpQjwRAkBHI+IRAAHHCAcAoRh9hLAPEASv4XmA\xA" \
		"kOkJpzRtAuTpUzhG2HNTvpNWAkABAHjXX7cA7qQ/Tx5BNj4AUCbbVjmo9i8BOM+UlBclW+57DfGz\xA" \
		"1J9V6mYCAwBzoW0qvgV8GdPPLZtGeACFneQ9AwSVTi7ENU3XzGWgnD5LrOJHo4FrAFt9B4DaiUwj\xA" \
		"pwBc5zaww/1zg4CJMQJwG2SQ3wNA9x4xNIBUbq/tCIB+jO4hAbQ72KxaABqiW3MZaIvJO0LUYdgA\xA" \
		"f1MuMGCASIouCKe0uZhJ6313FMlI1io3EllVf89nM012xMwjWTcwcDhjP8k8FwWAeytY/Jamm2W0\xA" \
		"D2C9BYL6cKfZCc/mjFyeuM5FijLQqwfhbnoIJKenHMZJdd4ioxVhAMw3V4b4Frx7qRSrikYkKjvX\xA" \
		"f0m0oX6bItyEINRx91+iS9WLXodKdirSsHJAgSLmBEDlT7cmbyWNoZN+/sxfoZV2R/2qx2rbQuTx\xA" \
		"NMyesbTg+BNpISsLnFw/W6F5RQOu+TDl/ZMCbzjRCOAEfslTTqnoq0FPEbkr0LYoXq/u5Wd4OcdI\xA" \
		"xEzpsceuF1kAkE7Xs2koGS1YDfb68Pi6SxW0CISwSM47AD6Ca6M5cvxW/Vpo9hn7dJYAMG68HhEZ\xA" \
		"vMKC5wyQml4HEBQ9xpDiqFnQGyA8gVRLdraQ3pDoYOmaAwxihwBZY8Xzj9VYnvVg6v7b03AsInV5\xA" \
		"UZZOlIqEGGNoLYkiUl1U3y7Q1j5U04g0IdhDW9PhuWm/bSDAYEhJMWX6ruqKMcbEEwDBgpnCBop2\xA" \
		"o2zc+NjeVfXtA8z1WG+aPochTVGMMQZqcZW8aMkRvFIwAEjWE0CwArm+bmvw50S35shhSFlQyKht\xA" \
		"ee6+CxYLNgyYFeOVCWeBZmztpgBF4myVvpVc+lPBebDWNEkr8wFe2k5kra8DXBEvMZQ5Ok3XxzI/\xA" \
		"+c0H4/63MjPUkcYongVkbIX141q/T1EguEdrG/oXa5Cua77Rv1rkAExrLjM2jjMWADRHSPqX3xQr\xA" \
		"N80II02880G4AVCuzYZ936b+jUAzEZJJy8OeLQALIZ3P7uh3I7mKuGlkKljr9QWwmYuyrmxEpmf3\xA" \
		"mzRuSWGj0rJ9o7x9Ya353r+x/mduxOP7d/p1IQ6mfwgQYyDQmf64FQffyOs1+T/AUn4BMI8WNv1H\xA" \
		"NBIAAAAASUVORK5CYII=\xA" \
		"</image></detail><point lat=\"%f\" lon=\"%f\" hae=\"%f\" ce=\"10.1\" le=\"9999999.0\"/></event>", 
		staledatetime, datetime, sn, datetime, datetime, lat, lon, hae);

	length = strlen(buffer);

#if defined(_MSC_VER) || defined(__MINGW32__)
	outcome = send(tcpSocket, buffer, length, 0);
#else
	outcome = write(tcpSocket, buffer, length);
#endif

#if defined(_MSC_VER) || defined(__MINGW32__)
	closesocket(tcpSocket);
#else
	close(tcpSocket);
#endif

	return 0;
}

Issue : Unable to start MQTT client service library using ATAK plugintemplate

Hi there,

[ATAK Civ source 4.3 & target android device samsung galaxy s8 ]

I have attempted to start the mqtt client service from onReceive() method in the PluginDropDownReceiver class.
It throws run time exception and fails to establish the connection with broker server.

Failed to connect to: tcp://broker.hivemq.com:1883java.lang.RuntimeException: cannot start service org.eclipse.paho.android.service.MqttService

With the same client library code integrated using the example application from Android studio - it works.

I tried using both context mapView and pluginContext to start the Mqtt client service - both has the same problem.

Does the mapView context has the access to ATAK app manifest ?

Below are my changes to integrate paho mqtt client library,

plugin-examples/plugintemplate/app/build.gradle

image

image

image

I appreciate for any feedback related to this problem.

Thank you !

Adding support for local grid reference systems

ATAK supports global grid reference systems (lat/lon and MGRS) natively with easy selection between units.

However, many small organisations (especially outside CONUS) rely on locally defined grid reference systems (such as OS Grid in the UK), which prevents easy adoption by life saving organisations.

Suggest method for adding generic grid reference systems similar to the way a CGRS is built - define origins, spacing and projection method + naming convention, or allow a full definition to be built externally and added to the global "coordinate format" page.

Happy to have at this, if anyone in the team has any pointers it's appreciated!

viewFormat support needed for network KML layers

KML viewFormat support is needed to support KML apps which use the bounding box to fetch contextual data from a server.
A comment suggests this was considered briefly.

Network KML layers that use the KML viewFormat extension include geospatial databases which filter large datasets based on the current view and dynamic layers such as 3D buildings.
<viewFormat>BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]</viewFormat>

More information is here: https://developers.google.com/kml/documentation/kmlreference#viewformat

Thanks.

ATAK 4.3 version plugin-examples/plugintemplate compilation fails

Hi,

I was able to build ATAK Civ 4.3 source.
But the compilation fails for the plugintemplate project as below,

Also I am made some changes suggested from the blog,
https://www.ballantyne.online/developing-atak-plugin-101/

Build file '/home/tess/ATAK/AndroidTacticalAssaultKit-CIV/plugin-examples/plugintemplate/app/build.gradle' line: 85

  • What went wrong:
    A problem occurred evaluating project ':app'.

Plugin with id 'atak-takdev-plugin' not found.

But I was able to build sdkplugin example https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/releases/download/4.1.1.4/atak-civ-sdk-4.1.1.4.zip https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/issues/27

Do we have any similar atak plugin sdk packages for 4.3 version ?
AFAIK , both looks almost the same.

Unable to install release version of plugins into release version of TAK

Have successfully built and deployed a 4.2 release version of TAK onto a Samsung Tab A. Unable to install a release version of the HelloWorld plugin. Using a debug version of TAK and a debug version of the plugin works. The same signing keys are used for TAK and the plugins.

image

Attempting the same thing with our home gown plugin. Release version fails to install but debug version works.
image

tileUpdate Entry in custom XML map sources is unused

ATAK doesn't appear to be using the tileUpdate entry for custom XML map sources. MobacMapSourceFactory supports parsing the tileUpdate entry as a refreshInterval, but I don't see this being used to download new tiles from a map source. What would be required to add this functionality to ATAK? Could it be implemented as a plugin?

Geopackage raster does not show most detailed level

If I use a geopackage raster as a data source, the most detailed raster resolution won’t be shown in ATAK.

Steps to reproduce:

  1. Create a geopackage using GDAL, but without using gdaladdo for adding overviews; nothing will be displayed in ATAK.

or

  1. Create a geopackage with gdal and write different data to different zoom levels; you won’t see the most detailed zoom level in ATAK.

or

  1. Create a file that is both geopackage and mbtiles in one. http://erouault.blogspot.com/2014/12/gdal-geopackage-raster-support.html
    Read the data as mbtiles instead of geopackage and the data will be more detailed in ATAK.

Endpoints of R&D are not movable

Since one of the last updates it is no more possible to edit the R&B line by entering the data using the "pencil" (edit) option in the pop up menu. The error message says: "enpoint not movable".

ATAK 4.4 SDK - Third Party pipeline, :app:minifyCivReleaseWithProguard FAILED libraryclass depends on program class

I am writing a plugin for release, that depends on Kotlin, I have successfully built de-bug and tested the plugin fine, however when using the Third Party pipeline, I get the following;

Warning: library class androidx.activity.ComponentActivity$4 extends or implements program class androidx.lifecycle.LifecycleEventObserver
Warning: library class androidx.activity.ComponentActivity$5 extends or implements program class androidx.lifecycle.LifecycleEventObserver
Warning: library class androidx.activity.result.ActivityResultRegistry$1 extends or implements program class androidx.lifecycle.LifecycleEventObserver
Warning: library class androidx.fragment.app.DefaultSpecialEffectsController$3 extends or implements program class androidx.core.os.CancellationSignal$OnCancelListener
Warning: library class androidx.fragment.app.DefaultSpecialEffectsController$5 extends or implements program class androidx.core.os.CancellationSignal$OnCancelListener
Warning: library class androidx.fragment.app.DialogFragment$4 extends or implements program class androidx.lifecycle.Observer
Warning: library class androidx.fragment.app.DialogFragment$5 extends or implements program class androidx.fragment.app.FragmentContainer
Warning: library class androidx.fragment.app.Fragment$5 extends or implements program class androidx.lifecycle.LifecycleEventObserver
Warning: library class androidx.fragment.app.Fragment$6 extends or implements program class androidx.arch.core.util.Function
Warning: library class androidx.fragment.app.Fragment$7 extends or implements program class androidx.arch.core.util.Function
Warning: library class androidx.fragment.app.FragmentActivity$1 extends or implements program class androidx.savedstate.SavedStateRegistry$SavedStateProvider
Warning: library class androidx.fragment.app.FragmentAnim$1 extends or implements program class androidx.core.os.CancellationSignal$OnCancelListener
Warning: library class androidx.fragment.app.FragmentManager$1 extends or implements program class androidx.activity.OnBackPressedCallback
Warning: library class androidx.fragment.app.FragmentManager$3 extends or implements program class androidx.fragment.app.FragmentFactory
Warning: library class androidx.fragment.app.FragmentManager$6 extends or implements program class androidx.lifecycle.LifecycleEventObserver
Warning: library class androidx.fragment.app.FragmentManager$StartEnterTransitionListener extends or implements program class androidx.fragment.app.Fragment$OnStartEnterTransitionListener
Warning: library class androidx.fragment.app.SpecialEffectsController$Operation$1 extends or implements program class androidx.core.os.CancellationSignal$OnCancelListener
Warning: library class androidx.lifecycle.AbstractSavedStateViewModelFactory extends or implements program class androidx.lifecycle.ViewModelProvider$KeyedFactory
Warning: library class androidx.lifecycle.SavedStateHandle$1 extends or implements program class androidx.savedstate.SavedStateRegistry$SavedStateProvider
Warning: library class androidx.lifecycle.SavedStateHandle$SavingStateLiveData extends or implements program class androidx.lifecycle.MutableLiveData
Warning: library class androidx.lifecycle.SavedStateHandleController extends or implements program class androidx.lifecycle.LifecycleEventObserver
Warning: library class androidx.lifecycle.SavedStateHandleController$1 extends or implements program class androidx.lifecycle.LifecycleEventObserver
Warning: library class androidx.lifecycle.SavedStateHandleController$OnRecreation extends or implements program class androidx.savedstate.SavedStateRegistry$AutoRecreated
Warning: library class androidx.lifecycle.SavedStateViewModelFactory extends or implements program class androidx.lifecycle.ViewModelProvider$KeyedFactory
Warning: library class com.atakmap.android.bloodhound.ui.BloodHoundRouteWidget$1$3 extends or implements program class androidx.core.util.Consumer
Warning: library class com.atakmap.android.bloodhound.util.BloodHoundToolLink$5 extends or implements program class androidx.core.util.Consumer
Warning: library class com.atakmap.android.bloodhound.util.BloodHoundToolLink$9 extends or implements program class androidx.core.util.Consumer
Warning: library class com.atakmap.android.chat.ConversationFragment extends or implements program class androidx.fragment.app.Fragment
Warning: library class com.atakmap.android.contact.ContactDetailDropdown$6 extends or implements program class androidx.viewpager.widget.ViewPager$SimpleOnPageChangeListener
Warning: library class com.atakmap.android.contact.ContactDetailDropdown$ContactDetailViewAdapter extends or implements program class androidx.fragment.app.FragmentPagerAdapter
Warning: library class com.atakmap.android.contact.ContactDetailView extends or implements program class androidx.fragment.app.Fragment
Warning: library class com.atakmap.android.dropdown.GenericFragmentAdapter extends or implements program class androidx.fragment.app.Fragment
Warning: library class com.atakmap.android.features.FeatureEditDetailsView$1 extends or implements program class androidx.viewpager.widget.PagerAdapter
Warning: library class com.atakmap.android.metrics.activity.MetricFragmentActivity extends or implements program class androidx.fragment.app.FragmentActivity
Warning: library class com.atakmap.android.user.EnterLocationDropDownReceiver$10 extends or implements program class androidx.viewpager.widget.ViewPager$SimpleOnPageChangeListener
Warning: library class com.atakmap.android.user.EnterLocationDropDownReceiver$IconPalletAdapter extends or implements program class androidx.fragment.app.FragmentPagerAdapter
Warning: library class com.atakmap.android.user.icon.Icon2525cPalletFragment extends or implements program class androidx.fragment.app.Fragment
Warning: library class com.atakmap.android.user.icon.MissionSpecificPalletFragment extends or implements program class androidx.fragment.app.Fragment
Warning: library class com.atakmap.android.user.icon.SpotMapPalletFragment extends or implements program class androidx.fragment.app.Fragment
Warning: library class com.atakmap.android.user.icon.UserIconPalletFragment extends or implements program class androidx.fragment.app.Fragment
Warning: library class com.atakmap.android.user.icon.VehiclePalletFragment extends or implements program class androidx.fragment.app.Fragment
Warning: library class com.atakmap.android.vehicle.model.ui.VehicleModelPalletFragment extends or implements program class androidx.fragment.app.Fragment
Warning: library class com.atakmap.android.dropdown.DropDownReceiver depends on program class androidx.fragment.app.Fragment
Warning: library class com.atakmap.android.dropdown.DropDownReceiver depends on program class androidx.fragment.app.Fragment
Warning: library class com.atakmap.android.dropdown.DropDownReceiver depends on program class androidx.fragment.app.Fragment
Warning: library class com.atakmap.android.dropdown.DropDownReceiver depends on program class androidx.fragment.app.Fragment

Warning: there were 47 instances of library classes depending on program classes.
You must avoid such dependencies, since the program classes will
be processed, while the library classes will remain unchanged.
(http://proguard.sourceforge.net/manual/troubleshooting.html#dependency)

After looking at this, I assume this is an issue where the androidx libraries are normally pulled from main.jar and now that I have introduced implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version Proguard is struggling?

Has this been solved by anyone publishing plugins?

Bogus decimal degree accuracy

ATAK reports locations accurate to 15 decimal places, or 0.1 nano-meters.
This bogus accuracy becomes an issue when communicating routes over low bandwidth networks which may contain a large number of positions.

For example, if you had 1000 points, that would be a minimum of 34 bytes per lat/lon pair eg. 0.12345678912345, 0.12345678912345 so 34KB in all.

If you reduced the resolution to 7 decimal places the same information could be conveyed with 18KB of data:
0.1234567, 0.1234567 = 18 bytes, accuracy 1.11cm (at the equator, less toward poles)

http://wiki.gis.com/wiki/index.php/Decimal_degrees

Network KML keeps streaming when unchecked

Using CIVTAK 4.3.0.0 on a Samsung Galaxy tab.
When adding a network KML layer with a refresh rate, the layer can be toggled with the button.
Even when the layer is off, the KML continues to stream behind the scenes.
In the log below the layer was streamed and then unchecked but it carried on streaming (twice, see prev issue) every ten seconds. When re-checked, the "Verify Download" message appeared on the device asking for confirmation, even whilst it was streaming in the background.

The expected behaviour is that the layer stops downloading from the server when unchecked.
This bug has the potential to waste bandwidth, especially when scaled which is ironic given the minimum KML refresh time which is hard coded (presumably to protect bandwidth?) at 10 seconds in 4.3.0.

(Layer checked)

    • [21/Apr/2021:16:53:50 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:53:50 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:53:59 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:00 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
      (Layer unchecked)
    • [21/Apr/2021:16:54:09 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:10 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:19 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:20 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:29 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:30 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:39 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:40 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:49 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:50 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:54:59 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:00 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:09 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:10 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:19 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:20 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
      (Layer checked, confirmation prompt appears...)
    • [21/Apr/2021:16:55:29 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:30 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:39 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:40 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:49 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:50 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:55:59 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:56:00 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:56:09 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"
    • [21/Apr/2021:16:56:10 +0100] "GET /users/101/KMZTEST.kmz HTTP/1.1" 200 34949 "-" "TAK"

Additional Notes - Kotlin

For those of you who want to use Kotlin to develop your plugin...if you do not want to use Kotlin, disregard this.

Background:
I use Kotlin for other projects and since in its syntax to other mobile platform's language, its been my go to for Android. Previous builds worked simply by converting the file from Java to Kotlin...until I came back to this project a few months later...it all went south.

Below is the setup to address the issues I had.

Setup:
I have fully working development images for Linux, Windows 10 and MacOS for the ATAK Civ SDK. For Windows I am using JDK 8 from Oracle and Android Studio 4.1.2

  1. Change the SDK to 1.8 (File -> Project Structure -> JDK location
  2. Change Source and Target Compatibility to 1.8 (Java 8) (Project Structure -> Modules)
  3. Setup your keystore, define your variables in local.properties and Gradle sync
  4. Add atak-javadoc.jar to the main.jar Library Properties
  5. Restart Android Studio
  6. Under build.gradle (Module) add the following:
  • Change the compileSdkVersion to: compileSdkVersion 28
  • Add this under the android definitions below the compileSdkVersion and buildToolsVersion
compileOptions {
                   sourceCompatibility 1.8
                   targetCompatibility 1.8
               }
  1. Gradle sync and do an installCivDebug under Tasks -> install

Good luck!

Open plugin's ToolPreference from DropDownReceiver

I'm not sure whether this is the best place to ask this, but I don't see any better forum to ask. Is there a way within the plugin SDK to directly open my plugin's registered preferences from a button?

For example, at the moment I can register a ToolPreference via the following, as ripped from the (extremely useful!) helloworld plugin example:

ToolsPreferenceFragment
                .register(
                        new ToolsPreferenceFragment.ToolPreference(
                                "Hello World Preferences",
                                "This is the sample preference for Hello World",
                                "helloWorldPreference",
                                context.getResources().getDrawable(
                                        R.drawable.ic_launcher, null),
                                new HelloWorldPreferenceFragment(context)));

And I can launch the Device, Network or Advanced settings respectively by calling:

AtakBroadcast.getInstance().sendBroadcast(Intent("com.atakmap.app.DEVICE_SETTINGS"))
AtakBroadcast.getInstance().sendBroadcast(Intent("com.atakmap.app.NETWORK_SETTINGS"))
AtakBroadcast.getInstance().sendBroadcast(Intent("com.atakmap.app.ADVANCED_SETTINGS"))

But I'd like to be able to directly open my registered ToolPreference without having to navigate through the menus manually. Is there a way of registering a custom intent string to let me do that? If not - it would be a welcome addition!

Included atak.apk crashes on emulator on startup

Name: Pixel_4_API_30_2

CPU/ABI: Google Play Intel Atom (x86_64)

Path: C:\Users\rotin.android\avd\Pixel_4_API_30_2.avd

Target: google_apis_playstore [Google Play] (API level 30)

Skin: pixel_4

SD Card: 512M

fastboot.chosenSnapshotFile:

runtime.network.speed: full

hw.accelerometer: yes

hw.device.name: pixel_4

hw.lcd.width: 1080

hw.initialOrientation: landscape

image.androidVersion.api: 30

tag.id: google_apis_playstore

hw.mainKeys: no

hw.camera.front: emulated

avd.ini.displayname: Pixel 4 API 30 2

hw.gpu.mode: auto

hw.ramSize: 1536

PlayStore.enabled: true

fastboot.forceColdBoot: no

hw.cpu.ncore: 4

hw.keyboard: yes

hw.sensors.proximity: yes

hw.dPad: no

hw.lcd.height: 2280

vm.heapSize: 256

skin.dynamic: yes

hw.device.manufacturer: Google

hw.gps: yes

hw.audioInput: yes

image.sysdir.1: system-images\android-30\google_apis_playstore\x86_64\

showDeviceFrame: yes

hw.camera.back: virtualscene

AvdId: Pixel_4_API_30_2

hw.lcd.density: 440

hw.arc: false

hw.device.hash2: MD5:6b5943207fe196d842659d2e43022e20

fastboot.forceChosenSnapshotBoot: no

fastboot.forceFastBoot: yes

hw.trackBall: no

hw.battery: yes

hw.sdCard: yes

tag.display: Google Play

runtime.network.latency: none

disk.dataPartition.size: 2G

hw.sensors.orientation: yes

avd.ini.encoding: UTF-8

hw.gpu.enabled: yes

HTTP dataport forced to 8080

Non SSL dataport appears to be hardcoded to 8080, probably as the product was never meant for insecure communications. Would be nice to be able to configure this, as 8080 is hit by a ton of port scanners. This holds true even if you manually configure the dataport in the ATAK app. (Tested 4.0.0.7)

Probably the issue is here, with the solution a few lines up:

Compass in Resection Tool shows negative values

The compass dialog in the Resection Tool shows invalid (negative) values for the bearing if the user taps on the minus ("-") button repeatedly until the heading goes past North.

Steps to Reproduce:

  1. Open ATAK
  2. Tap on 3 dots / overflow icon
  3. Tap Resection
  4. Add a new landmark using the + button at the bottom of the dropdown
  5. Compass appears
  6. Tap on "-" until the line reaches North
  7. Continue tapping on "-" and it will start to show negative values once the line passes North (PROBLEM)

Hardware: Samsung Galaxy Tab A (8.0", 2019)
Model Number: SM-T290
OS: Android 11
Software: ATAK 4.3.0.0, ATAK 4.4.0.6 (2e7a914b)

resection-compass-issue.mp4

Video Player Status Notification not shown for Full Screen

If videos are played from the dropdown, a notification is shown for playback status. For long press the video is played back in full screen but the player status notification is missing.

Steps to Reproduce:

  1. Launch ATAK from menu item
  2. Click on ATAK 3 dot menu and select "Video Player"
  3. Tap to play video
  4. Swipe down notification drawer
  5. Observe that notification show video player status is playing
  6. Tap back button
  7. Long press on video
  8. Observe that video is playing full screen.
  9. Swipe down notification drawer.
  10. Observe that notifications do NOT show video player status. [PROBLEM]

Hardware: Samsung Galaxy Tab A (8.0", 2019)
Model Number: SM-T290
OS: Android 11
Software: ATAK 4.3.0.0, ATAK 4.4.0.6 (2e7a914b)

fullscreen_video_no_notification_480p.mp4

Cesium Tile Support

How can cesium tile support be enabled in the build?

Some of the source related to the cesium tile support does not appear in the cmake files such as:
C3DTTileset.cpp or GLC3DTRenderer.cpp.

Took a look at these CMakeLists.txt files:
takengine/mapengine/CMakeLists.txt

It looks like C3DTTileset.cpp is misspelled:
${SRCDIR}/formats/cesium3dtiles/C3DTTilesset.cpp

Also the C3DTilesset.cpp is only in the windows sources and not in the common. Does that mean the cesium support only works on windows?

Linux Build not finding ogr_feature.h

I am building on ubuntu 18.04, the prebuild.sh script ran successfully. However when I run ./gradlew assembleCivDebug in the atak directory this error happens:

To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/6.8.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build

Configure project :libtakengine
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8

Configure project :ATAK:app
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
versionName[git]: 03e312e
version[git]: 1619089015
versionName[git]: 03e312e

Task :libtakengine:externalNativeBuildCivDebug
Build takengine_armeabi-v7a
ninja: Entering directory `/home/mcaruso/AndroidTacticalAssaultKit-CIV/takengine/mapengine/android/.cxx/cmake/civDebug/armeabi-v7a'
[1/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/Ellipsoid.cpp.o
[2/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/Ellipsoid2.cpp.o
[3/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/Layer2.cpp.o
[4/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/formats/egm/EGM96.cpp.o
[5/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/GeoPoint.cpp.o
[6/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/MapCamera.cpp.o
[7/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/Datum2.cpp.o
[8/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/Layer.cpp.o
[9/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/MapRenderer.cpp.o
[10/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/ProjectionSpi3.cpp.o
[11/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/RenderSurface.cpp.o
[12/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/currency/Currency2.cpp.o
[13/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/RenderContext.cpp.o
[14/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/GeoPoint2.cpp.o
[15/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/ProjectionFactory2.cpp.o
[16/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/MapProjectionDisplayModel.cpp.o
[17/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/db/BindArgument.cpp.o
[18/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/MapSceneModel.cpp.o
[19/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/ProjectionFactory3.cpp.o
[20/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/currency/CurrencyRegistry2.cpp.o
[21/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/AtakMapController.cpp.o
[22/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/db/Cursor.cpp.o
[23/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/db/CursorWrapper2.cpp.o
[24/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/db/DatabaseInformation.cpp.o
[25/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/db/DefaultDatabaseProvider.cpp.o
[26/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/db/RowIterator.cpp.o
[27/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/db/Statement.cpp.o
[28/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/elevation/ElevationChunk.cpp.o
[29/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/elevation/ElevationChunkCursor.cpp.o
[30/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/Globe.cpp.o
[31/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/AtakMapView.cpp.o
[32/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/db/DatabaseFactory.cpp.o
[33/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/MapSceneModel2.cpp.o
[34/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/db/DatabaseWrapper.cpp.o
[35/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/db/Database.cpp.o
[36/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/core/LegacyAdapters.cpp.o
[37/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/currency/CatalogDatabase2.cpp.o
[38/220] Building CXX object mapengine/CMakeFiles/takengine.dir/sdk/src/feature/DefaultDriverDefinition.cpp.o
FAILED: mapengine/CMakeFiles/takengine.dir/sdk/src/feature/DefaultDriverDefinition.cpp.o
/home/mcaruso/Android/Sdk/ndk/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/mcaruso/Android/Sdk/ndk/android-ndk-r12b/platforms/android-24/arch-arm -DRTTI_ENABLED -DSQLITE_HAS_CODEC -DTE_GLES_VERSION=3 -Dtakengine_EXPORTS -I../../../../../gl/khronos/OpenGL/api -I../../../../../gl/khronos/EGL/api -I../../../../../sdk/src -I../../../../../../thirdparty/stlsoft/include -I../../../../../../../takthirdparty/builds/android-armeabi-v7a-release/include -I../../../../../../../takthirdparty/builds/android-armeabi-v7a-release/include/kml -I../../../../../../../takthirdparty/builds/android-armeabi-v7a-release/include/kml/third_party/boost_1_34_1 -I../../../../../../../takthirdparty/builds/android-armeabi-v7a-release/include/libxml2 -isystem /home/mcaruso/Android/Sdk/ndk/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /home/mcaruso/Android/Sdk/ndk/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem /home/mcaruso/Android/Sdk/ndk/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem /home/mcaruso/Android/Sdk/ndk/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /home/mcaruso/Android/Sdk/ndk/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem /home/mcaruso/Android/Sdk/ndk/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem /home/mcaruso/Android/Sdk/ndk/android-ndk-r12b/platforms/android-24/arch-arm/usr/include -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -fexceptions -frtti -O0 -O3 -fPIC -std=gnu++11 -MD -MT mapengine/CMakeFiles/takengine.dir/sdk/src/feature/DefaultDriverDefinition.cpp.o -MF mapengine/CMakeFiles/takengine.dir/sdk/src/feature/DefaultDriverDefinition.cpp.o.d -o mapengine/CMakeFiles/takengine.dir/sdk/src/feature/DefaultDriverDefinition.cpp.o -c ../../../../../sdk/src/feature/DefaultDriverDefinition.cpp
../../../../../sdk/src/feature/DefaultDriverDefinition.cpp:33:25: fatal error: ogr_feature.h: No such file or directory
#include "ogr_feature.h"

Here are all the places where ogr_feature.h exist:
./gdal/ogr/ogr_feature.h
./takthirdparty/builds/android-arm64-v8a-release/gdal/ogr/ogr_feature.h
./takthirdparty/builds/android-arm64-v8a-release/include/ogr_feature.h
./takthirdparty/builds/android-armeabi-v7a-release/gdal/ogr/ogr_feature.h
./takthirdparty/builds/android-x86-release/gdal/ogr/ogr_feature.h

Map shows location near Africa for devices with no GPS

One of our users reported his location was shown for several minutes in the ocean near Africa until his device was able to get a location fix. Is it possible to filter 0, 0 as an invalid location and not show a marker on the map?

map_shows_africa_location

Missing tinygltfloader and tinygltf

Hi, I am trying to compile ATAK-CIV according to Simon's blogpost https://www.ballantyne.online/?p=117

However, in the last step in building 'assembleCivDebug' I get the following errors 'fatal error: tinygltfloader/tiny_gltf_loader.h: No such file or directory' referred in GLTFrenderer_v1.cpp. I downloaded tinygltfloader from syoyo's github repository. I then had a similar error for tiny_gltf.h referred in GLTFRenderer_v2.cpp. I downloaded tiny_gltf from syoyo's github repository.

I now do not have the missing header files error. However, I get the following error '/home/sibi/AndroidTacticalAssaultKit-CIV/atak/ATAKMapEngine/lib/src/main/cpp/c3dt/GLTFv1.cpp:42:70: error: 'struct tinygltfloader::Image' has no member named 'uri'

Am I downloading the wrong tiny_gltf and tiny_gltf_loader? How do I get the correct sources for the tinygltf library? Thanks a lot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.