我有一个简单的页面/屏幕。我希望在设备上打开 native 邮件客户端时能够单击标签上的电子邮件地址。 (即 mailto: 等效项)。
我目前只关心 iOS。
这可能吗?
XML
<Page loaded="pageloaded">
<GridLayout>
<StackLayout>
<Label text="sometest.mail@gmail.com">
</StackLayout>
</GridLayout>
</Page>
最佳答案
或者您可以在使用 时打开默认电子邮件应用程序openUrl 方法来自 tns-core-modules/utils/utils
import { openUrl } from "tns-core-modules/utils/utils";
openEmail() {
openUrl("mailto:test@example.com")
}
关于email - 如何让 NativeScript 在其 native 邮件客户端中打开电子邮件标签?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36098509/