I am developing an app and would like to attach my location to a message and make this location "clickable" so that they can see it on a map/get a link which opens a map.
I am getting the correct location and store it into currentPosition but I am not able to send it so that the user can click on the link/map and see where I am. Is this even possible with the Windows Phone
var smsComposeTask = new SmsComposeTask();
var message = Message;
message += string.Format("\r\n My location is\r\n {0}",_currentPosition);
smsComposeTask.Body = message;
smsComposeTask.Show();
I think this is not possible because SMS body is plain text. It would depend on the receiver's sms app implementation, whether it recognizes location in sms body or not. For e.g. if you send a phone number or link in plain text in sms, it appears as a clickable number or hyperlink to the receiver only if his/her sms app displays it as such. Also i think wp8's native sms app uses mms to send location and there is no api to send a mms.
you can send it by using a link composer. So when you have found the position you should send it as a link. You can try and look at the app "I'm Here" in the store.
Related
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.
I am making a game for my windows phone, using Visual Studio 2012 for Windows Phone and it went good from there, I wrote a few classes, and added assets but I encountered a problem.
I wanted to make a bug request / idea method, but no-where could I find where to email with XNA. I searched on Google but it came up with stuff like "How to use XNA game studio" and at the bottom it said stuff like "email us" so I never found it out. Basicley I couldn't find it. Can anyone help me out?
You can send an email out using the EmailComposeTask class in WP8. But it not totally automatic, the user has to select the account to send the email with then the Email display pops up then they have to click on send button. You can try it like this:
How to use the email compose task for Windows Phone 8
using Microsoft.Phone.Tasks;
// do this when the page has load completely (not in the constructor)
EmailComposeTask emailComposeTask = new EmailComposeTask();
emailComposeTask.Subject = "message subject";
emailComposeTask.Body = "message body";
emailComposeTask.To = "recipient#example.com";
emailComposeTask.Cc = "cc#example.com";
emailComposeTask.Bcc = "bcc#example.com";
emailComposeTask.Show();
However, I don't think this is what you want. What I would do instead because it's difficult to do the email thing silently is create a webpage, that you can POST to. You then can just open a WebClient and POST the data that you need to that website. Then on the website's back end, just decode the POST[DATA] into a database.
Hope this helps you, good luck.
As mentioned in the other answer, you may want to consider just opening a web page with a form for them to fill out, rather than writing emails within your app.
If so, here is the code to open a webpage on Windows Phone from an XNA game (using http://www.google.com/ as an example.:
WebBrowserTask browser = new WebBrowserTask();
browser.Uri = new Uri("http://www.google.com/", UriKind.Absolute);
browser.Show();
How do I capture a webpage as an image and send it embedded in an email.
This is what I want to do.
Users are logged on this website. They will be browsing many products, when they click on the email button the webpage containing the list of products will be captured and send to their email address embedded in the body of the email.
Technology I would like to use:
C# .net
The customers' information is stored in a SQL server database.
I have been experimenting with web browser control, but I don't know if that will work.
Is it important that the "capture" is actually a physical image or is the content of the order what's most important? If you can send the content of the order, i.e. the order lines, you can just put the exact same HTML as you output in the browser in the e-mail you would like to send, using the MailMessage class:
using (MailMessage message = new MailMessage("from#example.com", "to#example.com"))
{
message.Subject = "Your order";
message.Body = "<ul><li>Your</li><li>Order</li><li>Lines</li><li>Here</li></ul>";
message.IsBodyHtml = true;
using (SmtpClient smtp = new SmtpClient("smtp.host.example"))
{
smtp.Send(message);
}
}
You can capture the webpage as a quality image with a screenshot extension from the chrome web store that can be installed for free. You will be able to capture either the visible screen, full-page or custom area capture within a few clicks. Once the image has been captured, you can save it as a PDF or PNG and then use the saved image to be sent over by mail to the concerned party.
One such tool you can use could be the Goscreenshotting - Screenshotting extension which can help you save screenshots in multiple ways and formats to be shared over mail or any other medium.
You can also capture the webpage with the stock app on Windows - Snipping tool. But this will only allow for visible screen and custom area snips and not the full screen capture.
If you are using Mac OS, you will be able to capture the screen with the following shortcuts :
Command + Shift + 3
Command + Shift + 4
Command + Shift + 5
in toast message in windows phone 7, when clicking on that message the
application opens thats fine,
i just want to navigate to specific page when the toast message is clicked,
is there any way to do it?
both in 7 and mango update???
or
in http://samidipbasu.com/2011/06/14/push-notification-payloads/ in this link when we read for toast notification, we have an extra parameter called wp:Param in xml format to send. How they were sending this wp:Param data in windows 7.0(before mango update). Any idea ??
Support for navigating to a particular page is supported in Mango. Below is an example that does not require an HTTP channel, but must be executed by a background agent (not the application itself):
var toast = new ShellToast
{
Title = "Title",
Content = "Toast content",
NavigationUri = new Uri("/SomeOtherView.xaml", UriKind.Relative)
};
toast.Show();
NOTE: The NavigationUri functionality is also supported by toast sent via HTTP push notifications
#curiosity .. Toast & Tile payloads are pre-defined so that the OS can process these bits coming from MPNS after your app registers shellToast/shellTile. The extra parameters in the payloads are supposed to supported starting with Mango. As your app's first page (or whichever XAML page is in the URL) launches from the deep-toast, the developer should be able to listen in on the OnNavigatedTo() event to do something special with the params in the incoming URL (query string). Please see some later posts on my blog for examples & let me know if it helps.
Thanks!
all the info you need to know about push notifications is here
One of the requirements for the application that I'm working on is to enable users to submit a debugging report to our helpdesk for fatal errors (much like windows error reporting).
I've been told that e-mails must come from a client's mail account to prevent the helpdesk getting spammed and loads of duplicate calls raised.
In order to achieve this, I'm trying to compose a mail message on the server, complete with a nice message in the body for the helpdesk and the error report as an attachment, then add it to the Response so that the user can download, open and send it.
I've tried, without success, to make use of the Outlook Interoperability Component which is a moot point because I've discovered in the last 6 hours of googling that creating more than a few Application instances is very resource intensive.
If you want the user to send an email client side, I don't see how System.Net.Mail will help you.
You have two options:
mailto:support#domain.com?subject=Error&body=Error message here...
get user to download email in some format, open it in their client and send it
Option 1 will probably break down with complex bodies. With Option 2, you need to find a format that is supported by all mail clients (that your users use).
With option 1, you could store the email details locally on your server against some Error ID and just send the email with an Error ID in the subject:
mailto:support#domain.com?subject=Error 987771 encountered
In one of our applications the user hits the generate button and it creates and opens the email in outlook. All they have to do is hit the send button. The functions is below.
public static void generateEmail(string emailTo, string ccTo, string subject, string body, bool bcc)
{
Outlook.Application objOutlook = new Outlook.Application();
Outlook.MailItem mailItem = (Outlook.MailItem)(objOutlook.CreateItem(OlItemType.olMailItem));
/* Sets the recipient e-mails to be either sent by 'To:' or 'BCC:'
* depending on the boolean called 'bcc' passed. */
if (!(bcc))
{
mailItem.To = emailTo;
}
else
{
mailItem.BCC = emailTo;
}
mailItem.CC = ccTo;
mailItem.Subject = subject;
mailItem.Body = body;
mailItem.BodyFormat = OlBodyFormat.olFormatPlain;
mailItem.Display(mailItem);
}
As you can see it is outputting the email in plaintext at the moment because it was required to be blackberry friendly. You can easily change the format to HTML or richtext if you want some formatting options. For HTML use mailItem.HTMLBody
Hope this helps.
EDIT:
I should note that this is used in a C# Application and that it is referencing Microsoft.Office.Core and using Outlook in the Email class the function is located in.
The simple answer is that what you are trying to achieve isn't realistically achievable across all platforms and mail clients. When asked to do the improbable it is wise to come up with an alternative and suggest that.
Assuming that your fault report is only accessible from an error page then you've already got a barrier to spam - unless the spammers can force an exception.
I've always handled this by logging the fault and text into the database and integrating that with a ticketing system. Maybe also have a mailto: as Bruce suggest with subject=ID&body=text to allow the user to send something by email.
I don't think an .eml format file will help either - because they'll need to forward it, and most users would probably get confused.
A .eml is effectively plain text of the message including headers as per RFC-5322.