【问题标题】:Share url from Youtube iOS app to my Codename One iOS app将 Youtube iOS 应用中的 URL 分享到我的 Codename One iOS 应用
【发布时间】:2020-04-13 23:33:16
【问题描述】:

我需要将一个视频链接从 Youtube 应用程序分享到我在 iOS 上的 Codename One 应用程序。

这似乎是可能的,根据:https://stackoverflow.com/a/38036939/1277576

使用 Codename One,我尝试添加这些构建提示:

ios.plistInject=<key>CFBundleURLTypes</key><array><dict><key>CFBundleURLName</key><string>net.informaticalibera.myappname</string></dict><dict><key>CFBundleURLSchemes</key><array><string>https</string></array></dict></array>
ios.urlScheme=<string>https</string>

我将这段代码添加到了一个简单的项目中:

public void start() {
        if (current != null) {
            current.show();
            return;
        }

        String url = Display.getInstance().getProperty("AppArg", null);

        Form hi = new Form("Test case", BoxLayout.y());
        if (url != null) {
            hi.add(new SpanLabel("Intercepted URL:\n" + url));
        } else {
            hi.add(new Label("No URL was intercepted"));
        }
        hi.show();
    }

但它不起作用:当我分享视频链接时,Youtube 为我提供了几个应用程序,但不是我的。

【问题讨论】:

    标签: codenameone


    【解决方案1】:

    您还需要在本机代码中实现它,如果我没记错的话,我认为 xcode 项目也需要更改。目前我们对此用例没有官方支持,但您可以为此提交 RFE。

    【讨论】:

      猜你喜欢
      • 2018-11-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-13
      • 2018-05-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多