Source .. WP7 training kit, XNA part
I use it as a quick reminder ;)
I hope you can use it too.
Ok.. Nokia just announced the first “real” windows phones Lumia 800 and Lumia 710.
These both models looks great, but my favourite one is the Lumia 800, too bad I cannot buy it from Romania’s phone stores (I hope anyway to get it with some friend out there in UK).
Seeing that Telerik has already launched some Lumia 710 skins for windows phone emulator, that inspired me into creating my own Lumia 800 emulator skin (blue theme) which I will share with you for use.
Install steps:
- Backup the existing files from the emulator folder.(on a 64-bit machine, this is “C:\Program Files (x86)\Microsoft XDE\1.0\”)
- Extract the Zip into emulator folder overwriting old files.
- Re-launch windows phone emulator
Please enjoy it as much I do!
public static string ConnectionString = "Data Source=isostore:/SampleDB.sdf";
So you want to developed your next social media integrated Windows Phone application;
And you’re making heavy use of Facebook C# SDK.
But you’ll find out that all the authentication/authorization/delegation process is done entirely in a WebBrowser component and developer is just intercepting Navigated event of this component to process the server responses and capture the Access Tokens.
It comes a bit more trickier when you try to log-out in order to log-in with another credentials.
Not so much info over the internet, so here it was my solution that works just fine:
- when we wish to log-out we pass to the browser log-out URL:
wb.Navigate(new Uri("http://m.facebook.com/logout.php?confirm=1"));
- then on the navigated event of WebBrowser component we look for logout button, extract the logout Url and we force a navigation to this real logout Url:
private void wb_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
{
string fbLogoutDoc = wb.SaveToString();
Regex regex = new Regex("\\<A href=\\\"(.*)\\\".*data-sigil=\\\"logout\\\"");
MatchCollection matches = regex.Matches(fbLogoutDoc);
if (matches.Count > 0)
{
string finalLogout = string.Format("http://m.facebook.com{0}", matches[0].Groups[1].ToString());
wb.Navigate(new Uri(finalLogout));
}
}
This way the browser will not cache Facebook login cookies and next time when we intent to authenticate a new user/credentials the login screen will appear nicely. And of course, if we logout the user from a different screen as the login one, the webbrowser component can be made “invisible”
Just my simple solution for a clean windows phone facebook logout.
I like to play a lot with latest beta version of Windows Phone named Mango.
I like mostly the new Windows Phone Performance Analysis tool available in Debug menu.
But after I tested my app, when in comes to come back to current version in market (7.0) the application platform cannot be changed back.
Let’s do some tricks to get it back in just five easy steps.
1. Unload the wp7 application
2. Edit the project (.csproject) files
change the line
...
<TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
...
into
...
<TargetFrameworkProfile>WindowsPhone</TargetFrameworkProfile>
...
3. Reload the project
4. Edit Properties\WMAppManifest.xml file
5. Change AppPlatformVersion of Deployment node
from 7.1 to 7.0
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
to
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.0">
That’s all folks!
Hi folks!
Just as I promised, since “en-ro dic” application was approved (quite fast I must admit), I came back with download link for those of you who wish to use it right away.
Of course you can search it also in Windows Phone Marketplace from your WP7 phone, based on keywords: “en-ro”, “romania” etc.
Have a nice time translating Romanian - English, back and forth!