npm i --save nativescript-open-inbox
- 版本:1.0.2
- GitHub: https://github.com/franciscojaimesfreyre/nativescript-open-inbox
- NPM: https://npmjs.net.cn/package/nativescript-open-inbox
- 下载量
- 昨日: 0
- 上周: 0
- 上个月: 0
NativeScript 打开默认邮箱应用邮箱
您可以使用此插件在 Android 和 iOS 上打开默认邮箱应用。
安装
从您的项目根目录运行此命令
tns plugin add nativescript-open-inbox
API
要使用此插件,您必须首先 require/import 它
TypeScript
import { openInbox } from "nativescript-open-inbox";
// or
import { openInbox as goToEmailApp } from "nativescript-open-inbox";
JavaScript
var email = require("nativescript-open-inbox");
openInbox
TypeScript
email.openInbox()
.then(() => {
console.log("Cool!");
})
.catch((ex) => {
console.log("Ouch!" + ex);
});
JavaScript
email.openInbox()
.then(() => {
console.log("Cool!");
})
.catch((ex) => {
console.log("Ouch!" + ex);
})