簡體   English   中英

在ionic 3中使用socialSharing插件時我的應用程序崩潰

[英]my app crash when use socialSharing plugin in ionic 3

我使用ionic 3和SocialSharing插件,在使用時效果很好:

socialSharing.shareViaWhatsApp

whats(){

    //this.socialSharing.shareViaWhatsApp("I needed a "+this.message,null,null)
this.socialSharing.shareViaWhatsApp("اI NEED "+this.message, null, null)
.then(() => console.log('ok'))
.catch(() => console.log('not ok'));


    }

但應用程序崩潰並關閉了使用狀態:

shareViaWhatsAppToReceiver

    whats(){
    //this.socialSharing.shareViaSMS("I needed a "+this.message,"+249922222343")
this.socialSharing.shareViaWhatsAppToReceiver("00249922222343", "I needed a "+this.message, null, null)
    .then(() => console.log('ok'))
.catch(() => console.log('not ok'));

}

離子信息:

$離子信息

cli軟件包:(C:\\ Users \\ abdo \\ AppData \\ Roaming \\ npm \\ node_modules)@ ionic / cli-utils:1.19.1 ionic(Ionic CLI):3.19.1全局軟件包:cordova(Cordova CLI):7.1.0本地軟件包:@ ionic / app-scripts:3.1.8 Cordova平台:android 6.3.0 Ionic Framework:ionic-angular 3.9.2系統:節點:v8.9.3 npm:5.5.1 OS:Windows 7

請幫我

國家/地區密鑰必須在此處。 00將不起作用,它必須是+號,然后是國家/地區代碼,再加上數字,即+310433885282。 00310433885282無法正常工作。 請注意,在Android上,您只能直接向某人發送“文本”和“ URL”,因此文件將被忽略。

通過電話號碼(從5.3.0開始)

<button onclick="window.plugins.socialsharing.shareViaWhatsAppToPhone('+31611111111', 'Message via WhatsApp', null /* img */, null /* url */, function() {console.log('share ok')})">msg via WhatsApp to phone number +31611111111</button>

按abid(iOS)或電話號碼(Android)

<button onclick="window.plugins.socialsharing.shareViaWhatsAppToReceiver('101', 'Message via WhatsApp', null /* img */, null /* url */, function() {console.log('share ok')})">msg via WhatsApp for Addressbook ID 101</button>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM