layar

Layar: Redirecting user to website of POI in clients NATIVE browser


I want users to be able to click a POI and then be able to click a button 'goto website' which redirects to the website of that POI in the clients native browser. I think this page describes what I need: http://layar.pbworks.com/w/page/35910641/User%20Interaction%20Dialog%20API#showdialog

However, whats not clear to me: how can I test the action? - I dont see which request (what are the parameters etc) is passed to my server in order for me to return the showDialog object - I dont see IF and HOW I should nest the showDialog object in my POI - how can I test this functionality on a layar in test mode (not published yet)


Solution

  • You should be able to do what you want simply using the Response Hotspot Action Object:

    http://layar.pbworks.com/w/page/28473525/GetPOIs-JSON%20Response#Actions

    You can add as many actions as you like - including links to websites:

    "actions": [
         {"activityType": 4, "uri": "http://www.mywebsite.com", "label": "Go To Website"}
    ]