Over a million developers have joined DZone.

How to Dial a Phone Number from Oracle Mobile Application Framework?

· Java Zone

What every Java engineer should know about microservices: Reactive Microservices Architecture.  Brought to you in partnership with Lightbend.

Sometimes you need to dial a number from within a mobile app and for my surprise that functionality was not directly exposed through the Oracle Mobile Application Framework APIs.

Oracle MAF provides a component called Link (Go) available under the General Controls palette that can be used for navigation between pages but it can also be used to enable linking to external URLs.

Using the tel: URL scheme with the Link (Go) component gives you the capability to dial phone numbers from within an Oracle Mobile Application Framework app. 

So, here is how to do it:

On your MAF page, drag and drop a Link (Go) to the Panel Page and then set the URL in the component properties to the desired phone number. You can also use a Managed Bean to set the value if you want to do some processing before displaying the number to be called.

MAF Page source code after adding a Link (Go) component


Link (Go) component property panel

If you have mixed UI content on your Oracle MAF app and you want to get the same behavior on a HTML page you just need to add the following on your source code:

<a href="tel:+1-800-555-1234">call this number</a>

The sample code is also available here: https://github.com/mjabali/PhoneSample

Microservices for Java, explained. Revitalize your legacy systems (and your career) with Reactive Microservices Architecture, a free O'Reilly book. Brought to you in partnership with Lightbend.


Published at DZone with permission of Marcelo Jabali, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}