YE

Enviado desde mi HTC

----- Reply message -----
De: "Saju Thankathurai" <sathikeshj...@gmail.com>
Para: <flexcoders@yahoogroups.com>
Asunto: [flexcoders] Re: How to add comma separated mobile numbers in TO 
address of Message?
Fecha: sáb., jun. 15, 2013 01:37




Can some one please help me on this issue...
On 13 Jun 2013 07:02, "Saju Thankathurai" <sathikeshj...@gmail.com> wrote:

> Hi All,
>
> I have developed a Flex mobile application using Flex 4.6 sdk. Its a
> Contact manager application. I have given additional functionality to the
> Employee contact manager sample app of Adobe.
>
> I am facing an issue while sending a group message.
>
> I have a xml file to store user data. Later i use sqlite db to read and
> store the xml data into the dataBase.
>
> I have a requirement, If we click on a menu item, Message box should be
> opened and all the mobile numbers should be populated in the TO address.
>
> So i have a menuItem
>
> *<s:viewMenuItems>*
> * <s:ViewMenuItem id="grpeMsgMenu" label="Group Msg"
> click="grpeMsgMenu_clickHandler(event)"/>*
> * </s:viewMenuItems>*
>
> On click of this,,
>
> public function grpeMsgMenu_clickHandler():void
>  {
>  var groupSmsString:String = "";
>  // TODO Auto-generated method stub
> var phoneCollection:ArrayCollection = new ArrayCollection();
> phoneCollection = srv.populatePhoneNumbersForGroupMsg("group");
>  if(phoneCollection != null)
> {
> for(var i:int = 0 ; i < phoneCollection.length ; i++)
>  {
> if(i == phoneCollection.length-1)//means last record is going to insert,
> So dont append comma
>  {
> groupSmsString += phoneCollection[i];
> }
>  else
> {
> groupSmsString += phoneCollection[i] + ",";
>  }
> }
> }else
>  {
> //Phone arrayCollection is null.
> groupSmsString = "";
>  }
> if(groupSmsString != "")
> navigateToURL(new URLRequest("sms:"+encodeURIComponent(groupSmsString)));
>  trace(groupSmsString);
> }
>
> Where srv is the DAO class, It calls the method, Executes the query and
> returns all the phone numbers from the .db file.
>
> Finally the groupSmsString holds the value as [*
> +919223454345,+919565678876,+9192233223344,+919122221111*] and so on
>
> So i have comma separated values to be passed to the TO field of SMS.
>
> The problem is in the TO field of message, the groupSmsString is not
> coming as comma separated, rather it is coming as 
> *+919223454345+919565678876+9192233223344+919122221111
>    *
> *
> *
> This problem is observed in LG Optimus mobile. But strangely it is working
> fine in Sony Xperia.
>
> I spent many times in tracing the issue, by
> 1.replacing encodeURIComponent with encodeURI,
> 2.without using  encodeURIComponent and encodeURI
> 3.passing %2c instead of comma..
>
> But could not succeed.
>
> Can any one help me on this issue?
> --
>
> Regards
> Saju Thankathurai,
>
> *"We **cannot do great things on this Earth, only small things with great
> love"*
> *-Mother Teresa (1910-1997)*
>
>

Reply via email to