Javascript React Native无法打开URL找不到可处理意图的活动

Javascript React Native无法打开URL找不到可处理意图的活动,javascript,react-native,square,square-connect,Javascript,React Native,Square,Square Connect,我与React Native和Square Point销售公司合作。我正在使用。 我也安装了。 这是我的代码: componentDidMount() { let url ="intent:#Intent;action=com.squareup.pos.action.CHARGE;package=com.squareup;S.browser_fallback_url=https://my.website.com/index.html;S.com.squareup.pos.WEB_CALL

我与React Native和Square Point销售公司合作。我正在使用。 我也安装了。 这是我的代码:

componentDidMount() {
    let url ="intent:#Intent;action=com.squareup.pos.action.CHARGE;package=com.squareup;S.browser_fallback_url=https://my.website.com/index.html;S.com.squareup.pos.WEB_CALLBACK_URI=https://my.website.com/index.html;S.com.squareup.pos.CLIENT_ID=sq0ids-yOurCLieNtId;S.com.squareup.pos.API_VERSION=v2.0;i.com.squareup.pos.TOTAL_AMOUNT=100;S.com.squareup.pos.CURRENCY_CODE=USD;S.com.squareup.pos.TENDER_TYPES=com.squareup.pos.TENDER_CARD,com.squareup.pos.TENDER_CARD_ON_FILE,com.squareup.pos.TENDER_CASH,com.squareup.pos.TENDER_OTHER;end";

    Linking.openURL(url).catch(err => console.error("An error occurred", err));
}
这是我的错误消息:

Could not open URL 'intent:#Intent; ... end': No Activity found to handle Intent { act=android.intent.action.VIEW dat=intent: flg=0x10000000 }
我做错了什么?

您在那里使用的
intent:#intent
在React Native中实际上不起作用,因为它用于从Android设备上的web浏览器进入Square POS应用程序

Android Web API
intent
旨在实现从浏览器到Square POS应用程序的切换,而不是从应用程序到应用程序的切换


听起来你想做的是在React本机应用程序中使用Android的Square Point销售SDK。您需要了解如何将本机模块与React本机应用程序链接。

我尝试使用web API构建,但发现流程不太好。用户并不总是回到应用程序;有时他们会被困在网站上

我构建它是为了让下一个开发者更容易。它使用本机模块与Android/iOS Square PoS API通信。。因此,您不必编写Java或Objective-C