Target Platform : Samsung S6 - Android
Development base : Unity3D using C#
Intention :
Send a picture (MMS) shot within an app to any desired phone number within Canada. This app is supposed to be preloaded to a single Samsung S6.
Questions :
I was unable to find any Unity samples within you SDK, however I was wondering if anyone knows Unity samples for my intended use. However planned to use these scripts as first of reference.
Though the Android Phone number which is used to send MMS can be associated with Twilio the receiver would have no association with Twilio as the sender phone number is not something we would know until the photo is taken - hence is this a concern?
I see that from from the API call
// Send a new outgoing MMS by POSTing to the Messages resource */
client.SendMessage(
"YYY-YYY-YYYY", // From number, must be an SMS-enabled Twilio number
person.Key, // To number, if using Sandbox see note above
// message content
string.Format("Hey {0}, Monkey Party at 6PM. Bring Bananas!", person.Value),
// media url of the image
new string[] {"https://demo.twilio.com/owl.png" }
);
the fourth and final parameter is a URL link. Can link of the image be from any server or should it only be from twilio's server?
Thank you very much for time. Highly appreciate it.
Here you are. As far as I know this works like a charm.
Related
Im currently working on a Mobile application which connects to a Ble peripheral and reads data from it. In order to test if the connection is working. I have written a small C# application that utilizes the RaspberryPi4 bluetooth via DBus with BlueZ.
Everything works except that when connecting to iOS a pairing request is issued by the raspberry, eventhough I do not have any encrypted characteristics.
I have read on the Apple forum that this is because bluetoothd is automaticly trying to read the battery level of the phone. But sadly even after the fix suggested there I get the pairing requests.
Does anyone have an idea how I could fix this?
Thanks in advance
I believe disabling this bluez config option in /etc/bluetooth/main.conf would prevent the pi from trying to read characteristics from the iOS device, if that is the issue:
# Do reverse service discovery for previously unknown devices that connect to
# us. For BR/EDR this option is really only needed for qualification since the
# BITE tester doesn't like us doing reverse SDP for some test cases, for LE
# this disables the GATT client functionally so it can be used in system which
# can only operate as peripheral.
# Defaults to 'true'.
#ReverseServiceDiscovery = true
Check the connection min and max intervals, they shall be compliant with the iOS guidelines: https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf (page 180 - 40.6 Connection Parameters).
You can tune them like this:
echo "30" > /sys/kernel/debug/bluetooth/hci0/conn_min_interval
echo "45" > /sys/kernel/debug/bluetooth/hci0/conn_min_interval
The default values worked for me: [24,40]
i have bot made using c#. It has the feature of human off. We have integrated the solution provide by tompanna of human handoff where a agent can talk to single user at a time.Here the link of solution we used for human handoff https://github.com/tompaana/intermediator-bot-sample. Our bot is working fine and able to talk with agent with the help of this solution but major issue come when a user want to share image or any kind of attachments from user to agent or from agent to user. The bot show that image is send but user is not able to see it. Simpler case happen in the case of agent.
Image of agent while sending a attachment to user.
And also the image of user ,unable to see the image send by agent.
The sample which you are using for Human HandOff has not been updated over a year, so it gets difficult to be able to find solutions for supporting various features pertaining to the same. However, going through the sample issues, there has been a similar issue in which the sample does not support emojis, images or files to the receiving user. If a user sends any of the above mentioned features, the receiver will get a blank message as it supports only text messages.
Th tentative solution suggested by a user is to create a simple method extension to send image/file messages.You could go ahead and give it a try to see if it works for your case.
Hope this helps.
You need to edit the source code of the library to achieve what you are trying.
In this MessageRouter file , method RouteMessageIfSenderIsConnectedAsync , you can access message.Attachments , then pass it as a parameter to SendMessageAsync in line 432, then from SendMessageAsync in line 160 , you can pass it to CreateMessageActivity method and then in file ConnectorClientMessageBundle , you can access the attachment and attach it to messageActivity.
I have office program that I use for my work and there are a lot of partner information into database. One of column is Mobile Phone.
What I want to do is make is to connect my android phone to PC, run that office program and from there send one message to all partners from database.
How can I pass message and number to my android and then send sms?
I have read about sms sending from pc but I found something that works only with nokia phones, some programs, and something that is outdated.
My office program is made in c#/winfroms/firebird.
You have to write an api (Connection to users database and hande sending sms) with mvc and c# then you can write simple app in Android studio to send message to your api(with retrofit2 library). If you want more help. I can write some sudo code here.
If You have to send SMS by cell phone, you can get list of number by an api
MVC Api Controller to get Target Numbers from android:
public class SmsUsersController : ApiController
{
private Context db = new Context();
// GET: api/SmsUsers
public IQueryable<SmsUser> GetSmsUsers()
{
return db.SmsUsers;
}
}
and use retrofit to read api values:
http://square.github.io/retrofit/
Maybe a sms gateway can help you, https://github.com/ushahidi/SMSSync
I'm trying to write simple app, which sends short text message to cellphones in bluetooth adapter range.
My first try is sending files: I can send file from PC to cellphone, but i must enter PIN on cellphone, and on PC.
I would rather to send text messages (something like push message) - is it possible to send it without paring devices?
If isn't possible to send push messages, maybe I can send simple file without requesting PIN ?
I use 32feet library.
Sample code (used to send files to selected device)
static int BTSendFile(string adres, string FileName)
{
Uri uri = new Uri("obex://" + adres + '/' + Path.GetFileName(FileName));
ObexWebRequest req = new ObexWebRequest(uri);
req.ReadFile(FileName);
ObexWebResponse rsp = (ObexWebResponse)req.GetResponse();
return (int)rsp.StatusCode;
}
A quick answer would be; NO, you will ALWAYS need some kind of pairing.
But if you take a look at the different kinds of pairing out there, you would see that BT 2.1 supports Secure Simple Pairing (SSP) with the Just Works-mode. This allows you to pair devices (almost) without any user interaction. From Wikipedia:
Just works: As implied by the name, this method just works. No user interaction is required; however, a device may prompt the user to confirm the pairing process. This method is typically used by headsets with very limited IO capabilities, and is more secure than the fixed PIN mechanism which is typically used for legacy pairing by this set of limited devices. This method provides no man in the middle protection.
However, since "This method is typically used by headsets with very limited IO capabilities", it would probably not apply to the cellphones you are talking about, but I thought you should know :)
According to the offical Bluetooth Message Access Profile, i.e. the specific Bluetooth profile that deals with accessing SMS/MMS systems on phones via a remote device:
'The MCE device shall use the services of the MSE device only after successfully creating a secure connection. This includes exchanging of security initialization messages, creation of link keys, and enabling encryption'
From: https://developer.bluetooth.org/TechnologyOverview/Pages/MAP.aspx
There is also a link to the full spec there if you are interested.
This certtainly suggests that secure pairing is required, which I'd assume to involve the passkey. My experience is that once a device has been paired a connection can be made without repeating the pairing as long as that pairing is remembered by the devices (i.e. I've paired a device once and not had to do it again). As to simpler, non-keyed pairing mentioned by khellang above, I've not seen anything about this - if it is purely for devices like headsets then the security requirements may be lower due to their not likely wanting write access to a device?
I have mad an application for windows mobile which can do different mobile functions with the numbers the application has.
Anyway. I want to start the Text message application and send a phonenumber as an argument.
I have only found this:
SmsMessage sms = new SmsMessage();
sms.Body = "This is a message";
sms.To.Add(new Recipient(sNumber));
sms.Send();
But i want to use the text messaging application in the mobile device.
Any tip?
thanks in advance
As a start, have you looked to see if this discussion is relevant to what you want to do? One thing it mentions is using CE MAPI and COM interop. There's also the Mobile In The Hand library.
There are other links in that discussion too.
Take a look at the MessagingApplication class, in particular its DisplayComposeForm static method. You should be able to use a code snippet such as the following to get the built in messaging application to appear.
SmsMessage sms = new SmsMessage();
sms.Body = "This is a message";
sms.To.Add(new Recipient(sNumber));
MessagingApplication.DisplayComposeForm(sms);
I also have a blog post available with a sample application that in part demonstrates using this API - http://www.christec.co.nz/blog/archives/495.