Voting: 
Vote up!
0 Votes
2 Replies
Unanswered

Kony app crashing in android when try to set location data to map widget

Question asked by Vijayendra L on Jul 11, 2017 10:14 EDT

for(var each in storeList){                locData.push({                     "lat": storeList[each].lat,                     "lon": storeList[each].lng,                     "name": storeList[each].name,                     "showCallout":true,                     "calloutData":{                       "template":"CallOutDataTemplate",                       "MapCalloutImage":"compass.png",                       "MapCalloutRichText":address,                       "MapCalloutLabel":storeList[each].name                     }               });             } frmStores.mapStores.locationData=locData; //this line casuing the app crash in android, mapStores is map widget name.        

Vote up!
0 votes
Vote down!

You might want to revisit your code to push to array( locData.push)  only if both mandatory lat and lon present

as well as you might check if any other mandatory params are missing before pushing.

 

Replied by: Jul 11, 2017 11:03 EDT
Vote up!
0 votes
Vote down!

Hi Sivaram,

Thanks for reply. I have added null check for all the params but I still see the issue. More over, It is working in local preview( by using ipaddress) for both android and iphone. only issue with android cloud preview (no issue with Iphone).

 

Replied by: Jul 11, 2017 12:18 EDT