Skip to content

Commit 631224b

Browse files
Merge pull request #402 from heremaps/esd/42410
Update example apps for release 4.24.1.0
2 parents b3e445e + f7d54ca commit 631224b

File tree

149 files changed

+2234
-613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+2234
-613
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ For an overview of the existing features, please check the _Developer Guide_ for
2626

2727
> For now, HERE SDK (Navigate) is only available upon request. Please contact your HERE representative to receive access including a set of evaluation credentials.
2828
29-
## List of available example apps (Version 4.24.0.0)
29+
## List of available example apps (Version 4.24.1.0)
3030

3131
- [List of example apps for the HERE SDK for Android](https://www.here.com/docs/bundle/sdk-for-android-developer-guide/page/topics/examples.html).
3232
- [List of example apps for the HERE SDK for iOS](https://www.here.com/docs/bundle/sdk-for-ios-developer-guide/page/topics/examples.html).

examples/latest/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This folder contains the HERE SDK examples apps for version: 4.24.0.0
1+
This folder contains the HERE SDK examples apps for version: 4.24.1.0
22

33
- HERE SDK for Android ([Lite](lite/android/), [Explore](explore/android/), [Navigate](navigate/android/))
44
- HERE SDK for iOS ([Lite](lite/ios/), [Explore](explore/ios/), [Navigate](navigate/ios/))

examples/latest/explore/android/Java/MapItems/app/src/main/assets/SignTextNarrow.LICENSE

Lines changed: 153 additions & 0 deletions
Large diffs are not rendered by default.
Binary file not shown.

examples/latest/explore/android/Java/MapItems/app/src/main/java/com/here/mapitems/MapItemsExample.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import com.here.sdk.core.Rectangle2D;
3939
import com.here.sdk.core.Size2D;
4040
import com.here.sdk.gestures.TapListener;
41+
import com.here.sdk.mapview.AssetsManager;
4142
import com.here.sdk.mapview.LocationIndicator;
4243
import com.here.sdk.mapview.MapImage;
4344
import com.here.sdk.mapview.MapImageFactory;
@@ -75,6 +76,25 @@ public MapItemsExample(Context context, MapView mapView) {
7576
setTapGestureHandler();
7677

7778
Toast.makeText(context, "You can tap 2D markers.", Toast.LENGTH_LONG).show();
79+
80+
registerCustomFont();
81+
}
82+
83+
private void registerCustomFont() {
84+
// Register a custom font from the assets folder.
85+
// Place the font file in the "assets" directory.
86+
// Full path example: app/src/main/assets/SignTextNarrow_Bold.ttf
87+
// Adjust file name and path as appropriate for your project.
88+
String fontFileName = "SignTextNarrow_Bold.ttf";
89+
90+
// Make custom font assets available for use with MapImage.TextStyle.
91+
// "SignTextNarrow_Bold" is the font name which needs to be referenced when
92+
// creating a MapMarker, as shown in this example below.
93+
// Supported font formats can be found in the API Reference.
94+
// Use the asset folder or specify an absolute file path.
95+
// You can register multiple fonts with different names. Repeated registration with the same font name is ignored.
96+
AssetsManager assetManager = new AssetsManager(this.mapView.getMapContext());
97+
assetManager.registerFont("SignTextNarrow_Bold", fontFileName);
7898
}
7999

80100
public void showAnchoredMapMarkers() {
@@ -133,7 +153,9 @@ public void showMapMarkerWithText() {
133153
textStyleCurrent.getTextColor(),
134154
textOutlineSizeInPixels,
135155
textStyleCurrent.getTextOutlineColor(),
136-
placements
156+
placements,
157+
// The font name as registered via assetsManager.registerFont above. If an empty string is provided or the asses is not found, a default font will be used.
158+
"SignTextNarrow_Bold"
137159
);
138160
} catch (MapMarker.TextStyle.InstantiationException e) {
139161
// An error code will indicate what went wrong, for example, when negative values are set for text size.

examples/latest/explore/android/Kotlin/HelloMapKotlin/app/src/main/java/com/here/hellomapkotlin/PermissionsRequestor.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,6 @@ class PermissionsRequestor(private val activity: Activity) {
5858
if (permissions != null) {
5959
for (permission in permissions) {
6060
if (ContextCompat.checkSelfPermission(activity, permission) != PackageManager.PERMISSION_GRANTED) {
61-
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M
62-
&& permission == Manifest.permission.CHANGE_NETWORK_STATE) {
63-
// Exclude CHANGE_NETWORK_STATE as it does not require explicit user approval.
64-
// This workaround is needed for devices running Android 6.0.0,
65-
// see https://issuetracker.google.com/issues/37067994
66-
continue
67-
}
6861
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q &&
6962
permission == Manifest.permission.ACCESS_BACKGROUND_LOCATION) {
7063
continue

examples/latest/explore/android/Kotlin/MapItemsKotlin/app/src/main/assets/SignTextNarrow.LICENSE

Lines changed: 153 additions & 0 deletions
Large diffs are not rendered by default.

examples/latest/explore/android/Kotlin/MapItemsKotlin/app/src/main/java/com/here/mapitemskotlin/MapItemsExample.kt

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import com.here.sdk.core.Point2D
3232
import com.here.sdk.core.Rectangle2D
3333
import com.here.sdk.core.Size2D
3434
import com.here.sdk.gestures.TapListener
35+
import com.here.sdk.mapview.AssetsManager
3536
import com.here.sdk.mapview.LocationIndicator
3637
import com.here.sdk.mapview.MapImageFactory
3738
import com.here.sdk.mapview.MapMarker
@@ -58,7 +59,26 @@ class MapItemsExample(private val context: Context, private val mapView: MapView
5859
// Setting a tap handler to pick markers from map.
5960
setTapGestureHandler();
6061

61-
Toast.makeText(context, "You can tap 2D markers.", Toast.LENGTH_LONG).show();
62+
Toast.makeText(context, "You can tap 2D markers.", Toast.LENGTH_LONG).show()
63+
64+
registerCustomFont()
65+
}
66+
67+
private fun registerCustomFont() {
68+
// Register a custom font from the assets folder.
69+
// Place the font file in the "assets" directory.
70+
// Full path example: app/src/main/assets/SignTextNarrow_Bold.ttf
71+
// Adjust file name and path as appropriate for your project.
72+
val fontFileName = "SignTextNarrow_Bold.ttf"
73+
74+
// Make custom font assets available for use with MapImage.TextStyle.
75+
// "SignTextNarrow_Bold" is the font name which needs to be referenced when
76+
// creating a MapMarker, as shown in this example below.
77+
// Supported font formats can be found in the API Reference.
78+
// Use the asset folder or specify an absolute file path.
79+
// You can register multiple fonts with different names. Repeated registration with the same font name is ignored.
80+
val assetManager = AssetsManager(mapView.mapContext)
81+
assetManager.registerFont("SignTextNarrow_Bold", fontFileName)
6282
}
6383

6484
fun showAnchoredMapMarkers() {
@@ -117,7 +137,9 @@ class MapItemsExample(private val context: Context, private val mapView: MapView
117137
textStyleCurrent.textColor,
118138
textOutlineSizeInPixels,
119139
textStyleCurrent.textOutlineColor,
120-
placements
140+
placements,
141+
// The font name as registered via assetsManager.registerFont above. If an empty string is provided or the asses is not found, a default font will be used.
142+
"SignTextNarrow_Bold"
121143
)
122144
} catch (e: MapMarker.TextStyle.InstantiationException) {
123145
// An error code will indicate what went wrong, for example, when negative values are set for text size.

examples/latest/explore/flutter/camera_app/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@
343343
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
344344
GCC_WARN_UNUSED_FUNCTION = YES;
345345
GCC_WARN_UNUSED_VARIABLE = YES;
346-
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
346+
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
347347
MTL_ENABLE_DEBUG_INFO = NO;
348348
SDKROOT = iphoneos;
349349
SUPPORTED_PLATFORMS = iphoneos;
@@ -366,7 +366,7 @@
366366
"$(PROJECT_DIR)/Flutter",
367367
);
368368
INFOPLIST_FILE = Runner/Info.plist;
369-
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
369+
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
370370
LD_RUNPATH_SEARCH_PATHS = (
371371
"$(inherited)",
372372
"@executable_path/Frameworks",
@@ -430,7 +430,7 @@
430430
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
431431
GCC_WARN_UNUSED_FUNCTION = YES;
432432
GCC_WARN_UNUSED_VARIABLE = YES;
433-
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
433+
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
434434
MTL_ENABLE_DEBUG_INFO = YES;
435435
ONLY_ACTIVE_ARCH = YES;
436436
SDKROOT = iphoneos;
@@ -479,7 +479,7 @@
479479
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
480480
GCC_WARN_UNUSED_FUNCTION = YES;
481481
GCC_WARN_UNUSED_VARIABLE = YES;
482-
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
482+
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
483483
MTL_ENABLE_DEBUG_INFO = NO;
484484
SDKROOT = iphoneos;
485485
SUPPORTED_PLATFORMS = iphoneos;
@@ -504,7 +504,7 @@
504504
"$(PROJECT_DIR)/Flutter",
505505
);
506506
INFOPLIST_FILE = Runner/Info.plist;
507-
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
507+
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
508508
LD_RUNPATH_SEARCH_PATHS = (
509509
"$(inherited)",
510510
"@executable_path/Frameworks",
@@ -536,7 +536,7 @@
536536
"$(PROJECT_DIR)/Flutter",
537537
);
538538
INFOPLIST_FILE = Runner/Info.plist;
539-
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
539+
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
540540
LD_RUNPATH_SEARCH_PATHS = (
541541
"$(inherited)",
542542
"@executable_path/Frameworks",

0 commit comments

Comments
 (0)