mobile html5 launch phone's native navigation app

前端 未结 5 1188
灰色年华
灰色年华 2021-02-01 07:30

I\'m developing a phonegap/cordova app. Is there a way to open a phone\'s native navigation app within the browser view? Or is there a best practice on opening native map applic

5条回答
  •  南旧
    南旧 (楼主)
    2021-02-01 08:03

    Cordova 3.6.0 introduces a second whitelist, for restricting which URLs are allowed to launch external applications. In previous versions of Cordova, all non-http URLs, such as mailto:, geo:, sms: and intent, were implicitly allowed to be the target of an a tag. Because of the potential for an application to leak information, if an XSS vulnerability allows an attacker to construct arbitrary links, these URLs must be whitelisted as well, starting in Cordova 3.6.0.

    Cordova 3.6.0 Whitelist Guide

    So you need to add explicitly in the config.xml:

      
      
    

提交回复
热议问题