I am trying to open out look from metro application (vs2012, windows store app).I used the following code:
var mailto = new Uri("mailto:?rbethamcharla#hotmail.com");
await Windows.System.Launcher.LaunchUriAsync(mailto);
But I am always getting access denied error.Could some one please let know how to enable this acess of outlook from windows 8 store app programmatically.
Thanks & Regards
Ravi Kumar B
First of all Need to check the url the code should be
var mailto = new Uri("mailto:rbethamcharla#hotmail.com");
await Windows.System.Launcher.LaunchUriAsync(mailto);
then it receives the email address. Secondly you can go through the link from msdn
access outlook MSDN
Some steps might be helpful. Try making outlook your by default mail client.
Related
we’re developing a (iOS) phonebook app using Xamarin.
From our app we want to be able to start Kaizala (iOS) App and open a chat to a specific number, ideally using an URI schema like below:
Here is an example of how we did this for MS Teams (iOS) and WhatsApp (iOS):
// try open MSTeams and open a chat to user (CommandParameter)
await Launcher.TryOpenAsync(new Uri("https://teams.microsoft.com/l/chat/0/0?users=" + CommandParameter));
// try open WhatsApp and open a chat to user (CommandParameter)
await Launcher.OpenAsync(new Uri("whatsapp://send?phone=" + CommandParameter));
is that possible for kaizala as well? didn’t find an answer while searching through the docs.
Is there a similar URI schema for Kaizala App? Or an alternative way to achieve this?
Please advise, Thank a lot!
I need to write an Cortana extension (app, experience, plugin, etc..) that will receive a query from the user and based on this query construct an webpage URL and open that URL in the default client browser. My question is, can an App do that? Could you share any code example? Can this app run both on cell phones and windows laptops/desktops?
I believe so. You can create an app that implements Windows.ApplicationModel.AppService IBackgroundTask cortana will activate your background service if you register a VCD file with the right 'ListenFor' commands. You wire your app via "VoiceCommandService Target=".
Your background app would then launch the default browser.
Here is a step by step guide.
Here is the code:
string uriToLaunch = #"http://www.bing.com/";
var uri = new Uri(uriToLaunch);
await Windows.System.Launcher.LaunchUriAsync(uri);
I'm writing Universal app (WinStore 8.1 + WinPhone 8.1). For my requirements I need to retrieve all device contacts. It's OK on WinPhone - here is code how I do that:
var contactStore = await ContactManager.RequestStoreAsync();
var contacts = await contactStore.FindContactsAsync();
But how to do that in WinStore app?
It is not possible by design I am afraid.
Tt's not possible to get the information from the people app. It works within calendar, mail or messenger because they're all technically contained within the same app and are able to use each other's data and violate normal rules.
You can always use the ContactPicker.
This might help.
When ever I used this below piece of code, it launches the messaging app, i don't want that. I want to send SMS within my app. How to do that. any ideas ?
Code
SmsComposeTask smsComposeTask = new SmsComposeTask();
smsComposeTask.To = "9012345566778"; // Mention here the phone number to whom the sms is to be sent
smsComposeTask.Body = "Hello! How are you"; // the string containing the sms body
smsComposeTask.Show(); // this will invoke the native sms edtior
You can't send a SMS directly from your app. Using the SmsComposeTask (and therefore displaying the message hub) is the only way.
I think KooKiz is right. windows phone is cared for its security.
I am developing a Windows Store Application (Windows 8).
I have a need to send emails based on data and address stored in the application data and without the need of the user to type it the data or the address.
What would be the right/easy way to implement it?
EitanB
You can try with
var mailto = new Uri("mailto:?to=recipient#example.com&subject=The subject of an email&body=Hello from a Windows 8 Metro app.");
await Windows.System.Launcher.LaunchUriAsync(mailto);
The correct way would be to use Sharing. Your app should create an HTML document or Text and share it. The user would select Mail from the Share charm and the HTML/Text would become the body of the email.
See here for more info...
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh973055.aspx
This is the correct syntax to use for a mailto: link (unlike the other examples above with a mailto: which are incorrect..)
var mailto = new Uri("mailto:yourname#email.com?subject=" + subject + "&body=" + body);
await Launcher.LaunchUriAsync(mailto);
The problem with the mailto: method is if the user has no client program associated with mailto: nothing will happen.
The most reliable method to use is a web service or WCF service of some sort. Using the Share Charm while considered the 'correct' way on Windows 8, is not neccessarily the best as the user may still have no email client installed, for example if they rely on gmail.com for their email.
If you are developping a Universal WinRT Windows Phone application, you could use the "Windows.ApplicationModel.Email.EmailMessage" namespace as the "Microsoft.Phone.Tasks.EmailComposeTask" namespace doesn't work on WinRT application.
Then, uses this code to create and launch a new email.
// Create your new email message.
var em = new EmailMessage() ;
// Add as much EmailRecipient in it as you need using the following method.
em.To.Add(new EmailRecipient("yourname#yourdomain.com"));
em.Subject = "Your Subject...";
em.Body = "Your email body...";
// You can add an attachment that way.
//em.Attachments.Add(new EmailAttachment(...);
// Show the email composer.
await EmailManager.ShowComposeNewEmailAsync(em);
I hope it will solve your (or other developers) problem.
Regards.
It's always possible to connect to an SMTP server and issue commands like HELO, MAIL, RCPT, etc. Of course you'll need an SMTP server to connect to. I use this on our corporate intranet to send emails.