Skip to content

Commit

Permalink
Merge pull request #2 from ncuillery/patch-1
Browse files Browse the repository at this point in the history
Second try
  • Loading branch information
adrienthiery authored Dec 8, 2017
2 parents 67fb7ff + 311aef1 commit 85cac4b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<ContainerHolder> pending = mTagManager.loadContainerPreferFresh(containerId, containerAssetId);
pending.setResultCallback(new ResultCallback<ContainerHolder>() {
@Override
Expand Down

0 comments on commit 85cac4b

Please sign in to comment.