We have a query regarding UWP as outlined

Jay 80 Reputation points
2024-09-23T05:27:40.56+00:00

We have a client query regarding UWP as outlined below:

Utilize the UWP API to expose Geolocation functions for use within Java through JNI. Prepare a resulting DLL and a JNI wrapper to be used in a Java application.

Our team encountered a set of restrictions and limitations while trying to expose the Geolocator from the Windows.Devices.Geolocation API to the JNI layer. Some of the challenges are as follows:

  • Requesting geolocation permissions seems to be possible only from the UI thread of a UWP application.
  • Interoperability constraints between managed and unmanaged C++ code.
  • Packaging a standalone DLL to be loaded via JNI.

The main goal is to receive geolocation updates from the Geolocator in a Java application. JNI appears to be the most viable option in our opinion, but we welcome alternative approaches (e.g., a WinRT component communicating with the Java app, a UWP console app launched from Java to receive updates, or any other valid solution).

Thank you.

Universal Windows Platform (UWP)
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.