How to trigger Whatsapp Desktop by html link in Windows Google Chrome - whatsapp

According to official Whatsapp documenttion, if you want to make a clickable html link that triggers a new chat window in Whatsapp, regardless of (1) the destination phone number being in your contacts or not and (2) of OS (works in Web, iOS and Android), all you have to do is create a link like this:
Click here to open Whatsapp
In Google Chrome / MacOs, if I have Whatsapp Desktop installed, as soon as I click that link, I get a new tab (due to target = blank) with an Whatsapp web page containing a button 'Click here to chat', but Whatsapp Desktop imediatelly intercepts the link and comes to the foreground and creates a new chat with that phone number. That's the behavior I'm hoping for.
On Google Chrome Windows, on the other hand, Whatsapp Desktop doesn't intercept the link, so Whatsapp's web page just sits there waiting for me to click the button. The problem is that every time you click the button, you have to wait for the full Whatsapp WEB (not desktop) to load, which takes forever, specially if use this feature all the time.
I tried using whatsapp:// syntax but it doesn't work in Windows (does nothing when clicked), and in MacOs it triggers Whatsapp Desktop but errors out unless you have that contact in your contact list already (api.whatsapp.com doesn't have this limitation).
In short: any way to make a clickable link that, on Chrome/Windows, will trigger Whatsapp Desktop instead of forcing the user to load (every time) whatsapp web?

Building on Anand's answer, here is a reg file that adds the necessary entries.
Note: Be sure to replace YOUR_USERNAME_HERE with, um, your real Windows user-name:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\whatsapp]
#="URL:whatsapp"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\whatsapp\shell]
#="open"
[HKEY_CLASSES_ROOT\whatsapp\shell\Open]
[HKEY_CLASSES_ROOT\whatsapp\shell\Open\command]
#="\"C:\\Users\\YOUR_USERNAME_HERE\\AppData\\Local\\WhatsApp\\WhatsApp.exe\" %1"

Taking cue from Rovann Linhalis's answer, following settings worked for me in Windows 10 Pro 1809 with WhatsApp Desktop Installed
In HKEY_CLASSES_ROOT create new key whatsapp
Then in HKEY_CLASSES_ROOT\whatsapp change default string value to URL:whatsapp
In HKEY_CLASSES_ROOT\whatsapp add new string value with value name URL Protocol and value data empty
New Key under HKEY_CLASSES_ROOT\whatsapp with name shell
In HKEY_CLASSES_ROOT\whatsapp\shell change default string value to open
New Key under HKEY_CLASSES_ROOT\whatsapp\shell with name Open
New Key under HKEY_CLASSES_ROOT\whatsapp\shell\Open with name command
In HKEY_CLASSES_ROOT\whatsapp\shell\Open\command change default string value to
"C:\Users\{YOUR-PC-USERNAME}\AppData\Local\WhatsApp\WhatsApp.exe" %1
Make sure to replace placeholder {YOUR-PC-USERNAME} with your username.
Example whatsapp://send/?phone=+{countryCode}{mobileNumber}&text=HELLO%20WORLD

To open whatsapp: // in windows, just add the following registry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\whatsapp]
"URL Protocol"=""
[HKEY_CLASSES_ROOT\http\DefaultIcon]
#="C:\\Users\\[USERNAME]\\AppData\\Local\\WhatsApp\\WhatsApp.exe,0"
[HKEY_CLASSES_ROOT\whatsapp\shell]
#="open"
[HKEY_CLASSES_ROOT\whatsapp\shell\open]
[HKEY_CLASSES_ROOT\whatsapp\shell\open\command]
#="\"C:\\Users\\[USERNAME]\\AppData\\Local\\WhatsApp\\WhatsApp.exe\" \"%1\""
but I still have trouble starting a conversation after the last update.

Related

Does anyone know how do i get the list of all the applications installed in phone that can run audio files in react-native?

