Code Monkey home page Code Monkey logo

locus-api's Introduction

API, core API, Android API, Android

Current version | Structure | What does it do? | What it isn't | Quick start

Locus API

Library for Locus Map application for Android devices.

Current version

Latest stable LT version: 0.9.55 Available versions on the maven repository: here.

How to update to new 0.9.x version? More about it here.

Structure

Whole API is divided into two separate parts:

  • library written in pure Java - Locus API - Core
  • its extension for Android devices - Locus API - Android

In most cases, Android version is the only interesting one here.

What does it do?

  • main purpose is a transport tool for various objects (points/tracks)
  • allows to check state of certain functions like periodic updates, units defined by user and more
  • allows to control track recording and partially also navigation features
  • allows to handle field notes completely
  • allows to generate map preview of a certain area & zoom level

What it isn't

  • a replacement for Google Maps API or other map library that substitutes map core to your own application
  • a standalone library that may work without Locus Map application

For creating Locus Map add-ons it is needed to handle only Locus API - Android library. Locus API is automatically added as dependency.

Quick start

Add JitPack repository to your root build.gradle module config. This is currently necessary for the internal logger dependency.

allprojects {
  repositories {
    maven(url = "https://jitpack.io")
  }
}

Add dependency to your build.gradle module config

dependencies {
     // get Locus API (Java only)
     implementation('com.asamm:locus-api-core:[latest]')
     
     // or Locus Android API (for Android apps)
     implementation('com.asamm:locus-api-android:[latest]')
}

Check for sample use-cases in Locus API - Android sample project.

New version release steps

  1. Raise version in the gradle.properties
    • API_CODE
    • API_VERSION
  2. update version also in this "README" file (line 19)
  3. update "CHANGELOG" news file
  4. commit changes to GitHub
  5. tag commit with "Locus_API_X.X.X" pattern to trigger publishing of the "Core" module
  6. wait approx 15 minutes till version will be available on the Maven, alternative check here
  7. tag commit with "Locus_API_Android_X.X.X" pattern to trigger publishing of the "Android" module
  8. after another 15+ minutes, it should be available as well

locus-api's People

Contributors

arcao avatar bekuno avatar janaton avatar jspricke avatar menion 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

Watchers

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

locus-api's Issues

getMapPreview() dops an exception

ActionTools::getMapPreview() drops an exception at line "byte[] data = cursor.getBlob(1);" in the second round when i=1.

This code work for me (but not sure that correct):

		for (int i = 0; i < cursor.getCount(); i++) {
			cursor.moveToPosition(i);
			//String key = new String(cursor.getBlob(0));

			if (cursor.getType(1) == FIELD_TYPE_BLOB)
				img = cursor.getBlob(1);
			else
				if (cursor.getType(1) == FIELD_TYPE_INTEGER)
					notYetLoadedTiles = cursor.getInt(1);

			/*if (key.equals(LocusConst.VALUE_MAP_PREVIEW)) {
				img = data;
			} else if (key.equals(LocusConst.VALUE_MAP_PREVIEW_MISSING_TILES)) {
				notYetLoadedTiles = Utils.parseInt(new String(data));
			}*/
		}

Parallel Useage of Locus Map Classic and Locus Map 4 - which is in foreground?

I don't know why, but every week more users with multiple installed versions complain about having trouble with the API because getActiveVersion did select the wrong version.

I would like to implement a reminder for all users who have installed both versions.
With getVersions and isRunning I know which users should get the reminder to select the correct version.

If both versions are running, how can we detect which of them is in the foreground? It would be ok if the function is expensive because I remind only once per session. If the command target package matches the foreground application user did everything right and don't need a reminder. But if the command target package miss matches the application and user did not specifically define a target package, user should get a reminder to set the target package.

How can we detect which of both apps are in foreground?
It would also be ok if you don't add the foreground check to the API. I just want to know which method is the most stable to detect which of both versions is currently used. (Both versions are running because users are lazy and don't close old applications)

error with Point class after change to version 0.9.50

Whenn using version 0.9.50 of the locus-api we get error like

