【问题标题】:How to open the native calendar app of the device in phonegap (cordova)如何在phonegap(cordova)中打开设备的本机日历应用程序
【发布时间】:2015-04-10 10:26:14
【问题描述】:

我正在使用 Phonegap 的日历插件“EddyVerbruggen/Calendar-PhoneGap-Plugin”来访问和创建日历事件。但是有没有可以打开设备原生日历App的插件。

【问题讨论】:

    标签: cordova phonegap-plugins


    【解决方案1】:

    您可以创建一个执行此代码的插件

    NSString* launchUrl = @"calshow://";
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString: launchUrl]];
    

    或者您可以尝试使用现有插件,例如 inappBrowser 或 launchMyApp 使用 calshow:// 作为 url

    【讨论】:

    • 请告诉我通过inappBrowser打开日历的代码。我尝试了下面的代码,但没有奏效。 window.open('calshow://', '_system');
    【解决方案2】:

    插件"EddyVerbruggen/Calendar-PhoneGap-Plugin"也可以打开原生日历:

    window.plugins.calendar.openCalendar();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-15
      • 1970-01-01
      • 2013-10-23
      • 1970-01-01
      • 1970-01-01
      • 2013-02-19
      相关资源
      最近更新 更多