Panchaksharappa, Varuna

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

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.