I have been trying to set up a web bridge connection to an Android app.
I managed to get it working on iOS, so my setup in the web-app part seems to be working correctly.
Using Adjust Android SDK & web bridge version 4.38.5.
The build.gradle file has these 2 dependencies added:
So far, so good.
Then on the web-app side, I have:
const adjustAppToken = ********;
const environment = AdjustConfig?.EnvironmentProduction;
const adjustConfig = new AdjustConfig(adjustAppToken, environment);
adjustConfig?.setLogLevel(AdjustConfig.LogLevelVerbose);
// Track app did launch
if (platform === 'ios') {
Adjust.appDidLaunch(adjustConfig); // iOS
}
if (platform === 'android') {
Adjust.onCreate(adjustConfig); // Android
}
However, when I now check and debug my webview_bridge.js file (on the web-app side, where I handle the connection), both Adjust and AdjustConfig are undefined when checking them in the Chrome devtools console.
Only AdjustBridge returns an object with methods.
So it can't create a config, and it can't execute Adjust.onCreate.
I have checked the debugger, and it does have AdjustBridge, and I can call AdjustBridge.onCreate, but creating the config still doesn't work, as AdjustConfig is an undefined object.
So in short, Adjust never initialises properly.
Since Android SDK 4.33.0, the requires javascript files are supposedly embedded in the JAR itself, so I suppose I don't need to add them to the HTML document either right? Also, since it does seem to recognise AdjustBridge as an object with methods, it would seem the setup is done correctly.
What am I missing?
Or are there still bugs with the embedded javascript files?
Hi,
I have been trying to set up a web bridge connection to an Android app. I managed to get it working on iOS, so my setup in the web-app part seems to be working correctly.
Using Adjust Android SDK & web bridge version 4.38.5.
The
build.gradle
file has these 2 dependencies added:In my activity, I have the following lines, after setting up the webView:
So far, so good. Then on the web-app side, I have:
However, when I now check and debug my
webview_bridge.js
file (on the web-app side, where I handle the connection), bothAdjust
andAdjustConfig
are undefined when checking them in the Chrome devtools console. OnlyAdjustBridge
returns an object with methods. So it can't create a config, and it can't executeAdjust.onCreate
.I have checked the debugger, and it does have
AdjustBridge
, and I can callAdjustBridge.onCreate
, but creating the config still doesn't work, asAdjustConfig
is an undefined object. So in short, Adjust never initialises properly.Since Android SDK 4.33.0, the requires javascript files are supposedly embedded in the JAR itself, so I suppose I don't need to add them to the HTML document either right? Also, since it does seem to recognise
AdjustBridge
as an object with methods, it would seem the setup is done correctly.What am I missing? Or are there still bugs with the embedded javascript files?
Thanks. Wes