我正在使用通過短信向朋友發送Firebase動態鏈接邀請的項目。我的代碼運行良好,並在發送較小的鏈接作爲邀請時發送短信。像smsManager.sendTextMessage不適用於超過一個短信字符限制的郵件
try {
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(number, null, "Check It Out. This one is very nice and useful https://v5uht.app.goo.gl/Zi7X", null, null);
Toast.makeText(getApplicationContext(), "Cheers :D :D", Toast.LENGTH_LONG).show();
}
catch (Exception e) {
Toast.makeText(getApplicationContext(), "SMS faild, please try again.", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
但它並不在我包括超過一個短信字符的限制,雖然它顯示的Toast通知更大的鏈接發送短信。
String myNewLink = "https://v5uht.app.goo.gl/?link=http://expensecount.com/&apn=com.chtl.ribath.fdynamic1&amv=1&afl=https://play.google.com/store/apps/details?id%3Dcom.belief.colorgalaxy&myPage=2";
try {
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(number, null, myNewLink, null, null);
Toast.makeText(getApplicationContext(), "Cheers :D :D", Toast.LENGTH_LONG).show();
}
catch (Exception e) {
Toast.makeText(getApplicationContext(), "SMS faild, please try again.", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
我該怎麼做才能包含myNewLink中的整個鏈接並使其工作。謝謝。
,如果你需要我搜索了一些例子,但一無所獲......任何代碼:) –
你必須把它在parts.Tell我,如果你PLZ分享一些代碼這將是非常有用的:D @MohammadZ –