Friday, May 10, 2013

Simplest way to use web browser on BlackBerry simulators

Ho do do this with one sentence - turn on Wi-Fi.

On BlackBerry simulators, for example OS versions 4.5, 4.6, 4.7, 5.0 web browser app does not open any web pages out of box. It just tries to load page for a long time and then fails. It says (OS 4.5) "Requesting..." and after some time it says "Unable to connect to the selected Mobile Data Service, please try again later. If the problem persists please contact to your administrator."
Correct way to make web browser app work properly is to start MDS for simulator - there are instructions in "internets" how to do this.

But if you just want to use web browser quickly and device (simulator, that is :) ) supports Wi-Fi, you could just turn on Wi-Fi and after that web browser app is able to open web pages.
I even installed BlackBerry App Word with web browser a I was able to download and install apps this way (that was one OS 5.0 BlackBerry simulator).

To turn on Wi-Fi on simulator, press on "Manage Connections" (on device's "Desktop") and then press "Set Up Wi-Fi Network", then press "Next", then "Scan For Networks", then network is found and then press "Connect", "Next", "Finish".

Open web browser app and see that it is now able to open web pages.

Some BlackBerry OS 4.5-5.0 devices which support Wi-Fi are:
8320 Curve,
8350i Curve,
8520 Curve,
8530 Curve,
8900 Curve,
9000 Bold,
9300 Curve,
9330 Curve,
9700 Bold.

Tuesday, April 2, 2013

How to install drivers for QuickCam Express webcam for Microsoft Windows 7


I have Logitech QuickCam Express webcam.

Device manager says for this camera:
USB\VID_046D&PID_0928&REV_0000
USB\VID_046D&PID_0928


It installs itself automatically for Windows XP, but for Windoes 7 it tries to install and then fails. Official Logitech "support" says that camera is not supported in Windows 7.

Actually it works (at least form me) with drivers form Logitech.

This is what I did (I have 32 bit Windows 7):
1) Go to http://www.logitech.com/en-us/support/webcams
2) Select QuickCam® Express M/N: V-UAP41 (do not select correct product, QuickCam® Express M/N: V-UH9, V-UAP9, because that one does not have drivers for Windows 7)
3) Download driver, it is called lws110.exe
4) Unpack it (for example 7-zip does the job (open menu in Windows Explorer for lws110.exe, select "Extract to folder..."))
5) Open Device Manager (for example from Computer, open menu, select Manage)
6) Select camera with yellow exclamation label, select "Update Driver Software..."
7) Select "Browse my computer for driver software"
8) Select "Let me pick from a list of device drivers on my computer"
9) Select "Have Disk..."
10) Select "Browse..."
11) Browse to extracted folder: lws110\Drivers\x32\ELCH\
12) Press "Open"
13) Select "Logitech QuickCam Express/Go"
14) Press "Next"
15) Press "Yes" for "Update Driver Warning" dialog
16) Congratulations, driver is now installed :). Press "Close", press for example "Cancel" for software update.

Friday, March 22, 2013

Laptop Sony Vaio PCG-432L (aka PCG-SR33) specs

Now I have one. It has following specifications.
CPU: Intel Mobile Celeron processor 600 MHz
Memory (RAM): 64 MB, 1 of 2 slots occupied, max allowed should be 256 MB.
HDD: it does not have it, but it should be 10 GB.
Screen: don't know, should be 10.4" TFT with 800 x 600 px reso.
It has Microsoft Windows Millennium Edition licence sticker.


Thursday, March 14, 2013

java.lang.IllegalStateException: 0 matchers expected, 2 recorded.

There could be whatever java.lang.IllegalStateException: m matchers expected, n recorded.
If you are programmer like monkey with keyboard (like me currently, sadly) and you are getting this, there are few things you can check first:
1) it could be that this exception does not come from the place it says it comes, that is, real failing part was previous test and this happens in next test where it first saw call to expect(..) method;
2) in some cases expect(..)/ verify() does  not like to work with (MyObject) EasyMock.anyObject() - make sure you don't use EasyMock.anyObject() if you are getting this exception.

Tuesday, March 12, 2013

java.lang.IllegalStateException: missing behavior definition for the preceding method call

If you see this while writing unit test with EasyMock, make sure you didn't forget to call replay().

For example:

MyFirstObject myFirstObject = createMock(MyFirstObject.class);
MyObject my = new MyObject();
expect(myFistObject.myMethod()).andReturn(123).anyTimes();
assertEquals(456, my.myOtherMethod()); 


may cause this exception, but:

MyFirstObject myFirstObject = createMock(MyFirstObject.class);
MyObject my = new MyObject();
expect(myFirstObject.myMethod()).andReturn(123).anyTimes();
replay(myFistObject);
assertEquals(456, my.myOtherMethod());


does not throw this exception.

Saturday, March 9, 2013

Getting started

On a sunny Saturday eve (and eve was obviosly not sunny anymore), I decided to make a blog.
Currently I can't say more because there are limited amount of words I can say in a day.