How to send a sms >160 charicters from an android form

Tutorials with advanced 'difficulty' and more Lines of Code.

How to send a sms >160 charicters from an android form

Postby masterv » Wed May 08, 2013 6:26 pm

////Master V copyright/////
////////////////////////
////I didn't put the "strings.xml" and "main.xml" because they are too long////////
//////////////////////////////////////////////////////////////////////
*Request.Java:
///////i omitted beginning code cause of the same reason if not i couldn't post it//////
///////////////////////////////////////////////////////////////////////////
btnen.setOnClickListener(new View.OnClickListener(){

public void onClick(View v) {
EditText qte=(EditText)findViewById(R.id.qtems3);
EditText num=(EditText)findViewById(R.id.entnum);
numquest=(EditText)findViewById(R.id.numquest);
telq=(EditText)findViewById(R.id.telq);
nctrl=(EditText)findViewById(R.id.nctrl);
nsup=(EditText)findViewById(R.id.nsup);
nrp=(EditText)findViewById(R.id.nrp);
numrp=(EditText)findViewById(R.id.numrp);
//***restant
daterecept= (DatePicker) findViewById(R.id.daterecept);
Integer month= daterecept.getMonth()+1;
String dt= (daterecept.getDayOfMonth()+"-"+ month +"-"+ daterecept.getYear()).toString();

datereleve= (DatePicker) findViewById(R.id.datereleve);
Integer mth= datereleve.getMonth()+1;
String dat= (datereleve.getDayOfMonth()+"- "+ mth +"- "+ datereleve.getYear()).toString();

//*npro=(EditText)findViewById(R.id.npro);
ndistrc=(EditText)findViewById(R.id.ndistrc);
ntert=(EditText)findViewById(R.id.ntert);
nsect=(EditText)findViewById(R.id.nsect);
nbreh=(EditText)findViewById(R.id.nbreh);
ngrpm=(EditText)findViewById(R.id.ngrpm);
nvilg=(EditText)findViewById(R.id.nvilg);
nrel=(EditText)findViewById(R.id.nrel);
nfentr=(EditText)findViewById(R.id.nfentr);
nbref=(EditText)findViewById(R.id.nbref);
nbretotm=(EditText)findViewById(R.id.nbretotm);
nbrehad=(EditText)findViewById(R.id.nbrehad);
nbrefad=(EditText)findViewById(R.id.nbrefad);
nbrefg=(EditText)findViewById(R.id.nbrefg);
nbrefnf=(EditText)findViewById(R.id.nbrefnf);
totm=(EditText)findViewById(R.id.totm);
otre=(EditText)findViewById(R.id.otre);
String nomen=auto.getText().toString();
spn=(Spinner) findViewById(R.id.sp);
spin=(Spinner) findViewById(R.id.spin);
deroul= (Spinner)findViewById(R.id.spinner2);
autr=(EditText)findViewById(R.id.autr);
qterec=(EditText)findViewById(R.id.qterec);
qtercu=(EditText)findViewById(R.id.qtercu);
superemb=(EditText)findViewById(R.id.superemb);
supremblav=(EditText)findViewById(R.id.supremblav);
qteprod=(EditText)findViewById(R.id.qteprod);
otre2=(EditText)findViewById(R.id.otre2);
Qterec2=(EditText)findViewById(R.id.Qterec2);
Qtercu2=(EditText)findViewById(R.id.Qtercu2);
superemb2=(EditText)findViewById(R.id.superemb2);
supremblav2=(EditText)findViewById(R.id.supremblav2);
qteprod2=(EditText)findViewById(R.id.qteprod2);
otre3=(EditText)findViewById(R.id.otre3);
Qterec3=(EditText)findViewById(R.id.Qterec3);
Qtercu3=(EditText)findViewById(R.id.Qtercu3);
superemb3=(EditText)findViewById(R.id.superemb3);
supremblav3=(EditText)findViewById(R.id.supremblav3);
qteprod3=(EditText)findViewById(R.id.qteprod3);
otre4=(EditText)findViewById(R.id.otre4);
Qterec4=(EditText)findViewById(R.id.Qterec4);
Qtercu4=(EditText)findViewById(R.id.Qtercu4);
superemb4=(EditText)findViewById(R.id.superemb4);
supremblav4=(EditText)findViewById(R.id.supremblav4);
qteprod4=(EditText)findViewById(R.id.qteprod4);
otre5=(EditText)findViewById(R.id.otre5);
Qterec5=(EditText)findViewById(R.id.Qterec5);
Qtercu5=(EditText)findViewById(R.id.Qtercu5);
superemb5=(EditText)findViewById(R.id.superemb5);
supremblav5=(EditText)findViewById(R.id.supremblav5);
qteprod5=(EditText)findViewById(R.id.qteprod5);
otre6=(EditText)findViewById(R.id.otre6);
Qterec6=(EditText)findViewById(R.id.Qterec6);
EditText Qtercu6 = (EditText)findViewById(R.id.Qtercu6);
superemb6=(EditText)findViewById(R.id.superemb6);
supremblav6=(EditText)findViewById(R.id.supremblav6);
qteprod6=(EditText)findViewById(R.id.qteprod6);
otre7=(EditText)findViewById(R.id.otre7);
Qterec7=(EditText)findViewById(R.id.Qterec7);
EditText Qtercu7 = (EditText)findViewById(R.id.Qtercu7);
superemb7=(EditText)findViewById(R.id.superemb7);
supremblav7=(EditText)findViewById(R.id.supremblav7);
qteprod7=(EditText)findViewById(R.id.qteprod7);
otre8=(EditText)findViewById(R.id.otre8);
EditText Qterec8 = (EditText)findViewById(R.id.Qterec8);
EditText Qtercu8 = (EditText)findViewById(R.id.Qtercu8);
superemb8=(EditText)findViewById(R.id.superemb8);
supremblav8=(EditText)findViewById(R.id.supremblav8);
qteprod8=(EditText)findViewById(R.id.qteprod8);
otre9=(EditText)findViewById(R.id.otre9);
Qterec9=(EditText)findViewById(R.id.Qterec9);
Qtercu9=(EditText)findViewById(R.id.Qtercu9);
superemb9=(EditText)findViewById(R.id.superemb9);
supremblav9=(EditText)findViewById(R.id.supremblav9);
qteprod9=(EditText)findViewById(R.id.qteprod9);
otre10=(EditText)findViewById(R.id.otre10);
Qterec10=(EditText)findViewById(R.id.Qterec10);
Qtercu10=(EditText)findViewById(R.id.Qtercu10);
superemb10=(EditText)findViewById(R.id.superemb10);
supremblav10=(EditText)findViewById(R.id.supremblav10);
qteprod10=(EditText)findViewById(R.id.qteprod10);
otre11=(EditText)findViewById(R.id.otre11);
Qterec11=(EditText)findViewById(R.id.Qterec11);
Qtercu11=(EditText)findViewById(R.id.Qtercu11);
superemb11=(EditText)findViewById(R.id.superemb11);
supremblav11=(EditText)findViewById(R.id.supremblav11);
qteprod11=(EditText)findViewById(R.id.qteprod11);
otre12=(EditText)findViewById(R.id.otre12);
Qterec12=(EditText)findViewById(R.id.Qterec12);
Qtercu12=(EditText)findViewById(R.id.Qtercu12);
superemb12=(EditText)findViewById(R.id.superemb12);
supremblav12=(EditText)findViewById(R.id.supremblav12);
qteprod12=(EditText)findViewById(R.id.qteprod12);
otre13=(EditText)findViewById(R.id.otre13);
Qterec13=(EditText)findViewById(R.id.Qterec13);
Qtercu13=(EditText)findViewById(R.id.Qtercu13);
superemb13=(EditText)findViewById(R.id.superemb13);
supremblav13=(EditText)findViewById(R.id.supremblav13);
qteprod13=(EditText)findViewById(R.id.qteprod13);
otre14=(EditText)findViewById(R.id.otre14);
Qterec14=(EditText)findViewById(R.id.Qterec14);
Qtercu14=(EditText)findViewById(R.id.Qtercu14);
superemb14=(EditText)findViewById(R.id.superemb14);
supremblav14=(EditText)findViewById(R.id.supremblav14);
qteprod14=(EditText)findViewById(R.id.qteprod14);
otre15=(EditText)findViewById(R.id.otre15);
rc=(EditText)findViewById(R.id.rc);
nbr=(EditText)findViewById(R.id.nbr);
rc2=(EditText)findViewById(R.id.rc2);
nbr2=(EditText)findViewById(R.id.nbr2);
rc3=(EditText)findViewById(R.id.rc3);
nbr3=(EditText)findViewById(R.id.nbr3);
motre=(EditText)findViewById(R.id.motre);
rc4=(EditText)findViewById(R.id.rc4);
nbr4=(EditText)findViewById(R.id.nbr4);
motre3=(EditText)findViewById(R.id.motre3);
rc5=(EditText)findViewById(R.id.rc5);
nbr5=(EditText)findViewById(R.id.nbr5);
motre4=(EditText)findViewById(R.id.motre4);
rc6=(EditText)findViewById(R.id.rc6);
nbr6=(EditText)findViewById(R.id.nbr6);
nbr7=(EditText)findViewById(R.id.nbr7);
nbrq8=(EditText)findViewById(R.id.nbrq8);
nbr9=(EditText)findViewById(R.id.nbr9);
nbrq10=(EditText)findViewById(R.id.nbrq10);
qtek=(EditText)findViewById(R.id.qtek);
qtekr=(EditText)findViewById(R.id.qtekr);
kotre=(EditText)findViewById(R.id.kotre);
qtek2=(EditText)findViewById(R.id.qtek2);
EditText qtekr2 = (EditText)findViewById(R.id.qtekr2);
kotre2=(EditText)findViewById(R.id.kotre2);
qtek3=(EditText)findViewById(R.id.qtek3);
qtekr3=(EditText)findViewById(R.id.qtekr3);
kotre3=(EditText)findViewById(R.id.kotre3);
gap=(EditText)findViewById(R.id.gap);
qtek4=(EditText)findViewById(R.id.qtek4);
qtekr4=(EditText)findViewById(R.id.qtekr4);
kotre4=(EditText)findViewById(R.id.kotre4);
efftot=(EditText)findViewById(R.id.efftot);
nbrett=(EditText)findViewById(R.id.nbrett);
nbretv=(EditText)findViewById(R.id.nbretv);
nbretvg=(EditText)findViewById(R.id.nbretvg);
mdotre=(EditText)findViewById(R.id.mdotre);
efftot2=(EditText)findViewById(R.id.efftot2);
nbrett2=(EditText)findViewById(R.id.nbrett2);
nbretv2=(EditText)findViewById(R.id.nbretv2);
nbretvg2=(EditText)findViewById(R.id.nbretvg2);
mdotre3=(EditText)findViewById(R.id.mdotre3);
efftot3=(EditText)findViewById(R.id.efftot3);
nbrett3=(EditText)findViewById(R.id.nbrett3);
nbretv3=(EditText)findViewById(R.id.nbretv3);
nbretvg3=(EditText)findViewById(R.id.nbretvg3);
mdotre4=(EditText)findViewById(R.id.mdotre4);
efftot4=(EditText)findViewById(R.id.efftot4);
nbrett4=(EditText)findViewById(R.id.nbrett4);
nbretv4=(EditText)findViewById(R.id.nbretv4);
nbretvg4=(EditText)findViewById(R.id.nbretvg4);
mdotre5=(EditText)findViewById(R.id.mdotre5);
efftot5=(EditText)findViewById(R.id.efftot5);
nbrett5=(EditText)findViewById(R.id.nbrett5);
nbretv5=(EditText)findViewById(R.id.nbretv5);
nbretvg5=(EditText)findViewById(R.id.nbretvg5);
mdotre6=(EditText)findViewById(R.id.mdotre6);
efftot6=(EditText)findViewById(R.id.efftot6);
nbrett6=(EditText)findViewById(R.id.nbrett6);
nbretv6=(EditText)findViewById(R.id.nbretv6);
nbretvg6=(EditText)findViewById(R.id.nbretvg6);
mdotre7=(EditText)findViewById(R.id.mdotre7);
efftot7=(EditText)findViewById(R.id.efftot7);
nbrett7=(EditText)findViewById(R.id.nbrett7);
nbretv7=(EditText)findViewById(R.id.nbretv7);
nbretvg7=(EditText)findViewById(R.id.nbretvg7);
mdotre8=(EditText)findViewById(R.id.mdotre8);
efftot8=(EditText)findViewById(R.id.efftot8);
nbrett8=(EditText)findViewById(R.id.nbrett8);
nbretv8=(EditText)findViewById(R.id.nbretv8);
nbretvg8=(EditText)findViewById(R.id.nbretvg8);
mdotre9=(EditText)findViewById(R.id.mdotre9);
efftot9=(EditText)findViewById(R.id.efftot9);
nbrett9=(EditText)findViewById(R.id.nbrett9);
nbretv9=(EditText)findViewById(R.id.nbretv9);
nbretvg9=(EditText)findViewById(R.id.nbretvg9);
mdotre10=(EditText)findViewById(R.id.mdotre10);
etn=(EditText)findViewById(R.id.etn);
spf=(EditText)findViewById(R.id.spf);
etn2=(EditText)findViewById(R.id.etn2);
spf2=(EditText)findViewById(R.id.spf2);
etn3=(EditText)findViewById(R.id.etn3);
spf3=(EditText)findViewById(R.id.spf3);
etn4=(EditText)findViewById(R.id.etn4);
spf4=(EditText)findViewById(R.id.spf4);
qtems=(EditText)findViewById(R.id.qtems);
qtems2=(EditText)findViewById(R.id.qtems2);
qtems3=(EditText)findViewById(R.id.qtems3);


//On récupère ce qui a été entré dans les EditText
String numero = num.getText().toString();
ArrayList<String>msg = SmsManager.getDefault().divideMessage(numquest.getText().toString()+"|"+ dat+"|"+ dt+ "|"+ nomen+
"|"+ telq.getText().toString()+"|"+nctrl.getText().toString()+ "|"+nsup.getText().toString() +
"|"+ nrp.getText().toString()+"|"+numrp.getText().toString()+"|"+spn.getSelectedItem().toString()+
"|"+spinner90.getSelectedItem().toString()+"|"+ndistrc.getText().toString()+"|"+ntert.getText().toString()+
"|"+nsect.getText().toString()+"|"+ngrpm.getText().toString()+"|"+nvilg.getText().toString()+
"|"+nrel.getText().toString()+"|"+nfentr.getText().toString()+"|"+nbreh.getText().toString()+
"|"+nbref.getText().toString()+"|"+ nbretotm.getText().toString()+"|"+nbrehad.getText().toString()+
"|"+nbrefad.getText().toString()+"|"+nbrefg.getText().toString()+"|"+nbrefnf.getText().toString()+
"|"+totm.getText().toString()+"|"+spin.getSelectedItem().toString()+"|"+otre.getText().toString()+
"|"+deroul.getSelectedItem().toString()+"|"+autr.getText().toString()+"|"+spinner3.getSelectedItem().toString()+
"|"+qterec.getText().toString()+"|"+qtercu.getText().toString()+"|"+superemb.getText().toString()+
"|"+supremblav.getText().toString()+"|"+qteprod.getText().toString()+"|"+spinner4.getSelectedItem().toString()+
"|"+spinner5.getSelectedItem().toString()+"|"+otre2.getText().toString()+"|"+Qterec2.getText().toString()+
"|"+Qtercu2.getText().toString()+"|"+superemb2.getText().toString()+"|"+supremblav2.getText().toString()+
"|"+qteprod2.getText().toString()+"|"+spinner6.getSelectedItem().toString()+"|"+spinner7.getSelectedItem().toString()+
"|"+otre3.getText().toString()+"|"+Qterec3.getText().toString()+"|"+Qtercu3.getText().toString()+
"|"+superemb3.getText().toString()+"|"+supremblav3.getText().toString()+"|"+qteprod3.getText().toString()+
"+"+spinner8.getSelectedItem().toString()+"|"+spinner9.getSelectedItem().toString()+"|"+otre4.getText().toString()+
"|"+Qterec4.getText().toString()+"|"+Qtercu4.getText().toString()+"|"+superemb4.getText().toString()+
"|"+supremblav4.getText().toString()+"|"+qteprod4.getText().toString()+"|"+spinner10.getSelectedItem().toString()+
"|"+spinner11.getSelectedItem().toString()+"|"+otre5.getText().toString()+"|"+Qterec5.getText().toString()+
"|"+Qtercu5.getText().toString()+"|"+superemb5.getText().toString()+"|"+supremblav5.getText().toString()+
"|"+qteprod5.getText().toString()+"|"+spinner12.getSelectedItem().toString()+"|"+spinner13.getSelectedItem().toString()+
"|"+otre6.getText().toString()+"|"+Qterec6.getText().toString()+"|"+Qtercu6.getText().toString()+
"|"+superemb6.getText().toString()+"|"+supremblav6.getText().toString()+"|"+qteprod6.getText().toString()+
"|"+spinner14.getSelectedItem().toString()+"|"+spinner15.getSelectedItem().toString()+
"|"+otre7.getText().toString()+"|"+Qterec7.getText().toString()+"|"+Qtercu7.getText().toString()+
"|"+superemb7.getText().toString()+"|"+supremblav7.getText().toString()+"|"+qteprod7.getText().toString()+
"|"+spinner16.getSelectedItem().toString()+"|"+spinner17.getSelectedItem().toString()+
"|"+otre8.getText().toString()+"|"+Qterec8.getText().toString()+"|"+Qtercu8.getText().toString()+
"|"+superemb8.getText().toString()+"|"+supremblav8.getText().toString()+"|"+qteprod8.getText().toString()+
"|"+spinner18.getSelectedItem().toString()+"|"+spinner19.getSelectedItem().toString()+"|"+otre9.getText().toString()+
"|"+Qterec9.getText().toString()+"|"+Qtercu9.getText().toString()+"|"+superemb9.getText().toString()+
"|"+supremblav9.getText().toString()+"|"+qteprod9.getText().toString()+"|"+spinner20.getSelectedItem().toString()+
"|"+spinner21.getSelectedItem().toString()+"|"+Qterec10.getText().toString()+"|"+Qtercu10.getText().toString()+
"|"+superemb10.getText().toString()+"|"+supremblav10.getText().toString()+"|"+qteprod10.getText().toString()+
"|"+spinner22.getSelectedItem().toString()+"|"+spinner23.getSelectedItem().toString()+"|"+otre11.getText().toString()+
"|"+Qterec11.getText().toString()+"|"+Qtercu11.getText().toString()+"|"+supremblav11.getText().toString()+
"|"+qteprod11.getText().toString()+"|"+spinner24.getSelectedItem().toString()+"|"+spinner25.getSelectedItem().toString()+
"|"+otre12.getText().toString()+"|"+Qterec12.getText().toString()+"|"+Qtercu12.getText().toString()+
"|"+superemb12.getText().toString()+"|"+supremblav12.getText().toString()+"|"+qteprod12.getText().toString()+
"|"+spinner26.getSelectedItem().toString()+"|"+spinner27.getSelectedItem().toString()+"|"+otre13.getText().toString()+
"|"+Qterec13.getText().toString()+"|"+Qtercu13.getText().toString()+"|"+superemb13.getText().toString()+
"|"+supremblav13.getText().toString()+"|"+qteprod13.getText().toString()+"|"+spinner28.getSelectedItem().toString()+
"|"+spinner29.getSelectedItem().toString()+"|"+otre14.getText().toString()+"|"+Qterec14.getText().toString()+
"|"+Qtercu14.getText().toString()+"|"+superemb14.getText().toString()+"|"+supremblav14.getText().toString()+
"|"+qteprod14.getText().toString()+"|"+spinner30.getSelectedItem().toString()+"|"+spinner31.getSelectedItem().toString()+
"|"+otre15.getText().toString()+"|"+spinner32.getSelectedItem().toString()+"|"+rc.getText().toString()+
"|"+nbr.getText().toString()+"|"+spinner33.getSelectedItem().toString()+"|"+spinner34.getSelectedItem().toString()+
"|"+rc2.getText().toString()+"|"+nbr2.getText().toString()+"|"+spinner35.getSelectedItem().toString()+
"|"+spinner36.getSelectedItem().toString()+"|"+rc3.getText().toString()+"|"+nbr3.getText().toString()+
"|"+spinner37.getSelectedItem().toString()+"|"+spinner38.getSelectedItem().toString()+"|"+motre.getText().toString()+
"|"+rc4.getText().toString()+"|"+nbr4.getText().toString()+"|"+spinner39.getSelectedItem().toString()+
"|"+spinner40.getSelectedItem().toString()+"|"+motre3.getText().toString()+"|"+rc5.getText().toString()+
"|"+nbr5.getText().toString()+"|"+spinner41.getSelectedItem().toString()+"|"+spinner42.getSelectedItem().toString()+
"|"+motre4.getText().toString()+"|"+rc6.getText().toString()+"|"+nbr6.getText().toString()+
"|"+spinner43.getSelectedItem().toString()+"|"+spinner44.getSelectedItem().toString()+
"|"+spinner45.getSelectedItem().toString()+"|"+nbr7.getText().toString()+"|"+nbrq8.getText().toString()+
"|"+spinner46.getSelectedItem().toString()+"|"+spinner47.getSelectedItem().toString()+"|"+nbr9.getText().toString()+
"|"+nbrq10.getText().toString()+"|"+spinner48.getSelectedItem().toString()+"|"+spinner49.getSelectedItem().toString()+
"|"+spinner50.getSelectedItem().toString()+"|"+qtek.getText().toString()+"|"+qtekr.getText().toString()+
"|"+spinner51.getSelectedItem().toString()+"|"+spinner52.getSelectedItem().toString()+"|"+kotre.getText().toString()+
"|"+qtek2.getText().toString()+"|"+qtekr2.getText().toString()+"|"+spinner53.getSelectedItem().toString()+
"|"+spinner54.getSelectedItem().toString()+"|"+kotre2.getText().toString()+"|"+qtek3.getText().toString()+
"|"+qtekr3.getText().toString()+"|"+spinner55.getSelectedItem().toString()+"|"+spinner56.getSelectedItem().toString()+
"|"+kotre3.getText().toString()+"|"+gap.getText().toString()+"|"+qtek4.getText().toString()+
"|"+qtekr4.getText().toString()+"|"+spinner57.getSelectedItem().toString()+"|"+spinner58.getSelectedItem().toString()+
"|"+kotre4.getText().toString()+"|"+efftot.getText().toString()+"|"+nbrett.getText().toString()+
"|"+nbretv.getText().toString()+"|"+nbretvg.getText().toString()+"|"+spinner59.getSelectedItem().toString()+
"|"+spinner60.getSelectedItem().toString()+"|"+spinner61.getSelectedItem().toString()+"|"+mdotre.getText().toString()+
"|"+efftot2.getText().toString()+"|"+nbrett2.getText().toString()+"|"+nbretv2.getText().toString()+
"|"+nbretvg2.getText().toString()+"|"+spinner62.getSelectedItem().toString()+"|"+spinner63.getSelectedItem().toString()+
"|"+spinner64.getSelectedItem().toString()+"|"+mdotre3.getText().toString()+"|"+efftot3.getText().toString()+
"|"+nbrett3.getText().toString()+"|"+nbretv3.getText().toString()+"|"+nbretvg3.getText().toString()+
"|"+spinner65.getSelectedItem().toString()+"|"+spinner66.getSelectedItem().toString()+"|"+spinner67.getSelectedItem().toString()+
"|"+mdotre4.getText().toString()+"|"+efftot4.getText().toString()+"|"+nbrett4.getText().toString()+
"|"+nbretv4.getText().toString()+"|"+nbretvg4.getText().toString()+"|"+spinner68.getSelectedItem().toString()+
"|"+spinner69.getSelectedItem().toString()+"|"+spinner70.getSelectedItem().toString()+"|"+mdotre5.getText().toString()+
"|"+efftot5.getText().toString()+"|"+nbrett5.getText().toString()+"|"+nbretv5.getText().toString()+
"|"+nbretvg5.getText().toString()+"|"+spinner71.getSelectedItem().toString()+"|"+spinner72.getSelectedItem().toString()+
"|"+spinner73.getSelectedItem().toString()+"|"+mdotre6.getText().toString()+"|"+efftot6.getText().toString()+
"|"+nbrett6.getText().toString()+"|"+nbretv6.getText().toString()+"|"+nbretvg6.getText().toString()+
"|"+spinner74.getSelectedItem().toString()+"|"+spinner75.getSelectedItem().toString()+"|"+spinner76.getSelectedItem().toString()+
"|"+mdotre7.getText().toString()+"|"+efftot7.getText().toString()+"|"+nbrett7.getText().toString()+
"|"+nbretv7.getText().toString()+"|"+nbretvg7.getText().toString()+"|"+spinner77.getSelectedItem().toString()+
"|"+spinner78.getSelectedItem().toString()+"|"+spinner79.getSelectedItem().toString()+"|"+mdotre8.getText().toString()+
"|"+efftot8.getText().toString()+"|"+nbrett8.getText().toString()+"|"+nbretv8.getText().toString()+
"|"+nbretvg8.getText().toString()+"|"+spinner80.getSelectedItem().toString()+"|"+spinner81.getSelectedItem().toString()+
"|"+spinner82.getSelectedItem().toString()+"|"+mdotre9.getText().toString()+"|"+efftot9.getText().toString()+
"|"+nbrett9.getText().toString()+"|"+nbretv9.getText().toString()+"|"+nbretvg9.getText().toString()+
"|"+spinner83.getSelectedItem().toString()+"|"+spinner84.getSelectedItem().toString()+"|"+spinner85.getSelectedItem().toString()+
"|"+mdotre10.getText().toString()+"|"+spinner86.getSelectedItem().toString()+"|"+etn.getText().toString()+
"|"+spf.getText().toString()+"|"+etn2.getText().toString()+"|"+spf2.getText().toString()+"|"+etn3.getText().toString()+
"|"+spf3.getText().toString()+"|"+etn4.getText().toString()+"|"+spf4.getText().toString()+
"|"+spinner87.getSelectedItem().toString()+"|"+spinner88.getSelectedItem().toString()+"|"+spinner89.getSelectedItem().toString()+
"|"+qtems.getText().toString()+"|"+qtems2.getText().toString()+"|"+qtems3.getText().toString()+"|"+qte.getText().toString());
//Si le numéro est supérieur à 4"length() > 0" <charactère et que le message n'est pas vide on lance la procédure d'envoi
if(num.length()>= 10 && msg.size()> 0){
//Grâce à l'objet de gestion de SMS (SmsManager) que l'on récupère grâce à la méthode static getDefault()
//On envoit le SMS à l'aide de la méthode sendTextMessage
SmsManager.getDefault().sendMultipartTextMessage(numero, null, msg, null, null);
//sendTextMessage(numero, null, msg, null, null);
//sendTextMessage(numero, null, msg, null, null);
//On efface les deux EditText
num.setText("");
qte.setText("");
Toast.makeText(getBaseContext(), "Message envoyé!", Toast.LENGTH_SHORT).show();
}else{

//On affiche un petit message d'erreur dans un Toast
Toast.makeText(getBaseContext(), "Veuillez entrer le numéro!", Toast.LENGTH_SHORT).show();
}


}
});

}

}

P.S: To understand comments in french, please use google translator :)
masterv
Freshman
Freshman
 
Posts: 3
Joined: Fri Nov 09, 2012 1:55 pm

Top

Return to Advanced Tutorials

Who is online

Users browsing this forum: Google [Bot] and 4 guests