• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
  • Home /
  • Public Forums /
  • Application Monitoring & UEM /
  • AppMon & UEM Open Q&A /
avatar image
Question by Jurgen R. · Oct 22, 2014 at 12:52 AM ·

Mobile ADK

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

 

Comment

People who like this

0 Show 0
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

5 Replies

  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image

Answer by Jurgen R. · Nov 12, 2014 at 07:17 PM

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!

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Klaus E. · Nov 11, 2014 at 09:21 PM

Hi Jurgen,

Linking of user actions and PurePaths is based on the x-dynatrace HTTP-parameter that has to be sent with every request from the mobile device. Can you check if this parameter gets captured on the server side.

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Jurgen R. · Nov 07, 2014 at 12:40 AM

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,

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Brian L. · Oct 28, 2014 at 11:39 PM

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.

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Rajesh J. · Oct 22, 2014 at 04:56 AM

Jurgen

 

The CompuwareUEM javascript object is not getting created hence you are getting this error. 

Just a few things to go over.

  1. Unpack dynatrace-mobile-adk-<VERSION>.<BUILD>.zip to a directory of your choice.
  2. Add CompuwareUEM.jar to the classpath of your project´s build path. 
    In Eclipse, you can add it to the libs folder.
  3. Add 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. 
    In Eclipse, you can add it to the libs folder along with CompuwareUEM.jar.
  4. If you are using ADT22 or later in Eclipse, after adding 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 

  1. Register the WebViews with the Mobile App ADK (if Auto-Instrumentation is not used).
  2. Manually inject the JavaScript Agent into your HTML5 content.
  3. Optionally use 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

  • Android 2.3.x has a critical problem with the JavaScript interface. The issue is reported here: https://code.google.com/p/android/issues/detail?id=12987.
  • Your application target cannot be at API 17 for Android 4.2 or later. Applications targeting API 16 or lower do run on Android 4.2 and later.
  • JavaScript Agent injection will not capture load resources for this release. Only XHRs made to your instrumented server will be captured.

 

More detailed instructions are here https://community.compuwareapm.com/community/display/DOCDT60/Hybrid+Application+Setup+and+Instrumentation

 

 

Comment

People who like this

0 Show 2 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Jurgen R. · Oct 22, 2014 at 06:42 PM 0
Share

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 

avatar image Klaus E. ♦ Jurgen R. · Oct 22, 2014 at 09:40 PM 0
Share

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

How to get started

First steps in the forum
Read Community User Guide
Best practices of using forum

NAM 2019 SP5 is available


Check the RHEL support added in the latest NAM service pack.

Learn more

LIVE WEBINAR

"Performance Clinic - Monitoring as a Self Service with Dynatrace"


JANUARY 15, 3:00 PM GMT / 10:00 AM ET

Register here

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Forum Tags

dotnet mobile monitoring load iis 6.5 kubernetes mainframe rest api dashboard framework 7.0 appmon 7 health monitoring adk log monitoring services auto-detection uem webserver test automation license web performance monitoring ios nam probe collector migration mq web services knowledge sharing reports window java hybris javascript appmon sensors good to know extensions search 6.3+ server documentation easytravel web dashboard kibana system profile purelytics docker splunk 6.1 process groups account 7.2 rest dynatrace saas spa guardian appmon administration production user actions postgresql upgrade oneagent measures security Dynatrace Managed transactionflow technologies diagnostics user session monitoring unique users continuous delivery sharing configuration alerting NGINX splitting business transaction client 6.3 installation database scheduler apache mobileapp RUM php dashlet azure purepath agent 7.1 appmonsaas messagebroker nodejs 6.2 android sensor performance warehouse
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A