dinsdag 27 december 2011

How to get Facebook notifications on your Android phone.

People with an Android phone have no luck with the Facebook app. iPhone and Windows Phone 7 users have more functionality and most of all they have push notifications for the Facebook app! The Android Facebook app only supports notifications for messages (conversations), events and friendship requests it does not (yet?) support notifications for wall posts, likes, comments etc... Even though there have been numerous of versions released but none was really satisfactory.
Not having a push notification system is a real drawback for me so I went looking for a solution.
And I found a solution on Android Central. Unfortunately you will need a BlackBerry device to do this trick. At least that is what the article tells you.
I've found out that this trick also works if you install a BlackBerry simulator! So here's what you have to do to fix for once and for all Facebook notifications for your Android device:

1) Download a BlackBerry emulator
I had luck with following emulator:

2) Install the emulator and start it
3) Find and start the Facebook application on the BlackBerry emulator (use the spyglass and type 'Facebook')
4) Sign in with your Facebook account (which you also use on your Android device)
5) When the setup-wizard screen shows just click next without selecting anything

6) When signed in click in the upper left corner on the Facebook logo, a menu will appear. Choose at the bottom Options
7) Scroll (or pull down) until you see 'Facebook notifications' and just turn on Facebook notifications.


That's it! Now you can enjoy push notifications on your Android phone :) The only thing to do is to enable notifications in the Android Facebook app. The refresh interval is not important and can even be set to never, the changes above will push the notifications to your phone!

Oh and you can safely log out the Facebook application on the BlackBerry emulator and you may even uninstall the BlackBerry emulator.

vrijdag 23 oktober 2009

msiexec != installutil

Some months ago I've developed a custom install action which allows installation of BizTalk applications through an msi installation. To do this I derived a class from the Installer class.
When you do this you have the ability to log some actions by the use of:

base.Context.LogMessage("Installation started.");

At least, that was what I thought... When I supplied the neccesary parameters to enable logging to the msi (xxx.msi /l* log.txt) I got a nice log.txt with a lot of logging...but the logging I supplied was nowhere to see in the file! Strange, so I went to MSDN (http://msdn.microsoft.com/en-us/library/system.configuration.install.installcontext.logmessage.aspx) to lookup the use of this particular method. Didn't help me a lot to be honest.

So I fired up Reflector to see what this method does.

public void LogMessage(string message)
{
this.logFilePath = this.Parameters["logfile"];
if ((this.logFilePath != null) && !"".Equals(this.logFilePath))
{
StreamWriter writer = null;
try
{
writer = new StreamWriter(this.logFilePath, true, Encoding.UTF8);
writer.WriteLine(message);
}
finally
{
if (writer != null)
{
writer.Close();
}
}
}
if (this.IsParameterTrue("LogToConsole") || (this.Parameters["logtoconsole"] == null))
{
Console.WriteLine(message);
}
}


As you can see the method expects some parameters to be set. Especially the 'logtoconsole' parameter. So when I then added the custom action to a Visual Studio Setup project I did not have my customized logging.

I have not got it to work with my custom logging. Anyone has an idea of how to log your log entries from your custom action in the msi.log file? Now I do not have custom action logging in the log file, which is not good. Strange that Microsoft has no article about this problem. I hope they will fix this some time...

woensdag 5 augustus 2009

A new beginning

Tomorrow (6th of august) Windows 7 will be available to MSDN subscribers, which I am. Hooray! I'm already running the RC and I have to say it is great. I'm going to work with the RC until it expires. But probably on my home pc I will change the OS from Vista to Seven!

dinsdag 4 augustus 2009

Strong name validation failed

Today I faced a problem which took me way too long to solve. I had a project which I wanted to unit test with Visual Studio 2008 and MS Test. As a good developer I sign my assemblies with a snk file.

I created a test project and the necessary unit tests. When I ran the unit test in debug mode the passed (well…the one that were implemented). But when I ran the test without debugging they all failed! Because it was not possible for me to track the thrown exception during a normal test run (due to a WCF service which thrown a totally different exception) I had to add some logging in between to trap the exception in a .txt file.

The exception thrown was:

System.IO.FileLoadException: Could not load file or assembly ‘xxxxxx’ or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

File name: ‘xxxxxx’ ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)

