Thursday, 18 August 2011

Google Chrome on Ubuntu 11.04 Natty - Your profile could not be opened correctly

For me this was due to ghost chrome processes still running. Close chrome, and type:
ps aux | grep chrome
I had output like this:
16660 ?        00:00:15 chrome
16666 ?        00:00:00 chrome
16668 ?        00:00:00 chrome
18159 ?        00:00:11 chrome
18165 ?        00:00:00 chrome
18167 ?        00:00:00 chrome
Then kill em all!!! e.g. to kill the first one (process id 16660), type:
kill 16660
Then when you restart chrome, it should be able to load your profile properly again.

Tuesday, 16 August 2011

Load event for Google Maps Javascript API V3

Use this JavaScript event listener to know when your Google Map finishes initialising.

google.maps.event.addListener(map, 'idle', function() {
   ...
});

REFERENCES
http://code.google.com/p/gmaps-api-issues/issues/detail?id=1516

Saturday, 6 August 2011

Android 2.2 Froyo - Only Enable Auto-Sync when Connected to WiFi

I achieved this using an app called Tasker (currently £4).

1) New profile: on the Tasker homepage, click the plus icon to create a new profile, and don't bother entering a name.

2) Choose the context: go State > Net > WiFi Connected and click the green tick icon to confirm.

3) Select task: you then have to create a task to run when this context is active. There should be a "Task Selection" popup, and you need to click New Task, and again you don't need to bother with a name. Then you should be on the Edit Task page. Click the plus icon to add an action > select Net > AutoSync > Select On and accept. Finally, finish the task by clicking the tick icon.

4) Repeat steps 1-3 for the AutoSync Off task i.e. set the context to be WiFi Connected, but then check Invert on the next page, and set the Task to be AutoSync Off.

That's it - your AutoSync should turn on when you connect to a WiFi network, and off again when you disconnect.


Alternative Apps
-Locale (with a plugin) - expensive at over £6
-AutoSync Account Activator - FREE, and looks good (though I haven't tested it), but too fine-grained controls (i.e. must set individual sync rules for each sync account rather than just overall enable/disable Auto-Sync, ALSO must select specific WiFi networks as triggers, rather than just overall "WiFi connected")
-Toggle Settings - FREE, but not very intuitive interface - I gave up quite quickly.

If anyone can figure out how to achieve this behaviour using a free app, then please let me know in the comments!