android - Send SMS from application with concatenated Text -


i confused. application not send if sms message has concatenated text, why?

it's work:

receiver = 99999;   smshelper smshelper = new smshelper(ctx); smshelper.sendsms(receiver, "it's work!"); 

don't work concatenated text.

  receiver = 99999;   string text1 = "not";   string text2 = "working";   string smsfulltext = text1.concat(text2);   smshelper smshelper = new smshelper(ctx);   smshelper.sendsms(receiver, smsfulltext); 

my smshelper.class

public class smshelper{  private static final string action_send = "sms_send"; private static final string action_received = "sms_received";  private context ctx; private string text;       public smshelper(context ctx){      this.ctx = ctx;    }     public void sendsms(string receiver, string sms){    this.text = sms;    pendingintent peitsend = pendingintent.getbroadcast(ctx,0,new intent(action_send),0);     pendingintent peitreceived = pendingintent.getbroadcast(ctx, 0, new intent(action_received), 0);      smsmanager smsmanager = smsmanager.getdefault();     smsmanager.sendtextmessage(receiver,null,text, peitsend, peitreceived);    }  } 


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -