cordova - 适用于 Ionic/Cordova 的 Firebase Invite 插件

标签 cordova ionic-framework firebase firebase-invites

<分区>

是否有任何 Cordova 插件可用于在 Ionic 应用程序中使用 Firebase Invite?

为 Firebase @ https://github.com/arnesson/cordova-plugin-firebase 找到了这个插件

但是它还不支持Invites

最佳答案

这个解决了可能的问题https://plugins.telerik.com/cordova/plugin/firebase-invites 根据文档

发送邀请

 FirebaseInvites.sendInvitation(
  {
      title: "The title", // mandatory, see the screenshots for its purpose
      message: "The message", // mandatory, see the screenshots for its purpose
      deepLink: "myapp://deeplink",
      callToActionText: "My CTA",
      description: "My description",
      customImage: "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png",
      //emailSubject: "My Email subject",
      //emailHtmlContent: "Some <strong>HTML</strong> content",
      androidClientID: "123abc",
      // You can find your iOS app's client ID in the GoogleService-Info.plist file you downloaded from the Firebase console
      iosClientID: "abc123"
  },
  function (result) {
    console.log("Sent " + result.count + " invites");
    console.log("Invitation ID's: " + JSON.stringify(result.invitationIds));
  },
  function (msg) {
    alert("Error: " + msg);
  }
);

和接收

    FirebaseInvites.getInvitation(
  function (result) {
    console.log("invitation ID: " + result.invitationId);
    console.log("deeplink: " + result.deepLink);
    console.log("matchType: " + result.matchType); // iOS only, either "Weak" or "Strong" as described at https://firebase.google.com/docs/invites/ios
  },
  function (msg) {
    alert("Error: " + msg);
  }
);

关于cordova - 适用于 Ionic/Cordova 的 Firebase Invite 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39327062/

相关文章:

javascript - Strophe 和 Phonegap

angular - HttpClient 无法忽略或绕过自签名证书错误

javascript - Ionic 3 - 内联视频在 iOS 10 上的 native 播放器中全屏打开

ios - “证书 bundleId 与您应用的证书不匹配”Firebase 云消息传递

javascript - 检测滑动手势 iOS - Cordova/Phonegap Javascript

cordova - 如何向 meteor 注册表中未添加的cordova插件添加到 meteor ?

android - Firebase CM 未注册的注册 token

java - Android firebase 最喜欢的按钮更改

database - AppStore 更新后 Cordova 应用程序的 localStorage 被删除

cordova - 使用 Cordova 和 AngularJS 与 Ionic,哪个更值得推荐?