File tree Expand file tree Collapse file tree
android/src/main/java/com/google/android/react/navsdk
ios/react-native-navigation-sdk Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020import com .facebook .react .module .model .ReactModuleInfo ;
2121import com .facebook .react .module .model .ReactModuleInfoProvider ;
2222import com .facebook .react .uimanager .ViewManager ;
23+ import com .google .android .libraries .navigation .NavigationApi ;
2324import java .util .ArrayList ;
2425import java .util .HashMap ;
2526import java .util .List ;
2829@ DoNotStrip
2930public class Package extends BaseReactPackage {
3031
32+ static {
33+ NavigationApi .addInternalUsageAttributionId (SdkVersion .ATTRIBUTION_ID );
34+ }
35+
3136 @ Override
3237 public List <ViewManager > createViewManagers (ReactApplicationContext reactContext ) {
3338 List <ViewManager > viewManagers = new ArrayList <>();
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2026 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package com .google .android .react .navsdk ;
18+
19+ /** SDK version constants for internal usage attribution. */
20+ public final class SdkVersion {
21+ public static final String VERSION = "0.15.1" ; // {x-release-please-version}
22+
23+ public static final String ATTRIBUTION_ID = "gmp_git_reactnativenavigationsdk_v" + VERSION ;
24+
25+ private SdkVersion () {}
26+ }
Original file line number Diff line number Diff line change 1515 */
1616
1717#import " NavModule.h"
18+ #import < GoogleMaps/GoogleMaps.h>
1819#import " NavAutoModule.h"
1920#import " NavViewModule.h"
2021#import " ObjectTranslationUtil.h"
22+ #import " SdkVersion.h"
2123
2224using namespace JS ::NativeNavModule;
2325
@@ -50,6 +52,9 @@ + (id)allocWithZone:(NSZone *)zone {
5052 static dispatch_once_t onceToken;
5153 dispatch_once (&onceToken, ^{
5254 sharedInstance = [super allocWithZone: zone];
55+ NSString *attributionId =
56+ [NSString stringWithFormat: @" gmp_git_reactnativenavigationsdk_v%@ " , kRNNavSdkVersion ];
57+ [GMSServices addInternalUsageAttributionID: attributionId];
5358 });
5459 return sharedInstance;
5560}
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2026 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ #import < Foundation/Foundation.h>
18+
19+ static NSString *const kRNNavSdkVersion = @" 0.15.1" ; // x-release-please-version
Original file line number Diff line number Diff line change 88 "packages" : {
99 "." : {
1010 "package-name" : " @googlemaps/react-native-navigation-sdk" ,
11- "changelog-path" : " CHANGELOG.md"
11+ "changelog-path" : " CHANGELOG.md" ,
12+ "extra-files" : [
13+ " android/src/main/java/com/google/android/react/navsdk/SdkVersion.java" ,
14+ " ios/react-native-navigation-sdk/SdkVersion.h"
15+ ]
1216 }
1317 }
1418}
You can’t perform that action at this time.
0 commit comments