|
yes sir i try to send like this
sms.sendTextMessage("609,606,", null, message, null, null);
But result is only first number got SMS rest is skip.
Please help me
|
|
|
|
|
Did you read my previous message? Did you check the syntax of the sendTextMessage() command in the link I gave you?
I must get a clever new signature for 2011.
|
|
|
|
|
yes sir i read and check.Destination number type is string and i try to put there array values.
Sir please help me
|
|
|
|
|
MsmVc wrote: i try to put there array values.
Yes but you are only allowed to put a single number in that field as I pointed out before. Try reading through the documentation more carefully.
I must get a clever new signature for 2011.
|
|
|
|
|
Use a loop and an array list -.-
ArrayList pNumbers = new ArrayList();
pNumbers.Add("6194442221");
pNumbers.Add("6194442222");
pNumbers.Add("6194442223");
pNumbers.Add("6194442224");
for(int i = 0; i < pNumbers.Count - 1; i++)
{
sms.sendTextMessage(pNumbers[i], null, message, null, null);
}
|
|
|
|
|
Isn't this what was proposed weeks ago?
I must get a clever new signature for 2011.
|
|
|
|
|
Is there a specific reason why you have not put the sendTextMessage inside the loop?
for (String string : myArr) {
sm.sendTextMessage(string, null, message, null, null);
}
Of course it would be advisable to implement the send and delivered intents.
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
The array contains a list of numbers, not messages. He is trying to send a single message to multiple numbers.
I must get a clever new signature for 2011.
|
|
|
|
|
Right, and he was trying to concatenate the numbers into a delimited string and call the function once, I suggested, that instead of calling the sendTextMessage function once with a delimited string of numbers, he could try calling the function multiple times with each of the numbers.
Anyways, it seems it isn't working for him. I'll try it out myself and see if I can figure why not.
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
My apologies, I totally mis-read that line; I suspect my brain was powered off.
I must get a clever new signature for 2011.
|
|
|
|
|
Richard MacCutchan wrote: my brain was powered off.
No Problem, I've been there too often
I have posted below, some code that worked on my emulators and another forum link that suggested the solution.
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
Thanks for reply but result is same,one first number got sms.
Really i stuck here,now i need some extra ordinary tips or example to solve that problem.
Please help me
|
|
|
|
|
Well, this worked for me.
package com.partho.smstomany;
import android.app.Activity;
import android.os.Bundle;
import android.content.Intent;
import android.net.Uri;
import java.util.StringTokenizer;
import android.app.PendingIntent;
import android.telephony.SmsManager;
public class pSMSToMany extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
String message = "Some Message";
String phoneNo = "5556;5558";
StringTokenizer st=new StringTokenizer(phoneNo,";");
while (st.hasMoreElements())
{
String tempMobileNumber = (String)st.nextElement();
if(tempMobileNumber.length()>0 && message.trim().length()>0) {
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(tempMobileNumber, null, message, null, null);
}
}
}
}
Actual code from Here[^]. Dumbed down to try it out.
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
Hello
I'm writing bluetooth client application for my mobile phone and I got stuck on device discovery.
My app can't discover any device, although in-built bluetooth app works fine. How can I make it work?
My code for device discovery:
localDevice = LocalDevice.getLocalDevice();
discoveryAgent = localDevice.getDiscoveryAgent();
discoveryAgent.startInquiry(DiscoveryAgent.GIAC,this);
modified on Sunday, February 27, 2011 1:50 PM
|
|
|
|
|
What you have done so far is initiate a search, which can take a long time. You have two ways to get the results:
1. write inquiryCompleted() in your DiscoveryListener implementation, and, when (or after) it is called, use discoveryAgent.retrieveDevices() to get an array of devices that have been discovered.
2. write deviceDiscovered() in your DiscoveryListener implementation, and, each time it is called, see if the device is what you are looking for.
I tried both ways (and they both work), but settled on #1 for production code.
Peter
If you like the answer, vote for it
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Thank you for reply but I have these methods implemented. The problem is that my app can't find any device, though at least one - my laptop - is on and is discoverable. I can easily connect with it through in-built bluetooth app. Yet, another thing that puzzles me is why I can't get bluetooth address and friendly name from LocalDevice object. The only thing I get is empty string or null and my app suspends.
Well it seems that the problem is caused by my phone. I rebooted it, launched my app and it worked but only once. Anyway I think that this topic can be considered as closed.
|
|
|
|
|
In my experience, the phone's bluetooth manager can get totally confused if you do something it doesn't expect. The result is as you describe - reboot, your code works once (but the BT manager is locked up). I've found that you need to try and get "inside it's head" and imagine what state various BT internals might be in. Then avoid anything that might upset it. It took me a long time to develop code that could reliably switch the phone's BT connection back and forth between two external devices (PC, printer). Then when I tried it on a different brand of phone, I had to modify it again...
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Hi,
Am trying to get celltowerinfo using C# and Windows Mobile 6 Pro in a Location based application. I get error message "cant find PInvoke DLL' ril.dll'
I thought this dll comes with Windows Mobile. Any Ideas how I can get the dll and reference it in my project coz am new in this area?
Also I need to use this info to track cab drivers using Google Maps. Do I have to deploy the dll in each of their cellphones?
Any help will be highly appreciated.
Eric
|
|
|
|
|
Eric Nzai wrote: I thought this dll comes with Windows Mobile
It depends on the manufacturer of the phone. Each OEM has a slightly different build of Windows Mobile - it's up to them to decide what components they include (via Platform Builder). The functionality of ril.dll is somewhere in the build but your manufacturer has obviously put it somewhere other than the standard DLL. Unless you contact the manufacturer, you're basically out of luck.
Judy
Be wary of strong drink. It can make you shoot at tax collectors - and miss.
Lazarus Long, "Time Enough For Love" by Robert A. Heinlein
|
|
|
|
|
Hi all
Can i run android .apk file in hidden mode?Please help me
|
|
|
|
|
What do you mean Hidden mode? If you want to create an application without a UI, you might try looking at a Service[^]
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
Ok thanks for information
|
|
|
|
|
lol
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
|
hi
how to Mark and Pick all row number 1 on DataGrid when the form load ?
on Windows-mobile
thanks in advance
|
|
|
|