Installing and Opening the Projects

Installing the Java Projects

When I started this project, Eclipse was the predominant IDE for Android development using the Android Developer Tools (ADT) plugin. However, during 2015 stable versions of Android Studio were released and Google were strongly encouraging developers to move their project to that (support for ADT for Eclipse has ended as of December 2015). As the scope and timeframe of my project was limited, I wanted to focus on the coding goals rather than spend time on the logistics of moving to Android Studio. Hence the instructions here explain how to setup the project in Eclipse. However, if you are creating a new Android project Android Studio would be the natural choice of IDE.

Follow these instructions to open the project in Eclipse (for Windows)...

  1. Download and install Eclipse
  2. Download and install the Android SDK Tools (e.g. file 'installer_r24.4.1-windows.exe'). After installing select the option to start the SDK manager.
  3. Use the Android SDK manager to download the correct Android SDK packages. Note that I built this application in an older version of Android (2.2 / API Level 8) to maximise device compatibility. The components shown below as 'Installed' in the 'Status' column are the minimum that must be installed to get the project up and running.

    Android SDK Manager

  4. Install Android Development Tools for Eclipse by navigating to the 'Help > Eclipse Marketplace...' menu in Eclipse. In the Eclipse Marketplace window, search for and install 'Android Development Tools for Eclipse'.

    Eclipse Marketplace

  5. Download the source code from GitHub and save it to a temporary directory.
  6. Start Eclipse and create a new workspace from the startup prompt (suggested name is 'OraclePermissionGeneratorAndroid').
  7. Import the downloaded source code into your Eclipse project through the 'File > Import' menu, and then the 'Android > Existing Android Code Into Workspace' option in the resulting window...

    Android Project Import

    Select the downloaded 'OraclePermissionGenerator' folder (containing the eclipse '.project' file), make sure 'Copy projects into workspace' is selected, and click 'Finish'...

    Android Project Import

  8. Follow the same above steps to import the 'OraclePermissionGenerator.AndroidUnitTests' project into the workspace.
  9. Import 'OraclePermissionGenerator.UnitTests' into the workspace as a standard eclipse project (i.e. using the 'General > Existing Projects into Workspace' option in the 'Import' window.

Note that if you have the GitHub client installed, the projects may come up with a question mark or exclamation mark icon against them, and the text '[OraclePermissionGeneratorAndroid master]'. This can be corrected by first navigating to the '\.metadata\.plugins\org.eclipse.core.resources\.projects' path from within the Eclipse workspace directory. Within this path will be folders for each of the imported projects, and within those folders a subfolder called 'org.eclipse.egit.core'. These 'org.eclipse.egit.core' folders and their contents should be deleted for the problem projects, and then Eclipse restarted.

Setting up an Android Virtual Device

  1. The Android Virtual Device Manager application should have been installed as part of the SDK installation detailed above, and should be available from the Windows Start menu. Start the Virtual Device Manager (note - if no Start menu item exists, check for the 'AVD Manager.exe' executable in the 'android-sdk\' or 'android-sdk\tools\lib\' folders).
  2. Click the 'Create...' button to create a new virtual device. The screen below shows the recommended settings. Note that the application requires at least a small SD card to write logs to in case of errors.

    Creating a Virtual Device

Installing the C# Project

The C# project can be opened by simply downloading the source code, and opening the solution file ('OraclePermissionGeneratorWebServiceAPI.sln') in Visual Studio. The project was created with Visual Studio 2013, so must be opened with that version or later.

Starting and Running in the Virtual Device

  1. Build the C# project, and start the webservice either by running through visual studio, or running the 'OraclePermissionGeneratorWebServiceAPI.exe' executable directly. When running, the following text should be displayed on the console, and the webservice can be stopped by pressing Enter...

    Press [Enter] to stop the service.

  2. From Eclipse, run the 'OraclePermissionGenerator' project as an Android Application. This should build the project and dependencies, package them up as an android apk file, deploy the apk file to your virtual device (starting the virtual device if necessary), and start the Android application.
  3. Initially you will likely be presented with the following error message...

    Connection Error

  4. Open the 'Connection Settings' screen by pressing the virtual device 'Menu' button and selecting 'Connection'. The 'User Identifier' should be set to 'tutorial_user@tempuri.org'. The 'Data Service Connection Type' can be set to either REST or SOAP, but the IP address in both 'Data Service Location' fields should be set to the IP address of the host PC (the ports for SOAP and REST should be set to 5000 and 5001 as below)...

    Connection Settings

    After clicking 'Save' a list of the available Oracle objects should be displayed as below...

    Object List Activity

Using the Application

A full description of the functionality of Oracle Permission Generator can be found on the Windows version's website, however the main functionality is...

  • Setting up the relevant roles and users (available through the 'Roles / Users' menu)
  • Setting the permissions for each object (via clicking the object from the main screen)
  • Generating permission scripts (through the 'Scripts' menu)

Return to the main page.