Hello,
We are trying to implement the mobile ADK for Android (on dynaTrace 6.0.7000). Therefore we added the adk jar file (dynatrace-mobile-adk-7.0.0.1\Android\adk\) and the JavaScript file (CompuwareUEM.js). In the javascript code of our app, we added CompuwareUEM methods like enterAction, LeaveAction, ... . In the java code we added CompuwareUEM.registerWebView.
When we debug the app, while trying to connect to dynaTrace we get an error (null) on the object 'CpwrUemAndroidADK' in the method 'leaveAction’.
TypeError: Object [object Object] has no method 'leaveAction'",
source: file:///android_asset/www/CompuwareUEM.js (172)
In which file is this object being made? Because we don't find where the instance is made.
Regards,
Jurgen
Answer by Rajesh J. ·
Jurgen
The CompuwareUEM javascript object is not getting created hence you are getting this error.
Just a few things to go over.
dynatrace-mobile-adk-<VERSION>.<BUILD>.zip
to a directory of your choice.CompuwareUEM.jar
to the classpath of your project´s build path. libs
folder.com.compuware.android.ext.jar
to the classpath of your project´s build path if other features (e.g., MapActivity, Sherlock ActionBar, fragment lifecycle) are desired. libs
folder along with CompuwareUEM.jar
.CompuwareUEM.jar
to your libs folder, select the Order and Export tab and check the box to export Android Private Libraries.And since this is a hybrid app
CompuwareUEM.js
to manually create user actions.You can enable the debug flags
Use the CompuwareUEM
debugOn
and debugOff
JavaScript functions to turn debugging on or off.
Also make sure that you are not combining UEM agent with this adk js file,
Some known issues
More detailed instructions are here https://community.compuwareapm.com/community/display/DOCDT60/Hybrid+Application+Setup+and+Instrumentation
Hello,
We did what you suggested, but we're still getting the same error. With the debugon we also get the error we already knew.
Where from comes the CpwrUemAndroidADK object?
Regards,
Jurgen
Hi Jurgen,
Hope I understand you right. The error is thrown within the webview/JavaScript? You want to call the enter/leaveAction API within JavaScript of a the HTML. Is this a on device stored html or loaded from a Web server?
If it is stored on the device you will have to initialize it by doing something like this:
var compuwareUEM = new CompuwareUEM;
and execute on the compuwareUEM your enter and leaves.
Cheers Klaus
Answer by Brian L. ·
Assuming Android version is not 2.3, you need to make sure the web view registration is done before the javascript code (that uses CompuwareUEM logic) is executed in that web view. The web view registration step ensures the CompuwareUEM javascript interface object called CpwrUemAndroidADK created. Also, be sure to call startup either in the java or javascript code before creating actions.
Answer by Jurgen R. ·
We do get the visits now, but he doesn't connect them to the PurePaths. I don't know if this is related, but the visit gives as application name 'MobileApp' (is done in the method in the adk) and the purepath gives 'mobilebankinguat.dlbank.be'.
In the transaction flow I see the Mobile Application as a process and separately I see our GUI server whereto the Mobile Application connects. But there is no line between the mobile application and the GUI server.
How/where is the link between visit and purepath being made?
Regards,
Answer by Jurgen R. ·
Hi Klaus,
The HTTP Tag is indeed missing. But apparently this was also missing in our "Proof Of Concept" (made with someone from Compuware) and then it did find the link between the visit and the purepath.
Is it possible that the link is also made via the "dtCookie"? Because these are the same in the purepaths in the same session/visit and they were also present in our "Proof Of Concept" .
Thanks in advance!
JANUARY 15, 3:00 PM GMT / 10:00 AM ET