Panchaksharappa, Varuna

This document details the process of troubleshooting both mPulse and MAP SDK with your Android application.

 

MPulse SDK Android

 

  1. Check the API Key/ License used in the app.API key
  2. Remove any Empty space in API Key/ License
  3. Verify the akamai_sdk_init.xml with the below structure :akamai init
  4. Config received in app - If config is not received then API Key/ License is not entered correctly or limit(threshold) for Beacons is reached for the app.
  5. Config - if all the metrics and other information are added (you can check the URL in the browser). If any settings are added on Soasta portal ,eg you added a Metrics, this will take a couple of minutes to reflect in config.
  6. Check for third party framework used for network and image calls, interceptors will be required if you are using any of these Retrofit/OkHttp/Picasso, if you are using any other 3rd party lib do let us know we could provide interceptors for the same.
  7. In order to accelerate traffic originated from WebViews, the SDK provides the following custom WebViewClient.

     

    • AkaWebViewL21Client - For Android API level 21 and above.
    • AkaWebViewL15Client - For Android API level 15 and above.
    • Both WebViewClients delegate all network calls via the MAP SDK library internally. The only difference between the two is that the L21 WebViewClient uses newer APIs added in level 21 and above.
  8. To gather more debug logs, enable debug logs in code:

     

    • Logger.setLevel(Logger.LEVEL.DEBUG)

 

 

Corner Cases :

 

 

  1. Reports not available

     

    • Check in the SDK logs, if SDK is initialized successfully.
    • Check the Beacon Rate Limiting applied at the tenant level, some customers apply it to cut the budget - Beacon Rate Limiting
  2. Config is not applied

     

    • When config is not applied to SDK, none of the functionality will work for the SDK, so it's important that config is applied.
MAP SDK Android

 

  1. Check the API Key/ License used in the app.API key
  2. Remove any Empty space in API Key/ License
  3. Verify the structure of API Key/ License :akamai init map
  4. Config received in app - If config is not received then API Key/ License is not entered correctly.
  5. Check for third party framework used for network and image calls, interceptors will be required for these.
  6. Check Akamai headers are added in request by running the app through Charles Proxy, if Akamai headers are not added to the request, then interceptor needs to be added for network/ image request.Below is Sample request showing Akamai header:

     

    API key
  7. To gather more debug logs, enable debug logs in code:

     

    • Logger.setLevel(Logger.LEVEL.DEBUG)

 

 

Corner Cases :

 

 

  1. Caching failing

     

    • Check the cache control header are valid
    • Check the vary header - "vary" header is present in the response headers with "user-agent" in it - which indicates to the SDK that the content should only be cached based on user-agent - this is a little ambiguous which causes the SDK to play it safe and avoid caching since we don't want to cache an item that was intended for desktop on mobile usually the vary header just has Accept-Encoding. So to avoid this we need "vary" header to just have "Accept-Encoding”.akamai init
    • Universal Cache feature has a limitation of 1MB for the cached content on the device (based on documentation). What happens when the content exceeds the limit? SDK overwrite this with new cached content or does it stop caching at that point? That’s per item. No individual item more than 1MB will be cached The total cache size is much bigger (default like 3GB , if space is available.) There is also a purge mechanism internally to keep it contained as well.
  2. Requests are not refreshing (Eg : In flight booking everytime fresh content should be served)

     

    • Check the CacheControl max age is 0, so that the contents are not cached.
  3. Reports not available

     

    • Check in the SDK logs, if SDK is initialised successfully.
  4. Config is not applied

     

    • When config is not applied to SDK, none of the functionality will work for the SDK, so it's important that config is applied. Check the License, Package name/Bundle Identifier in code is the same as on portal and also check for empty spaces.
    • Without doing any changes click on the Save Changes button on Luna Portal.