14:58:50  /home/jenkins/slave/workspace/cgeo-CI_PR-build/main/src/main/java/cgeo/geocaching/apps/AbstractLocusApp.java:256: error: cannot find symbol
14:58:50          p.setParameterDescription(
14:58:50           ^
14:58:50    symbol:   method setParameterDescription(String)
14:58:50    location: variable p of type Point

See cgeo/cgeo#13985
(https://ci.cgeo.org/job/cgeo-CI_PR-build/5294/console)

I know, that this is result of the
- separating extensions to Point & Track into separate helper class

But I found no way to access the method in the helper class.
Please check it and/or guide me how to access now this method.

What is the Intent String for Locus File picker?

Hi,

would be nice to use a file picker in Locus design. This method comment told that there should be a locus file picker

* Allows to call activity for File pick. You can use Locus picker for this purpose, but
* check if Locus version 231 and above are installed **isLocusAvailable(context, 231)**!

but I did only find the location picker https://github.com/asamm/locus-api/blob/master/locus-api-android/src/main/java/locus/api/android/utils/LocusConst.java#L112

Or does this method use Locus file picker and the comment tells that it just does not work below API Version 231? I'm a little bit confused because in other methods you did use throw RequiredVersionMissingException instead of placing a comment.

Result handling looks very special, too.


Requestcode 0 for file and 1 for directories. Nice to have this example.

Why does the sample app Query permission not match to API package list?

<queries>
<package android:name="menion.android.locus" />
<package android:name="menion.android.locus.pro" />
<package android:name="menion.android.locus.free.amazon" />
<package android:name="menion.android.locus.pro.amazon" />
</queries>

private val packageNames: Array<String>
get() = arrayOf(
"menion.android.locus",
"menion.android.locus.free.amazon",
"menion.android.locus.free.samsung",
"menion.android.locus.pro",
"menion.android.locus.pro.amazon",
"menion.android.locus.pro.asamm",
"menion.android.locus.pro.computerBild")

How does is new map center and is new zoom work?

Do these 2 api fields actually work?
I don't need them I would just point to them because they don't work without periodicUpdate.

After you did remove periodicUpdate they may should be removed too.

Why is it possible to disable animation of map_move_zoom

What is the purpose of map_move_zoom?

I guess it is used to animate the action because the old tasks don't support animation, or are the old tasks animated by default?

What is the difference between map_move_zoom and the old actions if you disable animation?

GetTemperatue returns 0

I tried to get temperature value using Tasker's Locus Map Tasker Plugin .

Of course in LocauMap4, it shows temperatures well in Sensor Manager.

In Tasker, all other sensor values are gotten well, but tempeature is 0 all the time.

So I doubt the missing part may be in Locus Map itself, not Tasker plugin or LocusMap API.

I'm not sure this place is for this problem. Anyway, I'd like to notify this problem.

Thanks.

How to return to Locus after INTENT_ITEM_TRACK_TOOLS?

Hi

Locus Map does open my main activity and my TRACK_TOOLS activity. After finish() activity it will close the TRACK_TOOLS activity but my main activity is still open.

Before I do implement a way to close my main activity after TRACK_TOOLS activity finish I would like to know if this is the correct approach.

Do I have to close my main activity by my self or should locus maps only open TRACK_TOOLS activity and don't open my main activity?

make locus.api.objects.extra.Location non final

In WhereYouGo the implementation of class menion.android.whereyougo.geo.location.Location was realized with
public class Location extends locus.api.objects.extra.Location {.
(see https://github.com/cgeo/WhereYouGo/blob/master/src/main/java/menion/android/whereyougo/geo/location/Location.java)
(change to inherit in this way was in cgeo/WhereYouGo@aece42d)

To make a switch easy to implementation 'com.asamm:locus-api-android:0.9.21'(from 0.2.7) it would be fine if Location is non final.

Live_tracking broadcast issue

Hi!
I am trying to turn on / off live tracking via Tasker.
Broadcast
tasks: { live_tracking_asamm: { action: "start" } }
does not work,
but
tasks: { live_tracking_asamm: { action: "stop" } }
works as expected.
For live tracking, I have a single configuration with my own group.
Locus 3.51.3 Pro, Android 11.
Regards!

How to find the via point in track?

Is there a way to find the via point in the track?

We still don't have remaining elevation, so I have an extended update container which does check at which position in track the current navpoint is located.

If I found the point, I can roughly calculate the remaining elevation to the navigation target.

I would like to extend it by roughly calculate the remaining elevation to the next via point if you don't plan to implement remaining elevation as dashboard value for classic.

I did check if I can do the same "find nav point in track point list" where I compare the location with point locations based on this data

But the new via point doesn't have a location and I am not sure if we can find via points in the track object: https://github.com/asamm/locus-api/blob/82d0b51472dc71420df0fea23280cb34dc97ee8c/locus-api-core/src/main/java/locus/api/objects/geoData/Track.kt

By the way, I could use equal operator for comparing navigation track floating point values with the guideNavPoint1Loc field which did speed up the code because I guess you did share the same floating point base and exponent across guideNavPoint1Loc and Track.points :)

points = dr.readListStorable(Location::class.java)

Switch map in single click

I'd like to have buttons on dashboard (button per map) for more quick map switch. Is there any api for it?

feature request : return with one click

In a number of use cases one has to go deep down through several layers of menus before
a) making or undoing a temporary change (e.g. in settings), or
b) before finding some information (e.g. on a point or track).
Next you want to go back to where you were before (e.g. route planning). This "going back" does currently (LM Classic 3.64.0) require you to do again some 3-5 point/click commands (often back arrow on the top left).

It would be great if one had just one "all the way back" button, ideally to the funciton last invoked, otherwise at least to the map screen. Great time saver, and helps you maintain your patience with little screens on Android.
BTW, Tom-Tom navigators have had this button for a long time - proof that it is useful.

sources jar is missing

Please could you add a sources.jar? We would like to have at least java doc.

It is very painfull to manually assign a git repo as source for your api artefact.
I thought about importing your repo as project and add the sources task by my self just to be able to add it to my local repository.

Kind Regards

Import waypoint + start navigation/guidance

Hi,
I'm currently looking into some Wear OS development and want to send a geocache to Locus (ActionDisplayPoints.sendPacksFile) and then start guidance / navigation (ActionTools.actionStartNavigation) to that point right away. Of course I could send these two intents right after another, but then Locus navigates to a point at these coordinates, not to the geocache as it does when manually selecting the point created by ActionDisplayPoints
Would be great for sendPacksFile to accept an additional extra "action" with values for navigate/guide.

Routing across Lv3 / Lv4 map boundary fails

If a user has 2 Lomaps on his device, one of them Lv3 and the adjacent one Lv4, offline routing across the boundary of the two maps with Brouter (departure in the Lv3 map area, arrival in the Lv4 map area) does no work. Please ask if you need more details, or examples.

Use content URI for sendPacksFile and sendPacksFileSilent

The ActionDisplayPoints.sendPacksFile(...) and ActionDisplayPoints.sendPacksFileSilent(...) methods use direct file access to save PackPoints for Locus Map. Unfortunately this require XXX_EXTERNAL_STORAGE permissions for both Locus Map and the add-on app. Even though both has the permission, it still may not work if the file is saved in the wrong path (some Android device points Environment.getExternalStorageDirectory() to inaccessible place).

Today the correct way is to use FileProvider which safely share the file content via ContentProvider. For more, see Sharing files in Android documentation.

Thus it would be great if ActionDisplayPoints.sendPacksFile(...) and ActionDisplayPoints.sendPacksFileSilent(...) methods used this.

Note: If you decide to implement it, please be careful of back compatibility if older Locus Map is installed.

Broken logger dependency since version 0.9.50

Compile in Android Studio cannot find dependency "logger-asamm:2.2" required since version "com.asamm:locus-api-android:0.9.50"
Maven link from your README.md (https://repo1.maven.org/maven2/com/asamm/) only provides "logger:1.1" instead of "logger-asamm:2.2"

Also see dependabot branch https://github.com/siggel/coordinatejoker/tree/dependabot/gradle/com.asamm-locus-api-android-0.9.50 which tried an automatic update from 0.9.49 to 0.9.50. Its automated build broke with:

  [2023-10-21 22:16:38] [autobuild] Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.github.asamm:logger-asamm:2.2.
  [2023-10-21 22:16:38] [autobuild] Searched in the following locations:
  [2023-10-21 22:16:38] [autobuild]   - https://dl.google.com/dl/android/maven2/com/github/asamm/logger-asamm/2.2/logger-asamm-2.2.pom
  [2023-10-21 22:16:38] [autobuild]   - https://repo.maven.apache.org/maven2/com/github/asamm/logger-asamm/2.2/logger-asamm-2.2.pom
  [2023-10-21 22:16:38] [autobuild] Required by:
  [2023-10-21 22:16:38] [autobuild]     project :app > com.asamm:locus-api-android:0.9.50 > com.asamm:locus-api-core:0.9.50

GeocachingData.CACHE_SIZE_VIRTUAL - missing implementation

With commit a9398e0 the val CACHE_SIZE_VIRTUAL was introduced.
Many thanks.

But there is no implementation in

and .

We use the method in c:geo https://github.com/cgeo/cgeo/blob/17fc62275e1599437c514833c01d17b4a235c078/main/src/main/java/cgeo/geocaching/apps/AbstractLocusApp.java#L182 .

Brouter issue caused by Locus

I am using Brouteron Andoird to do offline routing with Locus Map classic (v3.68.1). It works perfectly fine, finding the routes and providing the correct distances etc. However the times calculated and displayed (time needed to drive for example 50km down a simple road without intersections, villages etc) are about 2x too long. I clarified with the Brouter dev, and it seems that is has to do with the profiles used by LM, AND NOT with the implementation of the router.
Now, these profiles I cannot find in the Locus Map directory, nor can I edit or correct them. But they seem to come with a very low max speed setting (at least for cars and motorcycles on certain roads).
For a better example please go to Github > Brouter > issues.
With no settings the user can change, I have to consider this a bug in LM.

ActionDisplayPoints sendPacksFile - fileUri not everywhere optional

In the implementing function the parameter fileUri is optional:

private fun sendPacksFile(action: String, ctx: Context, lv: LocusUtils.LocusVersion,
            data: List<PackPoints>, file: File, fileUri: Uri?, ....

(Line 261)

This method is called in line 105 and 240, but not defined as optional:

    fun sendPacksFile(ctx: Context, lv: LocusUtils.LocusVersion,
            data: List<PackPoints>, file: File, fileUri: Uri, extraAction: ExtraAction): Boolean {
        return sendPacksFile(LocusConst.ACTION_DISPLAY_DATA,
                ctx, lv, data, file, fileUri,
                extraAction == ExtraAction.IMPORT,
                extraAction == ExtraAction.CENTER)
    }
    fun sendPacksFileSilent(ctx: Context, lv: LocusUtils.LocusVersion,
            data: List<PackPoints>, file: File, fileUri: Uri, centerOnData: Boolean): Boolean {
        return sendPacksFile(LocusConst.ACTION_DISPLAY_DATA_SILENTLY,
                ctx, lv, data, file, fileUri,
                false, centerOnData)
    }

Broadcast receivers can't receive implicit intents on Android 8.0.0 (Android O)

Hello,

In Android 8.0.0 (Android O) was introduced broadcast limitation which breaks any implicit broadcasts between two apps.

Fortunately explicit broadcast (broadcast which sent to specific receiver - has to be filled package name and class name in broadcast intent) works. So quick solution is to query broadcast receivers with package manager and in a loop send the intent to specific broadcast receiver.

Here is compatibility implementation for sendBroadcast which works for Android 8.0.0 (Note: Implicit broadcast can be somehow disabled since Android 7 /API 24/, thus this code use queryBroadcastReceivers for API 24 and up)

  public static void sendBroadcastCompat(Context context, Intent intent) {
        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
            context.sendBroadcast(intent);
            return;
        }
        
        Intent broadcastIntent = new Intent(intent);    
        PackageManager pm = context.getPackageManager();
        
        List<ResolveInfo> broadcastReceivers  = pm.queryBroadcastReceivers(broadcastIntent, 0);
        for(ResolveInfo info : broadcastReceivers) {
            broadcastIntent.setClassName(info.activityInfo.packageName, info.activityInfo.name);
            context.sendBroadcast(broadcastIntent);
        }
    }

Lomap Lv4 issue

I am using multiple Lomaps of France (Lv3) which I do not plan to update, switching between them (manually or when you move from one map area to another) has never caused problems. The setting in LM Classic 3.68 under settings > maps > offline maps > has always been "automatic map loading".
Recently I purchased two more Lomaps shown in the maps list as Lv4. And there are two issues with that, which I report here as a locus-api bug.

  1. the map loading with these new maps is very slow (compared to earlier Lv3 maps)
  2. the automatic map switching (when going to or coming from a neighboring Lv3 map) does not work.

I assume it is a bug, but if this is the wrong place to report it here. please DO NOT just close the issue, but let me know where to report it.

LocusInfo() ctor to public

Please modify the constructor of LocusInfo() to public as was before in version 0.2.6, because protected ctor causes exception in storable read:

java.lang.IllegalAccessException: void locus.api.android.utils.LocusInfo.() is not accessible from java.lang.Class<locus.api.objects.Storable>
at locus.api.objects.Storable.read(Storable.java:286)

Action Task Map Zoom Value does not match

Zoom Value used at action task map_zoom

https://github.com/asamm/locus-api/wiki/Action-tasks-(Broadcasts)#map_zoom

doesn't match to UpdateContainer mapZoomLevel

/**
* Current map zoom level. This value should not be precise in case of using
* custom map projections, anyway it's always closest possible value.
*
* @return integer as a current zoom level (zoom 8 == whole world (1 tile 256x256px))
*/
var mapZoomLevel: Int = -1

Is there a reason why map_zoom level 28 results into UpdateContainer mapZoomLevel 20?
And map_zoom value 28 is out of range according to https://github.com/asamm/locus-api/wiki/Action-tasks-(Broadcasts)#map_zoom

It is not importand, I just wanted to tell you that there is a mismatch.

I did test it with the Locus Map 4 (don't remember which version it was)

Ability to store image to geocache folder

Hi, as and owner of addon Satellite Images(https://play.google.com/store/apps/details?id=cz.jerabekjakub.locusaddon.offlinegooglemaps&hl=en_US&gl=US) I'm facing new privacy regulations from Google. Since Android 12 I'm not able to store downloaded satellite images and html page displaying them to geocache folder (Android_data/menion.android.locus.pro/files/Locus/data/geocaching/...).

Is there any other way how to provider satellite images to user in cache detail screen? Thank you.

leaks some kotlin related dependencies

When trying to upgrade from 0.2.15 to anything more recent, the cgeo build fails due to undeclared kotlin related dependencies:

Warning: locus.api.android.ActionMapTools: can't find referenced class kotlin.Metadata
Warning: locus.api.android.ActionMapTools$Companion: can't find referenced class kotlin.jvm.internal.Intrinsics
Warning: locus.api.android.ActionMapTools$Companion: can't find referenced class kotlin.jvm.internal.Intrinsics
Warning: locus.api.android.ActionMapTools$Companion: can't find referenced class kotlin.jvm.internal.Intrinsics
Warning: locus.api.android.ActionMapTools$Companion: can't find referenced class kotlin.text.Charsets
Warning: locus.api.android.ActionMapTools$Companion: can't find referenced class kotlin.text.Charsets
Warning: locus.api.android.ActionMapTools$Companion: can't find referenced class kotlin.jvm.internal.Intrinsics
Warning: locus.api.android.ActionMapTools$Companion: can't find referenced class org.jetbrains.annotations.Nullable
Warning: locus.api.android.ActionMapTools$Companion: can't find referenced class org.jetbrains.annotations.NotNull
Warning: locus.api.android.ActionMapTools$Companion: can't find referenced class org.jetbrains.annotations.NotNull
Warning: locus.api.android.ActionMapTools$Companion: can't find referenced class org.jetbrains.annotations.NotNull
Warning: locus.api.android.ActionMapTools$Companion: can't find referenced class kotlin.jvm.internal.DefaultConstructorMarker
Warning: locus.api.android.ActionMapTools$Companion: can't find referenced class kotlin.jvm.internal.DefaultConstructorMarker
Warning: locus.api.android.ActionMapTools$Companion: can't find referenced class kotlin.Metadata
Warning: locus.api.android.ActionMapToolsKt: can't find referenced class org.jetbrains.annotations.NotNull
Warning: locus.api.android.ActionMapToolsKt: can't find referenced class kotlin.Metadata
Warning: locus.api.android.MapPreviewParams: can't find referenced class org.jetbrains.annotations.Nullable
Warning: locus.api.android.MapPreviewParams: can't find referenced class org.jetbrains.annotations.Nullable
Warning: locus.api.android.MapPreviewParams: can't find referenced class org.jetbrains.annotations.Nullable
Warning: locus.api.android.MapPreviewParams: can't find referenced class org.jetbrains.annotations.NotNull
Warning: locus.api.android.MapPreviewParams: can't find referenced class kotlin.Metadata
Warning: locus.api.android.MapPreviewResult: can't find referenced class kotlin.jvm.internal.Intrinsics
Warning: locus.api.android.MapPreviewResult: can't find referenced class kotlin.jvm.internal.Intrinsics
Warning: locus.api.android.MapPreviewResult: can't find referenced class org.jetbrains.annotations.Nullable
Warning: locus.api.android.MapPreviewResult: can't find referenced class org.jetbrains.annotations.NotNull
Warning: locus.api.android.MapPreviewResult: can't find referenced class org.jetbrains.annotations.NotNull
Warning: locus.api.android.MapPreviewResult: can't find referenced class org.jetbrains.annotations.Nullable
Warning: locus.api.android.MapPreviewResult: can't find referenced class kotlin.Metadata
Warning: there were 28 unresolved references to classes or interfaces.

To me that looks like you are having a new dependency, which also needs to be declared by all clients, in addition to the dependency on your library. Can you please document that dependency in the installation instructions?

Sensor Speed vs GPS Speed

I did start to copy your java doc into my tasker plugin as field descriptions. For me, it is not clear which speed variable does represent which speed value.

This does sound like GPS speed:

* Speed of the device over ground in meters/second. If hasSpeed() is false,
* 0.0f is returned (in m/s).
*/
var speed: Float

But on the other hand this description does mention the "fix"

* Speed of the fix in meters per sec. If hasSensorSpeed() is false, 0.0 is returned.
*/
var sensorSpeed: Float

So now I'm not sure which of them is the Bike Speed Sensor and which is the NMEA speed. Or do you calculate speed and ignore the NMEA reported value?

Api does not work, when targetting android version 30

When targetting android sdk 30 the API will fail.
This is because pm.getPackageInfo() gets filtered by default.

This can be solved by adding

<queries>
        <package android:name="menion.android.locus"/>
        <package android:name="menion.android.locus.free.amazon"/>
        <package android:name="menion.android.locus.free.samsung"/>
        <package android:name="menion.android.locus.pro"/>
        <package android:name="menion.android.locus.pro.amazon"/>
        <package android:name="menion.android.locus.pro.asamm"/>
        <package android:name="menion.android.locus.pro.computerBild"/>
</queries>

into the manifest.

Documentation for Map Zoom values

According to the last update: #37

We got the following range: [0-24] where 0 is the whole world.

How does it work with the new action "map_move_zoom"?

  • it does not have +/- options
  • value range of new action [1;22] does not match to the old command
  • why is the default value of map_move_zoom 0?

How does map_move_zoom work if you want to avoid zooming and define a move only task like "move diagonal"?
According to the old documentation, it would zoom to "whole world" because non defined zoom value defaults to 0 and 0 means whole world.

I don't understand the use case of zooming and moving at the same time, so I am not sure why this API should deal with the hassle of "how to define a movement without zoom". Maybe it is more easy to exclude zooming and add the animate command to the old map zoom?

unexpected startup delay

After upgrade form classic 3.67 to 3.68 Locus Map hangs about 15 seconds when it is started (under Android 8). This happens when the startup screens shows about 67% - 69% progress. Cleaning up caches has not helped. But going back to 3.67 (without changing anything else : same files, directories, maps, etc.) and the problem is gone. Not a dramatic bug, but it is annoying and seems unnecessary.

Error in call lastIndexOf in class GeocachingAttribute

I try to implement the attribute mapping from c:geo to locus, so you can see the cache in locus with attributes.
Therfore I need to use the secondary constructor constructor(url: String) : this() in the class GeocachingAttribute().

If I understand the documentation right than the constructor needs to be annotated with @JvmOverloads to be accessible in java.
See https://kotlinlang.org/docs/java-to-kotlin-interop.html#overloads-generation .

I hope that this is the correct way.

Get point by name not working

If I use this function in my own code, cursor is always null.

Then I did compile sample application and same issue there: https://github.com/Falcosc/locus-api/blob/911297c0753b6521c87711d6fc4bf43274fc7420/locus-api-android-sample/src/main/java/com/asamm/locus/api/sample/utils/SampleCalls.kt#L374

Always empty

But if I install sample application from play store, it does work fine.

My point name is "name" and play store example returns Id [1163]

But if I compile the sample with current android studio in debug mode without any modification, it won't work and alertdialog returns []

Did I need to change anything in android studio or is this not working on debug builds?

Kind regards
Falco

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.