|
I have a Windows Mobile application that requires to send a file to the Host PC. The idea is that no other software then ActiveSync should need to be installed on the PC. The file-transfer needs to be initiated from the mobile device.
I thought the easiest way to do this was simply to do it over the ActiveSync network connection but maybe I'm wrong...
I created a shared folder on the host PC and it seems it's visible from my application. I can also browse to it using File Explorer on the mobile device.
However I get a network share login error. It looks I need to login on the host PC in order to write to the share.
Is there any way to login on a network share from windows mobile using C# .net code?
I've found examples for software ruinning on a regular Windows desktop but they all call DLLs that don't exist on a mobile device.
Edit:
I ended up using CeCopy from Windows Mobile Developer Power Toys. While this can't be initiated from the device it turned out this was a acceptable solution anyway.
modified on Friday, March 4, 2011 6:26 AM
|
|
|
|
|
How to encrypt voice in mobile using any programming language
|
|
|
|
|
s@333 wrote: How to encrypt voice in mobile using any programming language
A stored voice-clip? Just as any other data
The text as it is spoken into the phone? Not possible.
I are Troll
|
|
|
|
|
Hi All
I am trying to send SMS through program.I am able to send text SMS on Single recipient(only one number) at a time but i try to send SMS more than one number.Then i have found some article,i read that article and implement it.But it's not working for me.
ArrayList<String> myArr = new ArrayList<String>();
myArr.add("557");
myArr.add("12178");
StringBuilder sb = new StringBuilder();
for (String string : myArr) {
sb.append(string);
sb.append(";");
}
sm.sendTextMessage(sb.toString(), null, message, null, null);
Please help me
|
|
|
|
|
MsmVc wrote: Then i have found some article
Where did you find it? Have you asked this question of the author?
What type of object is sm and what does the sm.sendTextMessage() method actually do?
I must get a clever new signature for 2011.
|
|
|
|
|
|
MsmVc wrote: I haven't ask question from author.
Now would be a good time.
Taking a look at SmsManager.sendTextMessage() [^] it would appear that it only accepts a single phone number in the first parameter (but I may be wrong); I would suggest you check that your syntax is valid for SMS.
I must get a clever new signature for 2011.
|
|
|
|
|
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
|
|
|
|