{"id":247,"date":"2008-04-05T11:22:55","date_gmt":"2008-04-05T11:22:55","guid":{"rendered":"http:\/\/dalelane.co.uk\/blog\/?p=247"},"modified":"2008-04-05T11:23:46","modified_gmt":"2008-04-05T11:23:46","slug":"browser-syncing-mobile-to-desktop","status":"publish","type":"post","link":"https:\/\/dalelane.co.uk\/blog\/?p=247","title":{"rendered":"Browser syncing &#8211; mobile to desktop"},"content":{"rendered":"<p>Completing the loop for my <a href=\"http:\/\/dalelane.co.uk\/blog\/?p=246\">browser sync hack for Over The Air<\/a> &#8211; this time, syncing back the browser history from your mobile browser when you get back to your desktop computer. <\/p>\n<p>When you connect your mobile to your computer, the URL history of Pocket Internet Explorer is queried and the most recent item is opened on the desktop using your default web browser.<\/p>\n<p>This was a little tricky to implement and needed me to cobble a few bits and pieces together:<\/p>\n<ul>\n<li>A C# service running on the desktop that uses <code>RAPIManager<\/code> to trap and handle device connection events<br \/>\nOn connection, the service uses RAPI to invoke a process on the mobile&#8230;\n<\/li>\n<li>The process on the mobile is something that I wrote in C++ to query the PIE cache &#8211; using the <code><a target=\"_blank\" href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/aa384026(VS.85).aspx\">FindFirstUrlCacheEntry<\/a><\/code> \/ <code><a target=\"_blank\" href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/aa384049(VS.85).aspx\">FindNextUrlCacheEntry<\/a><\/code> API. The URL retrieved is written to a file on the mobile.\n<\/li>\n<li>The C# service on the desktop transfers the file containing the URL from the mobile, and uses <a target=\"_blank\" href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/system.diagnostics.process.start.aspx\">Process.Start<\/a> to launch it in the desktop&#8217;s default web browser\n<\/li>\n<\/ul>\n<p>It&#8217;s a little icky&#8230; but it seems to work!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Completing the loop for my browser sync hack for Over The Air &#8211; this time, syncing back the browser history from your mobile browser when you get back to your desktop computer. When you connect your mobile to your computer, the URL history of Pocket Internet Explorer is queried and the most recent item is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,3],"tags":[154,152,46,146,155,151,19,43],"class_list":["post-247","post","type-post","status-publish","format-standard","hentry","category-code","category-tech","tag-browser","tag-firefox","tag-mobile","tag-overtheair","tag-sync","tag-twitter","tag-windows-mobile","tag-windowsmobile"],"_links":{"self":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=247"}],"version-history":[{"count":0,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/247\/revisions"}],"wp:attachment":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}