Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-33591

How to add comma separated numbers in the address field of message

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 4.6 (Release)
    • None
    • .Unspecified - Mobile
    • None
    • Mobile

    Description

      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.

      I feel it could be a bug, So posting in Jira.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sathikesh Saju Thankathurai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: