Trying to make an app for a relative of mine

Hey guys, trying to make an app for a relative of mine that makes her able to call all kinds of family in one app, like a button with my name that if you press it, it opens the phone app with that number. I think I should be able to do it with this javascript

<“table”>
<“tr onclick=“window.open(‘tel:900300400’);””>
<“td>Phone: 900 300 400</td”>
<"/tr">
<"/table">

without the “”.

That I shamelessly found online, but how can I connect it and make it so that if I press this button, it calls this number? Thanks!

The code you’ve posted it’s only a simple HTML table not javascript

Oh okay. How would I make a button that opens the phone app and enters number on android?

The most I found was to make the click on a button to input the phone number. You just need to press the call button to make the call happen.

(Tested on my Android phone, using the preview on LAN/Wifi)

I hope it helps.

2 Likes

This also works (build an APK and tried it on a smartphone):

The Window.open() method allows you to open a pop-up window, so you can go to another page (by providing a link) or launch an application. The specified ‘tel’ value is recognized as starting the calling program. If you pass the correct link to the application, you can use any application (Open another application from your application in cordova).

4 Likes

Great to know. It could be useful for my platform game to show the place in the default map app, choosing an option in the selection screen.

1 Like