mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-13 07:34:31 +00:00
[android] display info about available sockets on charging stations
This commit includes SVG icons of the sockets that are currently supported. This icons have been created for this specific occasion. Signed-off-by: Séverin Lemaignan <severin@guakamole.org>
This commit is contained in:
@@ -8,6 +8,7 @@ import androidx.annotation.Size;
|
||||
import app.organicmaps.sdk.api.ParsedRoutingData;
|
||||
import app.organicmaps.sdk.api.ParsedSearchRequest;
|
||||
import app.organicmaps.sdk.api.RequestType;
|
||||
import app.organicmaps.sdk.bookmarks.data.ChargeSocketDescriptor;
|
||||
import app.organicmaps.sdk.bookmarks.data.DistanceAndAzimut;
|
||||
import app.organicmaps.sdk.bookmarks.data.FeatureId;
|
||||
import app.organicmaps.sdk.bookmarks.data.MapObject;
|
||||
@@ -304,6 +305,8 @@ public class Framework
|
||||
|
||||
public static native String nativeGetActiveObjectFormattedCuisine();
|
||||
|
||||
public static native ChargeSocketDescriptor[] nativeGetActiveObjectChargeSockets();
|
||||
|
||||
public static native void nativeSetVisibleRect(int left, int top, int right, int bottom);
|
||||
|
||||
// Navigation.
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package app.organicmaps.sdk.bookmarks.data;
|
||||
|
||||
/**
|
||||
* represents the details of the socket available on a particular charging station
|
||||
*
|
||||
*/
|
||||
public record ChargeSocketDescriptor(String type, int count, double power) {}
|
||||
@@ -296,6 +296,11 @@ public class MapObject implements PlacePageData
|
||||
mMetadata.addMetadata(type, value);
|
||||
}
|
||||
|
||||
public boolean hasChargeSockets()
|
||||
{
|
||||
return !TextUtils.isEmpty(getMetadata(Metadata.MetadataType.FMD_CHARGE_SOCKETS));
|
||||
}
|
||||
|
||||
public boolean hasPhoneNumber()
|
||||
{
|
||||
return !TextUtils.isEmpty(getMetadata(Metadata.MetadataType.FMD_PHONE_NUMBER));
|
||||
|
||||
Reference in New Issue
Block a user