[XAP] [Source] IE Search Switcher 1.3.2

Search This thread

mumtaz64

Senior Member
Jul 5, 2009
64
2
Constantine
I installed and run it on HD2 WP7, I only have Bing App on the drop down combo. At the bottom, the plus button is grayed so can't add or edit current search provider. How does this realy work?
 

cina

Senior Member
Mar 8, 2008
303
28
Tószeg
Tested

Hi!

I tested your app and it is working though it worth mentioning the correct usage:
It DOES NOT pop up Google from the main screen pressing the search button!
It maps Google to search button while you are in Internet Explorer. Still it is just a two tap quickie opposed to typing Google manually.
Suggestion: It would be nice to have the search button mapped always to Google though but I'm not sure whether it is possible.

Regards,
Cina.
 

nayato

Member
Jan 27, 2011
22
1
I think it's worth to clarify: this app can do smth for your phone if you have non-bing search; I believe bing search is always present on device but isn't always set as a default one. If you are like me having bing set out of the box there's pretty high chance you won't be able to change search provider as there are no necessary entries for those. This app does not allow you to add search providers as of yet but the author is heading there. So let's just subscribe for this branch and wait. It's worth posting if you do have more than just bing and cannot use app to change provider (i.e. report issues).

@GoodDayToDie, man, can't wait to add Google... Your work is much appreciated!
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
New version posted! 1.1.0 is the first feature update: the Add button in the toolbar is now enabled, and you can add some of the most common search providers! Currently, you can add Google, Yahoo, and Bing mobile pages
(http://m.[google|yahoo|bing].com). Note that if you already have a provider called Google, Yahoo, or Bing (not Bing app, that's different) installed on your phone, you won't see the option to add the provider. As with all registry writes in this app, you'll need to press a button ("Install" on the bar) before the app will make any changes.

I've also changed the way LG phones write to the registry. Previously they were using an LG-specific native function that (due to being incompletely wrapped in the library I had) would only write to HKLM. Since the key that needs to be changed is in KHCU, this probably wasn't working. I changed it to use ProvisionXML for registry writing (the same technique used for HTC, which is verified to work). PLEASE try this app on LG phones and let me know if you can make changes successfully!

The Samsung registry interaction also uses a native write function, but this one should allow writing to HKCU. I hope it does, because currently I don't have the ability to use ProvisionXML on Samsung devices...

Please try it out and let me know what you find! I can include more providers by default, but I am also working on the ability to install your own. I figure the big three should be a good start for most people and will at least let you test the app.
 
  • Like
Reactions: mumtaz64

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
I installed and run it on HD2 WP7, I only have Bing App on the drop down combo. At the bottom, the plus button is grayed so can't add or edit current search provider. How does this realy work?
Your OS image doesn't include any other providers by default, it seems. I've implemented a simple form of the Add function (plus button) though.

I think it's worth to clarify: this app can do smth for your phone if you have non-bing search; I believe bing search is always present on device but isn't always set as a default one. If you are like me having bing set out of the box there's pretty high chance you won't be able to change search provider as there are no necessary entries for those. This app does not allow you to add search providers as of yet but the author is heading there. So let's just subscribe for this branch and wait. It's worth posting if you do have more than just bing and cannot use app to change provider (i.e. report issues).

@GoodDayToDie, man, can't wait to add Google... Your work is much appreciated!
Thanks, @nayato!

To everybody asking for more options, your wishes have been heard!! The new version lets you add Bing, Google, or Yahoo (as a mobile site, for example http://m.google.com) using the Add (+) button. Please try it out!
 
Last edited:
  • Like
Reactions: mumtaz64

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Hi!

I tested your app and it is working though it worth mentioning the correct usage:
It DOES NOT pop up Google from the main screen pressing the search button!
It maps Google to search button while you are in Internet Explorer. Still it is just a two tap quickie opposed to typing Google manually.
Suggestion: It would be nice to have the search button mapped always to Google though but I'm not sure whether it is possible.

Regards,
Cina.
@cina, I'm not sure if this is possible, but if I find a way to hook the Search button in WP7 I'll definitely look into making this change! I'm not even hooking the button in IE, just changing the value that IE looks at when you hit the Search button (not the same thing, though if there's an equivalent function for everything else that would work). If anybody knows a way to do this, please let me know...

Sorry . How on earth do I install / use this? Thanks

I've added a bunch more information on the original post. It now explains more about the app, how to use it, and what it can and can't do.
 
Last edited:

Marvin_S

Retired Recognized Developer
Dec 8, 2010
883
239
omnia 7 not working. Gives the error cant write bla bla. Thanks anyway
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
omnia 7 not working. Gives the error cant write bla bla. Thanks anyway

great work friend!
work very well on my optimus 7!!
thank you!!

Thanks for the reports, folks! Yes, even the bug reports are appreciated; it won't get better if you don't send them.

@gianlucarugby: Looks like the last update nailed LG support! That's great news.

@Marvin_S: I guess Samsung phones are still having problems with registry writing. I was hoping they could do it, but perhaps not.

The homebrew library I'm using can't use ProvisionXML (the technique I added for LG to get it working) on Samsung right now. I'm going to download the Samsung Tools homebrew project source and try to hack their registry writing code into the library I use. This may take a couple days and possibly make the download bigger, but on the plus side it will be a better library for building more cross-device homebrew apps with. As always, I'll post source updates.

By the way, if the original developer of the homebrew library (I'm using one from the Functional Webserver project) could contact me, I'd like to know whose code I'm using. Thanks!
 

megagprime

Senior Member
Aug 6, 2008
290
14
works on LG :)

works !!!
except my google search sends me here :(
google.jpg

or the mobile version
http://www.google.com/mobile/ (whatever my ie settings r set to):mad:not the actual google search
need just google.com or google.ca
 
Last edited:

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Good catch, sorry about that! My phone came pre-configured with Google (which prompted me to write this app) and I didn't look close enough at the site they use - http://www.google.com/m, not http://m.google.com. I'll make this change tonight.

Sorry everybody! It'll be fixed soon!

EDIT: I can also add the ability to force the full Google search page, although it's not a great experience on the phone's screen.
 
Last edited:

megagprime

Senior Member
Aug 6, 2008
290
14
Good catch, sorry about that! My phone came pre-configured with Google (which prompted me to write this app) and I didn't look close enough at the site they use - http://www.google.com/m, not http://m.google.com. I'll make this change tonight.



Sorry everybody! It'll be fixed soon!



EDIT: I can also add the ability to force the full Google search page, although it's not a great experience on the phone's screen.


ya I did that to. Google.com will bring up whatever version your ie settings are at
 

mKTank

Senior Member
Feb 7, 2011
165
23
So it's still not working on the Focus. Gives a long, long error message.

Error when installing search option!
System.Exception: [FCRouterProxy] : e :
RegistrySetString : Devicelo Control failed for IOCTL_FCR_REGISTRY_SET_STRING: -2147024894

at
Homebrew.DeviceAPI.Registry.SamsungRegistry.SetStringValue(String root, String path, String name, String value)
at
IESearchSwitcher.RegistryAccess.AddOption(SearchOption option)
at
Microsoft.Phone.Shell.ApplicationBarItemContainer.FireEventHandler(EventHandler handler, Object sender, EventArgs)
at
Microsoft.Phone.Shell.ApplicationBarIconButton.ClickEvent()
at
Microsoft.Phone.Shell.ApplicationBarIconButtonContainer.ClickEvent()
at
Microsoft.Phone.Shell.ApplicationBar.OnCommand(UInt32 idCommand)
at
Microsoft.Phone.Shell.Interop.NativeCallbackInteropWrapper.OnCommand(UInt32 idCommand)


----



Took a while to type so I hope it's helpful. :D
 
  • Like
Reactions: GoodDayToDie

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
@mKTank: I'm really sorry that it's not working for you. Thanks a bunch for the exception report though! In the future everything below the first Microsoft.Phone.Shell line can probably be left out, but the top bit is *really* interesting.

It looks like the library that I've been using to try and write to the Samsung registry uses an IOCTL. Unforunately, it seems there's some problem with calling the IOCTL - either its use is restricted, or the library isn't calling it correctly.

I can investigate that further, but this IOCTL is undocumented. I think the best thing is to use a technique that is known to work, like ProvisionXML (this is how I got LG working). There are some other projects that have regisrty writing working on Samsung, so I know it's possible. I'll try and get that into the app ASAP.
 

Marvin_S

Retired Recognized Developer
Dec 8, 2010
883
239
please contact lyriquidperfection he made the xap samsung tools i belive it has the source too.
You can use this to make the registry editting work on samsungs. You can send it to me for testing. I dont have the time to add it to your code now but testing is not a problem.

Thanks for your work!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Tuesday 4 April:
    It looks like Samsung support is still broken. Feel free to continue testing and reporting any issues, but it looks like I'll need to try a few different things. HTC and LG still work, of course.

    UPDATE 1.3.2 - Saturday 2 April:
    I've added some more checks to the registry write code. If you're not sure if the app is working for you (i.e. Samsung device owners) please try it and report what happens when you switch search options, or install a new option. If you get a messagebox indicating success, you're good to go. If it indicates failure, please tell me what the message was. Also, if it indicates failure the first time, try hitting Save again, and see if you get the same result.

    UPDATE 1.3.1 - Saturday 2 April:
    There may have been a bug in the way I was implementing registry access via the RIL Client COM control. Based on comparisons with some code known to work, I think this bersion might actually do it. This is of course untested - I don't have a Samsung device handy - but it may actually work. If not, PLEASE let me know what happens!

    Also, this app officially *does* work on HTC phones using NoDo. I don't expect NoDo to break anything, but if it used to work and now doesn't, please let me know whether you've updated since it last worked.

    Sorry for the long delay between versions. I've been working on something extremely exciting: an app to allow people to back up the important data on their phones (application storage, documents, and other things that don't automatically sync) to a PC, and restore it. I'll put a thread on here when it's ready to publish. In the meantime, if anybody has a way to get filesystem access on anything but HTC phones, *PLEASE* contact me!!

    If it works for your Samsung device, PLEASE post a reply saying so! That would be very exciting news. :) If it doesn't, please check the error that appears. If it's the same as in this post, just say so. If not, please post at least the first few lines of the error so I know what happened.


    DESCRIPTION:
    A tool for quickly changing the search engine used when you hit the hardware Search button from within IE. You can use the search provider that comes configured on your phone, the built-in Bing app, or any other providers you've manually added. You can also add and use the mobile search page from Google, Yahoo, or Bing.

    NOTE 1: This app does not change the search app used outside of IE! It only changes what happens when you're in Internet Explorer, and hit the Search button or enter something that isn't a valid URL in the location bar. If anybody figures out how to change Search button behavior anywhere else, please let me know!

    NOTE 2: This app can not cause the search button to launch another app, aside from the pre-installed Bing search! It can only open a URL, not an app. I'd like to enable launching other apps, but that's a bigger project than I have time for at the moment.

    TO INSTALL:
    This app is not in the Marketplace and therefore requires a developer-unlocked device. You can unlock your device if you have a Marketplace account, or with ChevronWP7.
    Download the ZIP file at the bottom of this post.
    Extract the XAP file under \IESearchSwitcher\Bin\Release\.
    Deploy the XAP file to your phone.

    TO USE:
    From the Applications list, run the "IE Search Switcher" app.
    Select the search provider that you want to use from the drop-down.
    Press the Save button to change your search provider.
    If the provider you want is not listed, hit the Add button to install more options.
    In the Add view, select an option from the drop-down and hit Install.
    You can hit Refresh to see what provider is currently set.

    TO REMOVE:
    Press-and-hold on the application in the list, then hit "uninstall".
    This will NOT change or reset your IE search option. It will stay as last set until changed again.

    Coming features:
    • Samsung support (maybe 1.3.1?)
    • Ability to add your own search providers
    • Ability to edit or delete existing providers
    • Support for Dell and other OEMs (if possible)
    • Ability to launch apps other than Bing when you hit Search (if possible)

    Supported devices:
    • HTC HD7: Tested, works
    • HTC, other: Reported working
    • Samsung: May work as of 1.3.1, please test!
    • LG: Reported working as of 1.1.0
    • Dell: Unknown, unlikely to work
    • Other: Unknown, unlikely to work

    SAMSUNG USERS: I'm trying to support your phones, but the problem is very confusing. As best I can tell, the technique I've been using has worked successfully in other apps. I'm trying something different for 1.3, so please test it out and let me know what happens!

    THIS IS STILL A BETA! If something doesn't work, PLEASE post a comment in this thread with your device, what you were trying to do, and what exception message you got. If there was no exception, just explain what didn't work. THANK YOU!


    FOR DEVELOPERS: The full source code for the app is included. I've also added some improvements to the Homebrew library from when I downloaded it. It's from the source for the WebServer project, and is copyright Dave Amenta. If you want to use it to make your own apps, be sure to include the following:
    1. DLLs. Check the ReadMe.txt in the Homebrew project for more info.
    2. WPInteropManifest.xml
    3. The capability ID_CAP_INTEROPSERVICES in WMAppManifest.xml

    Version history:
    1.3.2 - Added a read check after every write. (2 April 2011)
    1.3.1 - Fixed a possible bug in the use of COMRilClient.dll for Samsung registry. (2 April 2011)
    1.3.0 - Implemented a different native DLL for Samsung registry access. It may actually work now. (18 Feb 2011)
    1.2.1 - Fixed the search included provider URLs for search-from-location-bar. Some library improvements. (17 Feb 2011)
    1.2.0 - Added another library used by Samsung and some more library code based on other Samsung projects. (8 Feb 2011)
    1.1.2 - Disabled the check for existing search providers with the Add list. You can now re-install Google if you got the bad version 1.1.0. (7 Feb 2011)
    1.1.1 - Use http://www.google.com instead of http://m.google.com. (7 Feb 2011)
    1.1.0 - Added the ability to install some hard-coded options: Google, Bing, and Yahoo mobile pages. LG now uses ProvisionXML. (7 Feb 2011)
    1.0.1 - Fixed cross-platform support. Added necessary dlls and updated ReadMe. (27 Jan 2011)
    1.0.0.0 Initial Release (27 Jan 2011)
    1
    Don't work in Samsung Omnia 7.

    This is the error at the launch :

    Unable to get current provider!
    System.OutOfMemoryException:
    OutOfMemoryException
    à
    Homebrow.deviceAPI.Registry.WindowsCERegistry.GetStringValue(Strin root; String path; String name)
    à
    IESearchSwitcher.RegistryAccess.GetCurrent()
    à IESearchSwitch.MainPage.Refresh()
    à IESearchSwitch.MainPage.LoadOptions()
    à IESearchSwitch.MainPage.Page_Loaded(Object sender, RoutedEventArgs e)
    à
    System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
    à MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

    That's all ... =)
    1
    New version posted! 1.1.0 is the first feature update: the Add button in the toolbar is now enabled, and you can add some of the most common search providers! Currently, you can add Google, Yahoo, and Bing mobile pages
    (http://m.[google|yahoo|bing].com). Note that if you already have a provider called Google, Yahoo, or Bing (not Bing app, that's different) installed on your phone, you won't see the option to add the provider. As with all registry writes in this app, you'll need to press a button ("Install" on the bar) before the app will make any changes.

    I've also changed the way LG phones write to the registry. Previously they were using an LG-specific native function that (due to being incompletely wrapped in the library I had) would only write to HKLM. Since the key that needs to be changed is in KHCU, this probably wasn't working. I changed it to use ProvisionXML for registry writing (the same technique used for HTC, which is verified to work). PLEASE try this app on LG phones and let me know if you can make changes successfully!

    The Samsung registry interaction also uses a native write function, but this one should allow writing to HKCU. I hope it does, because currently I don't have the ability to use ProvisionXML on Samsung devices...

    Please try it out and let me know what you find! I can include more providers by default, but I am also working on the ability to install your own. I figure the big three should be a good start for most people and will at least let you test the app.
    1
    I installed and run it on HD2 WP7, I only have Bing App on the drop down combo. At the bottom, the plus button is grayed so can't add or edit current search provider. How does this realy work?
    Your OS image doesn't include any other providers by default, it seems. I've implemented a simple form of the Add function (plus button) though.

    I think it's worth to clarify: this app can do smth for your phone if you have non-bing search; I believe bing search is always present on device but isn't always set as a default one. If you are like me having bing set out of the box there's pretty high chance you won't be able to change search provider as there are no necessary entries for those. This app does not allow you to add search providers as of yet but the author is heading there. So let's just subscribe for this branch and wait. It's worth posting if you do have more than just bing and cannot use app to change provider (i.e. report issues).

    @GoodDayToDie, man, can't wait to add Google... Your work is much appreciated!
    Thanks, @nayato!

    To everybody asking for more options, your wishes have been heard!! The new version lets you add Bing, Google, or Yahoo (as a mobile site, for example http://m.google.com) using the Add (+) button. Please try it out!
    1
    So it's still not working on the Focus. Gives a long, long error message.

    Error when installing search option!
    System.Exception: [FCRouterProxy] : e :
    RegistrySetString : Devicelo Control failed for IOCTL_FCR_REGISTRY_SET_STRING: -2147024894

    at
    Homebrew.DeviceAPI.Registry.SamsungRegistry.SetStringValue(String root, String path, String name, String value)
    at
    IESearchSwitcher.RegistryAccess.AddOption(SearchOption option)
    at
    Microsoft.Phone.Shell.ApplicationBarItemContainer.FireEventHandler(EventHandler handler, Object sender, EventArgs)
    at
    Microsoft.Phone.Shell.ApplicationBarIconButton.ClickEvent()
    at
    Microsoft.Phone.Shell.ApplicationBarIconButtonContainer.ClickEvent()
    at
    Microsoft.Phone.Shell.ApplicationBar.OnCommand(UInt32 idCommand)
    at
    Microsoft.Phone.Shell.Interop.NativeCallbackInteropWrapper.OnCommand(UInt32 idCommand)


    ----



    Took a while to type so I hope it's helpful. :D