I want to create a functionality in react-native app such that on pressing a particular button, it should get me to the "open with" window, and that window should fetch me the list of all the installed applications in the phone which can run audio files. How can i get such list?
On a Android system, that "Open with" screen pops up when:
The user have more than one application that can play that specific audio format(Because it's not every app that can run every audio format).
The user did not set-up a default app to open the audio format.
So, You should just use a library like rn-fetch-blob to open the file for you, like as follow:
RNFetchBlob.android.actionViewIntent(fileLocation, mimeType)
And android will take care of picking the right app for you.
In case this answer does not satisfy you, you can get a list of apps using react-native-android-installed-apps-unblocking, but there's no information about wich ones can run an audio file, and maybe IOS will have some restrictions about what can be done, so your best option is to let the system do that for you!

itunesconnect - 'New Version' button not available

How to add a new version of the app in iTunesConnect ? The button is not available, please see the below screenshot.
I found a link to tour where it is given that you can add a new version using the button + Version or Platform as shown below. But, this button is disabled for me.
You can't create a new version if you already have a 'developer rejected' version. I suspect you can't create a new version either when you have one 'Ready for Sale' as in the original posting. You can however upload a new build, which is probably what you want to do anyway. Go to the page for the app in iTunes Connect, hover over the Build, click the red bar to delete it (this latter option is what I had missed myself). Now you can upload a new build from XCode (or use one you uploaded already) and add it to this version.
As Apple has no solution, then we will force add new versiĆ³n, this work for me:
From the iTunes connect page for the app version you wish to create a new version:
Should be use Chrome developer tools or firefox inspector.
Select the source for the page and open the find dialog (CTRL+F).
Search for "platform in newVersionPlatformList".
This will show the enclosing "li" of the button (iOS or tvOS). Find all childs "a" tags, which should look something like this: iOS
Must remove class "ng-hide" of "a" tags and this will show another (iOS or tvOS) button in browser.
- In the browser, must try to click on the new buttons (iOS or tvOS) and this will show popup the dialog of new version number.
Enter new version number
"(+) VERSION OR PLATFORM" botton is showing?
Which browser you are using? Use Safari.
If there is an update on the contract / license agreement, you have to review and approve.
I had to contact Apple to resolve this problem. It was an issue with iTunesConnect.

How can i keep focus on my own application or regain it when lost in delphi? [duplicate]

I need to create a simple Delphi application, kiosk style.
It is a very simple thing, a single form where the user writes some personal info to register to an event. 4 TEdit and a TButton.
What I want to achieve is to avoid the user does any action different then typing in TEdit or clicking on the TButton. For example I don't want he does ALT TAB (switchin applications), pressing windows key on keyboard, doing ctrl-alt-canc, etc...
I can add a passowrd protected Button that enables/disables this "Kiosk mode", in this way as I need to exit the kiosk mode I simply press that button and exit.
How to achieve this "kiosk mode" in Delphi without intercepting all the keystrokes manually? Or did anyone already develop this so it can be shared?
I think you'd better create a new desktop, and run your app in there. When your app is done, you can bring back user's desktop. That is how Windows login screen works. Of course Windows login screen uses a special secure desktop. Your app in a separate desktop would be isolated. You will have a desktop background with no start menu, taskbar, or desktop icons because explorer.exe is not running there automatically. Of course a can start a new process, using Task Manager, but desktops in Windows are securable objects; therefore, you can make restrictions if you want. Of course if your app has sufficient permissions.
To create a new desktop, you can use CreateDesktop Windows API, and to switch to the newly created desktop, you can use OpenDesktop function.
You can try Change the Windows Shell.
When you start windows, you don't execute the default shell (explorer.exe), you can execute your application.
Al internet you can find alternative Shell (more attractive) to default windows like:
BlueBox or
SharpE
This option is used for purposes similars at the application that you are developing. Kiosks or TPV.
For change the default applicacion you must modify a registry key:
In Win3.x and Win9x, SYSTEM.INI file:
[boot]
shell=MiAplicacion.exe
In Win2k and WinXP, use Registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
Shell=MiAplicacion.exe
If you test this option, think the mode to turn the configuration to the original value (button or option). You must reboot to test changes.
ADDED: In addition, if you search on the web some similar at this "Delphi Change default windows shell", you can find more code, samples and information about this.
Regards
P.D: Excuse me for mistakes with english.
Well but if someone can open the taskmgr he could just create a new task and run explorer.exe from there so its not really secure though...
Ok Taskmgr can be stopped with policies...
Well and for disabling the cad sequence you can use saslibex which Remko Weijnen had created you can find it here: SASLibEx
kindest regrads,
s!

Sending a command from a web-browser to an app

I want to be able to send a stream of data from a user computer to a web-service. That should not be too hard - I would use an application written in dot-net that resides on a user's Windows computer.
However, the tricky part is that the stream-of-data should only be sent (by the app) when the user clicks on a button or a link in a WEB PAGE that is open in his browser. The app itself would be minimized in the system tray. And he should be able to stop the stream by clicking on a stop-button (or link) in that web page..
So I found some info on stackoverflow that says that you can put a link in your page, something like: [a href='alert:"Hello World" ' ] and if you register your application (in this example the app would be called "alert.exe") in the registry, then when the user clicks on the link, he will cause the application to start, and to receive "Hello World" as a parameter.
Anyway, there are complications in my case. I want to be able to tell the application when to start sending data, and when to stop sending data, without starting new instances of the application. If the user clicks START, and the app is already open, I don't want it to open again. I do want a message to go saying "start sending" and if the user clicks on a STOP button (or link) to say "stop sending". The user might click on these web-page buttons several times in a session, and I don't want to close and reopen the program each time.
So a couple of questions:
Am I taking the right approach? Would "plug-ins" be a better idea?
If I am taking the correct approach, is there some way to send commands from a web page to an application?
Is it safe to have my app modify the registry of user computers?
If so, is there a set of commands for doing that?
Is the registry supported by Windows 7, Windows 8, etc? I know it is not supported on a Mac.
Thanks in advance.
LL
P.S. (the info on launching apps from your browser was at: http://msdn.microsoft.com/en-us/library/ie/aa767914%28v=vs.85%29.aspx).

running an (html/javascript) webpage from inside a visual basic.net program

i wrote a (visual basic.net-2008) desktop app that allows ham radio operators to enter a call,
such as WA0H, and the program gives the ham's location (springfield, mo.).
you can download the program free from my website .. www.wa0h.com
i want the program to display the ham's location on a google map using google's api-v3.
i have created an (html/javascript) webpage, where you enter the location in a form box,
click a (find) button, and the app displays the map ok, including a marker pin on the map.
??? how do i run the (webpage) from inside my (vb.net) program ???
my vb.net program needs to:
1 .. pass the address to the webpage
2 .. click the webpage (find) button
according to the google maps (developers) website, they want questions posted to stackoverflow.
thanks for your time.
1-First you need to create pin on the map
i suggest using Google Static Maps API as in hear : https://developers.google.com/maps/documentation/static-maps/intro#quick_example
for the example use this
https://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&key=YOUR_API_KEY
then you get something like this
https://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&key=AIzaSyDnw6k3UjE2qZ5nLnI8cKghaEEdCXV0PUI&signature=5xiF2jgoXwFonsjew0PmtZdSTHU=
2-you need to open this page using web browser.
to use "WebBrowser" inside of toolbox, drag and drop it then set ScriptErrorsSuppressed to true
to set webbrowser url you can use webbrowser1.navigate("your url as string")