Monday, January 19, 2015

Oracle Mobile Application Framework Getting Started Demo

Sometimes you just need a little push to get started on something and this is pretty much the goal of this post... to get you started with the Oracle Mobile Application Framework.

I'm a very visual person and no matter how much I read about a specific topic I prefer watching a demo or a tutorial and then I try to do something on my own.

With that idea in mind I recorded a 3-part Oracle MAF demo that covers how to get started developing a mobile app, create a new feature (module), create and customize a task flow, invoke a REST Web Service as well as a SOAP Web Service, customize the request and response for the Web Service calls, create a data control, customize the MAF AMX pages, import a local HTML resource, configure a Remote URL based feature and deploy to the iOS Simulator.

I hope you enjoy!



Part 1: Getting Started with Oracle Mobile Application Framework

Part 2: Getting Started with Oracle Mobile Application Framework

Part 3: Getting Started with Oracle Mobile Application Framework


Tuesday, December 16, 2014

How to dial a phone number from Oracle Mobile Application Framework?

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 

Wednesday, October 22, 2014

New Oracle Mobile Application Framework (MAF) Academy Course

If you want to get into mobile application development with Oracle Mobile Application Framework (MAF), there is a new Oracle Developer Academy course available for you.

This new course includes an introduction to the Mobile Application Framework and teaches you how to design a MAF-based application, integrate with device capabilities, how to develop with web services and how to secure a MAF application.

In this FREE two-hour interactive online course you'll learn and master the design, architecture, interoperability and security of Oracle Mobile Application Framework based applications.

Hurry up and get yourself educated on the Oracle mobile application development framework.

Here is the link to the course: http://bit.ly/MAFCourse

Have fun!

Thursday, October 9, 2014

Working with Device Information in the Oracle Mobile Application Framework

With the proliferation of new device models, form factors and operating systems, you may be thinking about the challenges to make your application work handle all of these different device properties information as there may be features that rely on specific characteristics or capabilities.

As an example, how frustrating it would be for the user trying to use a mapping feature if the device doesn't support geolocation? Or, just getting the device screen height and width to make sure the content fits nicely and also dynamically present different things on the smaller / larger real state you have available. As a developer, it's your responsibility to make sure everything works and looks good on all devices (even though this is a hard task).

The Oracle Mobile Application Framework (MAF) utilizes Apache Cordova to provide access to device properties, SMS, Email, Contacts, Camera, Pictures/Photo Library, Geolocation, Accelerometer, Network, etc. that can either be accessed from Java, JavaScript and Expression Languages in order to support these requirements on your mobile application.

Additionally, the most common functionality (sendEmail, getPicture, createContact, sendSMS, etc) is exposed as a Data Control and can be simply dragged-and-dropped onto an AMX page reducing the need for coding calls to the API and constructing the necessary screens.

The MAF documentation covers all in details but here is a list of what's currently supported by the framework (through the embedded Apache Cordova API):
  • device.name
  • device.platform
  • device.version
  • device.os
  • device.model
  • device.phonegap
  • hardware.hasCamera
  • hardware.hasContacts
  • hardware.hasTouchScreen
  • hardware.hasGeolocation
  • hardware.hasAccelerometer
  • hardware.hasCompass
  • hardware.hasFileAccess
  • hardware.hasLocalStorage
  • hardware.hasMediaPlayer
  • hardware.hasMediaRecorder
  • hardware.networkStatus
  • hardware.screen.width
  • hardware.screen.height
  • hardware.screen.availableWidth
  • hardware.screen.availableHeight
  • hardware.screen.dpi
  • hardware.screen.diagonalSize
  • hardware.screen.scaleFactor

Most of the property names are self-explanatory and I won't go into the details of each one of them but there is a demo available for you that shows how to get started and use some of the information that the framework provides. Screenshots on both platforms are available below so you can take a peek what it looks like:


iOS Simulator
Android Emulator

The demo itself uses EL (expression languages) to get the values and then present them in different ways on the AMX page including outputText, buttons, etc and also change the availability of the component based on the feature capability.

In summary, integrating the device features into a Oracle MAF application is easy and flexible, the declarative drag and drop support suits most of the use cases and you can get deeper control programatically.

The source code is available here: https://github.com/mjabali/DeviceFeatures

Have fun!



Monday, August 4, 2014

Oracle Mobile Application Framework Hands-On Workshops

We are kicking off the US-based series of the Oracle Mobile Application Framework hands-on workshops that are going to cover the details of the platform and get you started with Oracle mobile development in a heartbeat. By the way, this is a FREE event!
These are one-day workshops where you will get technical insights into the new product enhancements, see live demos, and best of all, get hands-on experience with mobile app development. 
All you need to do is register for the workshop, pre-install/configure the development environment (MAF) on your laptop and you will be ready to go (don’t worry, we’ll send you detailed instructions on how to do this as well as contact information, should you need it). We also plan to set this up so that you can BYOD to test out your completed app (details will be provided in the invite).
Here are the links for the currently scheduled workshops so that you can register. If you don’t see your city listed be sure to send me an email letting me know where you would like to see a workshop added – we’re working to prioritize additional workshops now and your input will be valuable.
 Click the city of interest below. 


See you at the workshop!

Wednesday, May 14, 2014

Mobile Emulation on Google Chrome

If you want to see what your web page will look like on a mobile device and also do debugging during development on your desktop, here is a very useful resource for you.

Google Chrome allows you to emulate different mobile devices, screen resolutions, user agents and things like touch screen, geolocation and the accelerometer.

To enable Mobile Emulation on Google Chrome, open the Developer Tools, go to Settings and enable "Show 'Emulation' view in the console drawer".



Then, press 'Esc' to bring up the Developer Tools console drawer and finally select the Emulation tab. You'll find four sections: Device, Screen, User Agent and Sensors.


A quick test to understand this powerful feature can be done by simply navigating to www.google.com, select a device (i.e. Google Nexus 5) and then click Emulate. You'll be able to see that Google Chrome will show you the mobile optimized version of the Google website.


To go back to the original settings, just hit Reset and you'll see the regular Google Chrome rendering of the web page.
 
Have fun playing with the other features!
 
 

Tuesday, April 29, 2014

Mac OS X Boot, Sleep and Wake Time and Date

For several times I wondered what was the exact time my machine booted, woke up or slept. So, I did a little investigation to find out that's actually very simple to get those answers.

Using the Mac OS X Terminal, you can run the following commands:

 
- For System Boot Time, use: systcl -a | grep kern.boottime

You should get results similar to the picture below





- For System Sleep Time, use: sysctl -a | grep sleeptime

You should get results similar to the picture below  




- For System Wake Time, use: sysctl -a | grep waketime

You should get results similar to the picture below




I typically use the "uptime" command (just type uptime on the Mac OS X Terminal) to find out how long my machine has been powered on.

Lastly, you can get a short history of the machine boot using the "last reboot" command (just type last reboot on the Mac OS X Terminal) to get the last three boots of the system.


You can get the same information reviewing system log files but I think opening the terminal and typing a few commands easy enough to get the information you're looking for.