I'm trying to get a complete list of all calendars. If I list
(new Appointments()).Accounts
I get only accounts like "Windows Live" or "Google". Actually I need a way to get the calendars and the appointments to that calendar inside the accounts. But it has to be on any account, not only the Live Account. Read only access is enough though. Is there any possibility?
If there is no chance, is this possible under WP8? Yes, I know, hardware capabilities were to high for this feature under WP7.8.
There is a method Appointments.SearchAsync which you should use. There is quite a nice example on MSDN:
Appointments appts = new Appointments();
appts.SearchCompleted += new EventHandler<AppointmentsSearchEventArgs>(Appointments_SearchCompleted);
DateTime start = DateTime.Now;
DateTime end = start.AddDays(7);
appts.SearchAsync(start, end, "Appointments Test #1");
Within callback function you'll have access to args.Results of type IEnumerable<Appointment>.
This is available on both WP7.1 and WP8.
Related
How can I get an app's acquisition date?
I tried using StoreContext - ExtendedJsonData() but it didn't have that information.
Many UWP devs have asked about this and it's true... you can't ask for this value. You can only get the purchase or first-time download date.
However, you can try this trick. It's just a workaround, so don't blame me if one day it fails you :)
var properties = await Package.Current.InstalledLocation.GetBasicPropertiesAsync();
var installationDate = properties.ItemDate; // Maybe?
Let me know if it works for you.
I am working with windows ce for an application that needs to be authenticated before use. I don't want the end user to have to enter a username and password which is static everytime the device is turned on. Is there any way to do something like that? I was able to acheive it in a windows form application but i haven't seen anything on Stack or in the MSDN that will help me do that. My code for the forms app is below but it wont work in the Compact Framework.
//string doc = webBrowser1.DocumentText;
//HtmlElement userValue = doc.GetElementById("username");
//userValue.SetAttribute("value", "devacc");
//HtmlElement passValue = doc.GetElementById("password");
//passValue.SetAttribute("value", "zzq15354");
//HtmlElement subButton = doc.GetElementById("submit");
//subButton.InvokeMember("click");
I believe your going to need to verify user/device another way. I would probably save the devices MEID(Dec) # (which is unique) to your user data then allow access if signed in ON that specific hardware.. Here is a thread on how to find that number Find Serial Number
I am making an application in which I have to launch an game page when the alarm shoots on windows phone
actually you saw someone reply in a post n m really like to know
how is it possible?
You can do this by setting up a reminder. Use the following code to do this -
//Create a reminder
Reminder myReminder = new Reminder("buy milk");
myReminder.Title = "Buy Milk";
myReminder.Content = "Don't forget to buy milk!";
myReminder.BeginTime = DateTime.Now.AddSeconds(10);
myReminder.ExpirationTime = DateTime.Now.AddSeconds(15);
myReminder.RecurrenceType = RecurrenceInterval.None;
myReminder.NavigationUri = new Uri("/MainPage.xaml?fromReminder=1", UriKind.Relative);
//Add the reminder to the ScheduledActionService
ScheduledActionService.Add(myReminder);
The NavigationUri property is used to specify the page to which you want to launch the application to. Here are a couple of links for more information
Tutorial
MSDN
I need help with integrating facebook into my desktop application. It's developed with C# - target framework is .NET framework 4.0.
I'm using http://facebooktoolkit.codeplex.com/
The problem is that I can't get the users albums although my app has permission for it, and for all to be more confusing I can get statuses, comments, friends, etc.
I have this in designer:
this.fbMyApp = new Facebook.Winforms.Components.FacebookService(this.components);
this.fbMyApp.ApplicationKey = "myappkey_goes_here";
this.fbMyApp.SessionKey = null;
this.fbMyApp.uid = ((long)(0));
And I've used this code(I've set all permissions for testing purposes):
fbMyApp.ConnectToFacebook(new List<Facebook.Schema.Enums.ExtendedPermissions>() {
Facebook.Schema.Enums.ExtendedPermissions.create_event,
Facebook.Schema.Enums.ExtendedPermissions.create_note,
Facebook.Schema.Enums.ExtendedPermissions.email,
Facebook.Schema.Enums.ExtendedPermissions.offline_access,
Facebook.Schema.Enums.ExtendedPermissions.photo_upload,
Facebook.Schema.Enums.ExtendedPermissions.publish_stream,
Facebook.Schema.Enums.ExtendedPermissions.read_mailbox,
Facebook.Schema.Enums.ExtendedPermissions.read_stream,
Facebook.Schema.Enums.ExtendedPermissions.rsvp_event,
Facebook.Schema.Enums.ExtendedPermissions.share_item,
Facebook.Schema.Enums.ExtendedPermissions.sms,
Facebook.Schema.Enums.ExtendedPermissions.status_update,
Facebook.Schema.Enums.ExtendedPermissions.video_upload
});
Now if I do this(after user has logged in):
MessageBox.Show("TOTAL statuses: " + fbMyApp.Status.Get().Count.ToString());
I will get the number of user statuses, and could read them. However if I do this:
MessageBox.Show("TOTAL albums: " + fbMyApp.Photos.GetAlbums().Count.ToString());
I get zero, although user has about 10 albums. I need this, cause this way I can access the album IDs and could be able to upload a photo to specific album. Any idea why this isn't working or does anybody have any better suggestion for some facebook toolkit for C#?
You need to request "user_photos" permissions from Facebook. I haven't used this toolkit as I prefer to make simple graph rest calls dynamically instead of having a huge library. I imagine you could download the source and recompile it, adding the missing permission. You could also switch to this library which is alot more up to date with current Facebook functionality.
i am building a csharp application and i would like a dropdown list of all users in my outlook global address book (the same one when i click on To: from outlook gui. is this possible to get this progrmaticall? what are the security requirements here?
Security ramifications, in addition to the Outlook dependency left me unable to use this approach, in the past. As a result, I ended up building this in the form of an LDAP query. Another plus is that, (in response to your other question) you will be able to extract contact information because this information is stored in the Active Directory.
DISCLAIMER: It has been almost five years since I have looked at this code, so I'm afraid I no longer fully understand the query. Hopefully it's enough to get you started, however.
DirectoryEntry adFolderObject = new DirectoryEntry();
DirectorySearcher adSearcher = new DirectorySearcher(adFolderObject);
adSearcher.SearchScope = SearchScope.Subtree;
adSearcher.Filter = "(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(!(homeMDB=*))(!(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*))) ))";
foreach (SearchResult adObject in adSearcher.FindAll())
{
Console.WriteLine("CN={0}, Path={1}", adObject.Properties["CN"][0], adObject.Path);
}