[
https://issues.apache.org/jira/browse/FLEX-33591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13707746#comment-13707746
]
Saju Thankathurai commented on FLEX-33591:
------------------------------------------
As per suggestion, i have removed encodeURIComponent. I have added callLater
method to invoke all the mobile numbers.. Here is the code below.. But could
not succeed.
public function grpeMsgMenu_clickHandler():void
{
var groupSmsString:String = "";
var phoneCollection:ArrayCollection = new
ArrayCollection();
phoneCollection =
srv.populatePhoneNumbersForGroupMsg("group");
mobArray = phoneCollection.source;
openWindows(0);
}
private function openWindows(n: Number):void {
if (n < this.mobArray.length) {
navigateToURL(new
URLRequest("sms:"+this.mobArray[n]));
callLater(openWindows, [n+1]);
}
}
mobArray contains array of phone numbers...
I thought if i select 8 mobile numbers, Message box would open 8 times one
after another. But it didnt..
>From the OReilly books i read as "Android currently does not support multiple
numbers or a body argument for a text message, but it does support
multiple emails and a body argument for an email."
I am afraid whether sending phone numbers with comma separated could not be
achieved currently. Any alternative method to achieve this?
> How to add comma separated numbers in the address field of message
> ------------------------------------------------------------------
>
> Key: FLEX-33591
> URL: https://issues.apache.org/jira/browse/FLEX-33591
> Project: Apache Flex
> Issue Type: Bug
> Components: .Unspecified - Mobile
> Affects Versions: Adobe Flex SDK 4.6 (Release)
> Environment: Mobile
> Reporter: Saju Thankathurai
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira