[App] VJSipSwitch II

Search This thread

vijay555

Retired Moderator
Jun 4, 2005
5,789
68
Witch Space
www.vijay555.com
Guys,

The very first app I wrote for xda devs was SipSwitch, to allow one to change the SIP (software keyboard, transcriber etc) from a shortcut.

I was recently asked to support a particular feature in VJBrisk, which seemed to show a bug in SipSwitch. I couldn't find my old source code SipSwitch, so stupidly I re-wrote the whole thing from scratch. And it turned out that the bug wasn't in SipSwitch, but in the OS. Sigh.

Anyway, please take pleasure from my pain, and enjoy VJSipSwitch II.
This is entirely re-written, and probably buggy, so let me know.

VJSipSwitch II works like SipSwitch:
Make a shortcut to VJSipSwitchII, and specify command line parameters which match the name of the SIP you want to switch to.
Launch the shortcut and your phone will switch to that SIP.

This is useful if you want to, for example, always use SPB Keyboard as your default SIP.

eg:
PHP:
"\Program Files\Vijay555\VJSipSwitchII\VJSipSwitchII.exe" spb keyboard
will switch to SPB Keyboard.

Bonus Feature:
If you launch VJSipSwitch II without a command line parameter it will now pop up a menu asking you which SIP to switch to. This is good for one handed use.

screenshot.jpg


V

Download from here:
http://vijay555.com/vj/releases/vjsipswitchII/vjsipswitchii.cab

For help on making command lines
http://www.vijay555.com/?Help:Command_Lines
 
Last edited:

irus

Senior Member
Jun 29, 2007
1,950
3
what is that at the bottom of the screen shot ( two squars and the d-pad in the middle) thanks
 
Last edited by a moderator:

vijay555

Retired Moderator
Jun 4, 2005
5,789
68
Witch Space
www.vijay555.com
@irus:
It's an app I've developed for the Blackstone, VJVirtualMouseWinFX(code name only, for now!). A clearer screenshot is here.

screenshot.jpg


It's a virtual mouse pad (left square), which acts like the optical mouse on the Samsung Omnia, an emulated dpad in the middle, and a zoomed in "preview" zone showing what's under the mouse pointer, on the right. This square also acts as the "left click" for the mouse.

V
 

cp8

Member
Sep 1, 2008
10
0
thank you for sharing!
It works on my phone. But one question, it seems a bit slow to pop up the muen, can it be a little faster?
Thank you!
 

vijay555

Retired Moderator
Jun 4, 2005
5,789
68
Witch Space
www.vijay555.com
I don't think it can really - the slowest part, enumerating the SIPs, takes approx 350ms on my system, and that part can't really be made faster.

I'll have another look over the code to see if I can streamline it a bit further, but the slow bit can't be made much faster as it's OS dependent :(

V
 

cp8

Member
Sep 1, 2008
10
0
I don't think it can really - the slowest part, enumerating the SIPs, takes approx 350ms on my system, and that part can't really be made faster.

I'll have another look over the code to see if I can streamline it a bit further, but the slow bit can't be made much faster as it's OS dependent :(

V

Sorry and thank you! Maybe it's the problem of my phone, it's always slow to switch the input keyboard. It takes more than 1s to show up the muen:mad:
 
N

nothin

Guest
i like whatever you make.

semi-unrelated question:
could you write sipicon window( on softkeybar etc) hider?
some soft seem to have problem with sipicon space, goddamn rectangle - it pops up not exactly where and when it should(sipicon is seen as window in taskman 3.x which can hide that thing, but it's not exactly pleasant/automated way..).
sipicon is annoying with wad, today replacements, softkeybar removal(sometimes), other soft..
your tool may be sipicon hider helper.
 
Last edited:

thierryb

Senior Member
Nov 12, 2005
244
2
Le Vesinet
Thanks a lot, included the bonus.
And I am waiting your dpad too.

May I ask for three bonus?
- instead to have only one sip in the command line, alow more than one, and switch between them.
- add in your command line the capability to activate, deactivate, or switch between both status.
- have an exclusion list in your enumaration screen (this one is less, less useful, but useful)


Concerning enumeration of sips, may I propose you that you to not do it each time but use a cache (in memory if the application is resident, or in a file if not). And a command line to update the cache.

thanks a lot VJ
 

vijay555

Retired Moderator
Jun 4, 2005
5,789
68
Witch Space
www.vijay555.com
@nothin: I'll try to write something like this. Although easy to do achieve, a neat solution will be fairly messy to write I think (if anyone wants to, make a dll with a dummy wndproc for WM_WINDOWPOSCHANGED, then inject this into the OS and subclass MS_SIPBUTTON's wndproc to point at the dll wndproc; this will save a process slot and resources).

