Phonegap 3.0 Custom Plugin

后端 未结 1 836
[愿得一人]
[愿得一人] 2021-01-17 04:38

I put together a plugin for an app some months ago with phonegap 2.7 and it worked perfectly. The plugin basically opens up the users phonebook and returns to my app the det

相关标签:
1条回答
  • 2021-01-17 05:06

    Call your plugin like this:

    cordova.require("com.huronasolutions.plugins.ContactView").show(
     function (contact) {
       success({ "contact": contact, "msg": "success" });
     },
     function (fail) {
       fail({ "msg": "We were unable to get the contact you selected." });
     }
    );
    

    Also make sure you have defined the plugin in your config.xml:

    <feature name="contactView">
          <param name="android-package" value="com.huronasolutions.plugins.ContactView"/
    </feature>
    
    0 讨论(0)
提交回复
热议问题