From 311aef17d2fe5f55caaf208c24230ae33a38ff62 Mon Sep 17 00:00:00 2001 From: Nicolas Cuillery Date: Fri, 8 Dec 2017 10:33:58 -0500 Subject: [PATCH] Second try --- .../GoogleAnalyticsBridge/GoogleTagManagerBridge.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/android/src/main/java/com/idehub/GoogleAnalyticsBridge/GoogleTagManagerBridge.java b/android/src/main/java/com/idehub/GoogleAnalyticsBridge/GoogleTagManagerBridge.java index 3d5c1a5a..bd1be0e5 100644 --- a/android/src/main/java/com/idehub/GoogleAnalyticsBridge/GoogleTagManagerBridge.java +++ b/android/src/main/java/com/idehub/GoogleAnalyticsBridge/GoogleTagManagerBridge.java @@ -59,11 +59,12 @@ public void openContainerWithId(final String containerId, final Promise promise) } TagManager mTagManager = TagManager.getInstance(getReactApplicationContext()); - //using -1 here because it can't access raw in app openOperationInProgress = true; + + // Container retrieval. We can't use the R variable because this dep is compile BEFORE the R class generation Resources res = mContext.getResources(); - int containerAssetId = res.getIdentifier("gtm-container", "raw", mContext.getPackageName()); - Log.i("com.analytics", Integer.toString(containerAssetId)); + int containerAssetId = res.getIdentifier("gtmcontainer", "raw", mContext.getPackageName()); + Log.i("GoogleTagManager", "Resource retrieved : " + Integer.toString(containerAssetId)); PendingResult pending = mTagManager.loadContainerPreferFresh(containerId, containerAssetId); pending.setResultCallback(new ResultCallback() { @Override