If you have recently migrated to ADF Mobile 18.104.22.168, or have just started ADF Mobile development, you may have seen some issues or puzzling tid-bits for the new version of ADF Mobile. Here are a few key items worth noting:
You may have seen a little red icon on the upper left corner of application, and wondering if the framework somehow detected a bug in the mobile application. As matter of fact, it simply indicates the application has been deployed in debug mode. Deployment console window in JDeveloper also provides extra reminder that the application has been deployed in debug mode.
Google recently released Revision 22 of the Android SDK Tools. Along with the update, Google has also made available a new SDK Zip download file containing a new "build-tools" folder. A few of the utilities necessary for deploying an ADF Mobile application has been moved into this folder, which would cause deployment errors if you are using this new version of the zip file. This only impact NEW download of the SDK zip file - if you have downloaded the zip file previously and simply updated the tool to Revision 22, deployment is expected to work as before. This only applies to brand new downloads of the zip.
This issue is planned to be addressed in one of the upcoming 22.214.171.124 patches.
126.96.36.199 introduced push notification support, and many of you are wondering how to actually leverage this feature. We are working on publishing further details on this topic - please keep watching this blog site. In preparation for implementing push notifications, it would also be helpful to understand how Apple Push Notification (APN) and Google Cloud Messaging (GCM) Service work, and their pre-requisites. APN and GCM both require some setup through the respective developer portals, regardless whether you are developing an app using ADF Mobile or just native tools.
Xcode 4.6 has been released. While it was not fully certified, it is supported. This is also necessary for Xcode to properly recognize iOS devices running the latest iOS version.
Android SDK Tools Revision 22 as referenced above has also been released. It is known to work although with the workaround required above if you are downloading the SDK Zip rather than just updating the SDK Tools from an existing installation.
The ADF Mobile team is planning to release patches for 188.8.131.52 to address some late breaking issues. They will be released over the next few weeks through the JDeveloper update center. JDeveloper should notify you of these updates.
Hope this article helps to address some questions.
As most of you are aware, ADF Mobile can hook into JDeveloper's Remote
Debugging to support Java code debugging, such as setting breakpoints
and stepping through the code interactively from an emulator or an
actual device. The steps to enable debugging are described in the
latest ADF Mobile Developer Guide, and Shay also had a
nice entry on how to enable debugging on Android.
The developer guide also contains details on how to enable more refined
levels of logging, and view log output using either the Mac Console
application or the Android Monitor application. Let's explore how
all this works in a bit more detail.
Furthermore, log output to the Mac
console may not display certain logging messages - for example ones
coming from the embedded Java Virtual Machine. This is due to
some compatibility issues between Mac OS (Mountain Lion) and the log
output mechanism. In this article, we will also discuss how to
properly output all logging messages and perform more in-depth
debugging and analysis using device native tools, with the same
capability that native application developers enjoy when debugging an
application written in native code such as Objective C.
iOS Debugging Using Xcode Utilities
Unreliable logging from the Java Virtual Machine is a major issue with
debugging ADF Mobile application on iOS devices or simulator. The
underlying cause is incompatibility issues with Java Virtual Machine
running on the latest Mac OS (Mountain Lion). Furthermore, it is
difficult to debug on an actual device - necessary when debugging
issues with invoking device services such as camera or GPS.
However, you can use Xcode and a tethered iOS device to display all
logging messages from the device, ADF Mobile container, and the
embedded JVM, while running the ADF Mobile application. To do
this, you will need:
A Mac running Moutain Lion or Lion
Latest version of Xcode - as of May 2013, the latest version is
4.6.2. Latest version of Xcode is necessary to properly recognize
devices running latest version of iOS, as older versions of Xcode
cannot properly connect to the most recent version of the iOS.
One frequently asked question here is that ADF Mobile does not
always officially support the latest version. In general,
officially supported version has been thoroughly tested by Oracle QA,
and therefore is recommended for most development purposes.
However, the latest version of Xcode would typically be compatible -
please check JDeveloper
Forum for any reports of issues.
If indeed ADF Mobile for some reason can't use the latest
Xcode version to deploy an application, you can still follow the steps
below. When you open the temporary Xcode project generated by
JDeveloper, you would simply use the latest version of Xcode. The
rest of the instructions would still be valid.
Oracle JDeveloper and ADF Mobile
An iOS device
Obtain and install Apple iOS Developer Certificates and
Provisioning Profiles. When you deploy your ADF Mobile
application, you must deploy in Debug Mode, using Developer
Certificates and Provisioning Profile.
Here is a short video of how to modify the temporary Xcode project and
use Xcode utilities to display all logging messages from an ADF Mobile
application running on a device.
Android Debugging Using Android Debug Monitor
Shay recently published a blog article on viewing
logs and debugging on Android devices.
Debugging using an Android device using Android Debug Monitor is much
simpler to set up. There is no need to work with the temporary
Android application project. Instead, you will just need:
A PC, Mac, or Linux machine supported by the Android SDK
Latest version of Android SDK Tools - this refers to the set of
tools and utilities that are part of the Android SDK. Android
Debug Monitor is part of that.
Oracle JDeveloper and ADF Mobile
An Android-based Device and associated device driver installed
(for PC and Linux Machines)
Please note that the appropriate drivers on PC and Linux are
typically needed for proper connection to the device. If the
machine cannot properly recognize the device, then debugging will not
In addition to what Shay discussed in his blog article, a couple of
additional notes that might be useful if you are looking at
logging messages outside the embedded Java Virtual Machine:
In the LogCat window, set the filter by application ID. You
would see all logging messages related to the application, which
includes events coming from the native part of the application (i.e.
container), Cordova, device services, etc.
You can optionally set your application as a "Debugging
Application" by going to your device Settings-Developer options-Select
debug app, and then select the ADF Mobile application you want to
debug. All applications compiled in "Debug" mode will show up
here. This will allow you to select the ADF Mobile application
process in the Android Debug Monitor app, and perform additional
debugging - most likely much more info than you will ever want (or
care) to know.
Please let us know if there are any issues or questions.
It's great to see our engineering team has come through and delivered a bunch of new functionality in just a few month, since the release of ADF Mobile 184.108.40.206 in late October of last year. As Shay blogged about the new features in the previous entry, there are plenty of reasons to move to the new version. Many of developers in the ADF Mobile community has been looking for ways to push real time notification to ADF Mobile applications, or looking for ways to properly display file content on both iOS and Android devices. 220.127.116.11 now provides these functionality.
One great fact about the new push notification support is that native capabilities are used. This means you would leverage Apple Push Notification Service or Google Cloud Messaging Service to push notification to ADF Mobile applications. There is no proprietary or specialized messaging application you would need to implement - you can directly communicate with these push notification services with any backend servers.
File display support is critical for any application that needs to display file content. In the 18.104.22.168 version of ADF Mobile, you would leverage a LocalHTML feature to display files on iOS devices, but there is no solution for Android. If your application needs to display file content such as PDF or Word document, you should migrate to 22.214.171.124.
Another great feature is "Application Archive" support. This is a great re-usability feature for ISV or SI partners - partners can simply create an application archive that includes all application artifacts and re-use the application in different engagements. For each individual customer, the SI partner or customer themselves can extend the application archive with new functionality, and deploy it within their enterprise. This is also needed if the customer needs to sign the application with their own certificates and profiles, as needed by most third party Mobile Application Management packages.
Lastly, there are numerous performance enhancements - for example enhancements around ListView performance.
However, there are also a few other important reason to move to 126.96.36.199 now - please review these carefully and see if they apply to you:
Apple has stated that, as of May 1st, 2013, all apps submitted to the app store must properly support the iPhone 5 form factor. iPhone 5's screen size is 1136x680 pixels with a 16:9 ratio, where as previous iPhone screen size is 960x680 pixels with 4:3 ratio. Similar to all apps developed before iPhone 5 was released, ADF Mobile apps developed using 188.8.131.52 would be displayed in letter-boxed format. This no longer meets the updated Apple UI Guidelines. Therefore, if you are planning to submit an ADF Mobile application to the Apple AppStore, you must move to 184.108.40.206, which has proper support for the iPhone 5 form factor.
220.127.116.11 also adds support for iPad mini - allowing you to specify icons and splash screen for iPad Mini.
If you wish to test using iOS6 simulators that comes with Xcode 4.5 and above, then you must move to 18.104.22.168. There is a known issue with application unable to rotate even if the device is rotated.
JDeveloper and ADF Mobile 22.214.171.124 have been certified to work with more recent mobile SDKs (i.e. Xcode 4.5/iOS 6 and latest Android development tools/SDK). Therefore, if you wish to use these new SDKs, you should move to 126.96.36.199.
The UK Oracle Users Group is hosting an ADF Mobile specific SIG on May 21st in the London city office. Topics include device integration, security, web service development for mobile and user experience.
This blog is is dedicated to tips and tricks for developing, integrating, securing, and managing mobile applications using Oracle Mobile Platform. It is created and maintained by the Mobile Suite/Oracle ADF Mobile product development team.