Friday, April 3, 2015

How to Change Oracle JDeveloper 12c Font Size on Mac OS X


There are a few references to this on the Internet but they all seem to describe the behavior of Oracle JDeveloper 11g and not the current version 12c.

If you, like me, have been using Oracle JDeveloper 12c on a Mac OS X and wondered how can you change the IDE's font size then look no further :) Here are the instructions that worked for me:

  • After installing Oracle JDeveloper 12c go to the Help menu and Check for Updates. Install the necessary extensions to do the kind of work you want (i.e. Mobile Application Framework) and restart JDeveloper.
  • You'll probably see an undesired font size after you restart JDeveloper like the picture below. 

  • Shut down JDeveloper and open a Terminal session.
  • Go to /Users/<username>/.jdeveloper/system12.x.x.x.xx.xxxxxx.xxxx/o.jdeveloper.12.x.x.x.xx.xxxxxx.xxxx (i.e. /Users/Marcelo/.jdeveloper/system12.1.3.0.41.140521.1008/o.jdeveloper.12.1.3.1.41.150325.1239)
  • Open the file ide.properties (you can use vi, nano, etc). Any text editor will do it.
  • Find the line Ide.FontSize.Aqua=10. It should be something similar to:
 # The default Ide.FontSize for Mac OS X.  
 Ide.FontSize.Aqua=10  
  • Update the IDE's font size replacing the lines above with the following:
 # The default Ide.FontSize for Mac OS X.  
 Ide.FontSize=10  
  • Save and close the file. Start JDeveloper again and you should see the updated IDE's font size similar to the picture below.

Wednesday, February 4, 2015

Redirecting the log file in the Oracle Mobile Application Framework

If you have been developing with the Oracle Mobile Application Framework you already know that's not always easy to get debugging information out of the iOS Simulator or the Android Emulator.

When you are running on the iOS Simulator you can now use the -consoleRedirect option and send the logging information to an easier location to find. Although you can do that in Apple's XCode, doing that in JDeveloper is quite straightforward.

Open up your MAF project in JDeveloper, select Run >>> Choose Active Run Configuration >>> Manage Run Configurations


Then, click Edit and select the Mobile Run Configuration


Add the -consoleRedirect=<Any_File_You_Want> and select the Simulator configuration (if you have multiple ones configured). Click OK.

You can now use the JDeveloper Run button (the little green triangle on the top menu) that will launch and run your app (you must use this approach to redirect the log file - that's a limitation but worth the price).

This has been tested with the Oracle Mobile Application Framework 2.1.

Happy Debugging!



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!