@thierryb: caching the menu is probably a good idea; I will try it at some point, but I'm thinking that for the chance of a cache clash (ie the cache being invalid), and the extra code required to find, load and parse the cache, it probably won't be a great deal faster than enumerating from scratch. As I said, the OS SIP enumerator takes around 350ms. Registry enumeration takes around 400ms so I use the OS enumerator.
On my Blackstone, showing the menu takes less than 1second - it's not instant, but hopefully not a massive inconvenience. How long does it for the menu to come up on your devices?
- instead to have only one sip in the command line, alow more than one, and switch between them.
This one is probably possible. I'll try to add this

- the capability to activate, deactivate, or switch between both status.
This one is easy, but I'll have to add proper command line switches, eg
PHP:
VJSipSwitchII.exe -sip "keyboard" -toggle
etc, and this will take more time.

again possible, but if this is for the sake of saving time, again, I will have to enumerate all sips merely to exclude one, so it'll be marginally slower, not faster! If it's for the sake of a neater menu, then it's a good idea.

I'm prioritising work on VJVirtualMouseWinFX for now, but if I find myself with some time I'll consider adding some of the above.

V
 

Dark Knight

Senior Member
Feb 20, 2008
115
0
Guys,

An alternative for switching keyboard for the SIP menu selection is available in the FingerMenu app (on this forum).

Basically it's a big button finger friendly method of changing all of the WM menu's to be more Manilla-ish. There is an option for taking over the SIP menu in the Options.

Just an alternative you could use for the Menu side of things...

Cheers
 

sergutel

Member
Jan 23, 2009
24
0
This is useful if you want to, for example, always use SPB Keyboard as your default SIP.eg:
PHP:
"\Program Files\Vijay555\VJSipSwitchII\VJSipSwitchII.exe" spb keyboard
will switch to SPB Keyboard.


Maybe stupid question but where should we typpe that and how?
I searched in your forum but found nothing about VJSipSwitch there.

Thanks in advance.
 
N

nothin

Guest
make a dll with a dummy wndproc for WM_WINDOWPOSCHANGED, then inject this into the OS and subclass MS_SIPBUTTON's wndproc to point at the dll wndproc; this will save a process slot and resources).
it would be just PERFECT method...hm.
but i'll take any method for sipicon hide, actually.
 
Last edited:

sergutel

Member
Jan 23, 2009
24
0
Again: Maybe stupid question but where should we typpe that and how?
I searched in your forum but found nothing about VJSipSwitch there.

Thanks in advance.
 
N

nothin

Guest
Again: Maybe stupid question but where should we typpe that and how?
I searched in your forum but found nothing about VJSipSwitch there.

Thanks in advance.

...just make shortcut with that text...jesus plzz.
make txt file, paste this
"\Program Files\Vijay555\VJSipSwitchII\VJSipSwitchII.exe" spb keyboard
there, change txt to lnk, that's all..
 

vijay555

Retired Moderator
Jun 4, 2005
5,789
68
Witch Space
www.vijay555.com
Making a shortcut

Guys,

Read here to find out how to make a shortcut with a command line
http://www.vijay555.com/?Help:Command_Lines

@nothin: although that works, it's best to write
69#"path\to\exe.exe" my command line

The 69 should be the length of the .lnk file, although it is ignored by the OS, so can be any number.
However, VJBrisk 0.4 onwards uses the # to identify the .lnk, so if you're using VJBrisk with VJSipSwitch II (which was the start of the development of VJSipSwitch II), then it's best to make a proper .lnk file.

V
 

lovemarc

New member
Sep 19, 2008
1
0
impressive!

Strangely, this is speedier than the usual approach of clicking the SIP arrow!

Naturally, I have no complaints - great job :D