Weird…I did sign the assembly. And yes when I looked at the project properties the assembly was indeed signed.

image

When I tried to add the assembly of the bin/debug folder of the project to the GAC it succeeded. So it really was signed, else no GAC! For each test run Visual Studio creates a directory TestResults\timg_TIMG01 2009-08-04 19_41_49 (or something similar)

When I tried to add the wretched assembly from the Out directory of the test directory to the GAC I got the folowing error.

Failure adding assembly to the cache: Strong name signature could not be verified. Was the assembly built delay-signed?

No it is not! After that I used the following sn command:

sn –v MyProject.dll

MyProject.dll is a delay-signed or test-signed assembly

How come? I really did sign the assembly! Few frustration later I called a colleague of me who already did much more with MS Test then me. He told me that I had to see if I had enabled code coverage for the assembly. Indeed I had turned on code coverage for my assembly. When I opened the windows I already saw what was going wrong.

image

I had to define my snk file also here or I could turn of code coverage. Took me way too long to solve this problem but again a lesson learned!

dinsdag 21 juli 2009

BizTalk 2006 EventID: 5410 (out-of-memory)

Recently I was with a customer who’s BizTalk server kept crashing immediately after starting the BizTalk server service. A quick look in the eventviewer showed the following error:

--- An error occurred that requires the BizTalk service to terminate. The most common causes are the following: 1) An unexpected out of memory error. OR 2) An inability to connect or a loss of connectivity to one of the BizTalk databases. The service will shutdown and auto-restart in 1 minute. If the problematic database remains unavailable, this cycle will repeat. Error message: Exception has been thrown by the target of an invocation. Error source: mscorlib …………….----

The first thing I did was shutting down all BizTalk applications that were running on the server. After I did that I restarted the BizTalk server again. No success…

Then I remembered that a fellow team member of me changed the custom config that was referenced by btsntsvc.exe.config. I opened the custom config file in Notepad++ and with the XML tools plugin I checked the validity of the config file. The config file was invalid XML so it was not possible for the BizTalk service to load the config into it’s appdomain.

Lesson learned: always check the validity of you config files!

maandag 8 juni 2009

Bing with suggestions

I have to admit the new Microsoft search Bing is just great! I love the search suggestions and web slices it shows. Also it's really nice to see video results without leaving the Bing search site! After a week of use I can say Bing will replace (for me) Google. IF it get's localized properly, now there are a few issues but most localized versions are still in beta stage so it's admitted ;-)

You can download the IE8 search provider here: http://www.ieaddons.com/en/details/searchhelpers/Bing_Search/

But beware! If you have setup IE8 to use another language then English (Tools-Internet Options-Languages), search suggestions and other neat Bing stuff will not work. You have to change this manually.


  1. Open regedit
  2. Browse to the following key: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes
  3. In the subkeys of the above key search for a key where the URL string value is equal to www.bing.com
  4. Open up the SuggestionsURL string value and replace {language} with en-us (it will now look like: http://api.bing.com/qsml.aspx?query={searchTerms}&market=en-us&form=IE8SSC&maxwidth={ie:maxWidth}&rowheight={ie:rowHeight}§ionHeight={ie:sectionHeight})
  5. Close regedit and fire up IE8 and you'll have search suggestions!

Have fun with it, it's really awesome!

woensdag 3 juni 2009

Windows 7 approaching


Microsoft will deliver Windows 7 to personal computers by the 22nd of october! This is great news! I love this OS so much and want to upgrade my desktop at home with the same great OS that runs on my laptop. With my MSDN license I'll probably will have this new OS a bit earlier. (I hope so ;-))