kashifshaikh / robovm-samples

RoboVM sample projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RoboVM sample projects

Each of the provided samples (unless otherwise noted in the sample's README.md) can be run using Gradle, Maven or Eclipse.

Run using Gradle

First, build the project:

./gradlew build

To run in the iPhone simulator:

./gradlew launchIPhoneSimulator

To run in the iPad simulator:

./gradlew launchIPadSimulator

To run on a connected device:

./gradlew launchIOSDevice

To run a console app sample:

./gradlew launchConsole

Compile & Run using Maven

To run in the iPhone simulator:

mvn compile robovm:iphone-sim

To run in the iPad simulator:

mvn compile robovm:ipad-sim

To run on a connected device:

mvn compile robovm:ios-device

To run a console app sample:

mvn compile robovm:console

Run using Eclipse

In order to run these samples in Eclipse you may need to run the latest nightly version of the RoboVM for Eclipse plugin. Use the following update site in Eclipse to install it:

http://download.robovm.org/nightlies/eclipse/site.xml

Then you should be able to import the sample into Eclipse by selecting File -> Import... and then Existing Projects into Workspace.

To run in the iPhone simulator: Right-click the project. Choose Run As -> iOS Simulator App (iPhone).

To run in the iPad simulator: Right-click the project. Choose Run As -> iOS Simulator App (iPad).

To run on a connected device: Right-click the project. Choose Run As -> iOS Device App.

Adding a new sample

  1. Checkout the repo and switch to the 'snapshot' branch.
  2. Create a new project in RoboVM Studio, saving it as a sub-directory of robovm-samples.
  3. During project creation, make sure all properties are correct (e.g. package name: org.robovm.samples.yoursample).
  4. Replace the build.gradle in your project with a build.gradle from another sample.
  5. Edit the build.gradle file by changing the main class to your own.
  6. Replace the pom.xml in your project with a pom.xml from another sample.
  7. Change the artifactId and name tags in the pom.xml file to match your own.
  8. Add the sample in both the root/settings.gradle and root/pom.xml files.
  9. Insert a row about your sample into the table below.

Short description of each sample

Name Description Demonstrates
AppPrefs Port of Apple's AppPrefs sample How to display your app's user configurable options (preferences) in the "Settings" system application.
BatteryStatus Port of Apple's BatteryStatus sample How to use the battery status properties and notifications provided via the iOS SDK.
ContractR Task tracking app How to setup a cross-platform iOS/Android app, use SQLite
CurrentAddress Port of Apple's CurrentAddress sample How to use MapKit, displaying a map view and setting its region to current location.
DateCell Port of Apple's DateCell How to display formatted date objects in table cells and use UIDatePicker to edit those values.
DocInteraction Port of Apple's DocInteraction sample How to use UIDocumentInteractionController to obtain information about documents and how to preview them.
Footprint Port of Apple's FootPrint sample How to take a Latitude/Longitude position and project it onto a flat floorplan.
HelloWorld Port of Apple's HelloWorld sample How to use a keyboard to enter text into a text field and how to display the text in a label.
LaunchMe Port of Apple's LaunchMe sample How to implement a custom URL scheme to allow other applications to interact with your application. Shows how to handle an incoming URL request by overriding UIApplicationDelegate.openURL to properly parse and extract information from the requested URL before updating the user interface.
LocateMe Port of Apple's LocateMe sample How to get the user's location and how to track changes to the user's location.
MessageComposer Port of Apple's MessageComposer sample How to use the Message UI framework to compose and send email and SMS messages from within your application.
MoviePlayer Port of Apple's MoviePlayer sample How to use the Media Player framework to play a movie from a file or network stream, and configure the movie background color, playback controls, background color and image, scaling and repeat modes. It also shows how to draw custom overlay controls on top of the movie during playback.
Notifications Sample app demonstrating local and remote notification handling. How to register and schedule local and remote notifications in an iOS app.
PhotoScroller Port of Apple's PhotoScroller sample How to use embedded UIScrollViews and CATiledLayer to create a rich user experience for displaying and paginating photos that can be individually panned and zoomed. CATiledLayer is used to increase the performance of paging, panning, and zooming with high-resolution images or large sets of photos.
QuickContacts Port of Apple's QuickContacts sample How to use the Address Book UI controllers and various properties. Shows how to browse a list of Address Book contacts, display and edit a contact record, create a new contact record, and update a partial contact record.
Regions Port of Apple's Regions sample How to monitor regions, significant location changes, and handle location events in the background on iOS.
StackView A simple app rating UI How to use UIStackView's to manage a set of subviews in either a horizontally or vertically arranged stack.
StreetScroller Port of Apple's StreetScroller sample How to subclass a UIScrollView and add infinite scrolling.
TableSearch Port of Apple's TableSearch sample How to use UISearchController. A search controller manages the presentation of a search bar (in concert with the results view controller’s content).
Tabster Port of Apple's Tabster sample How to build a tab-bar based iOS application.
Teslameter Port of Apple's Teslameter sample How to create a Teslameter, a magnetic field detector, with the use of the Core Location framework and display the raw x, y and z magnetometer values, a plotted history of those values, and a computed magnitude (size or strength) of the magnetic field.
TheElements Port of Apple's TheElements sample How to create an application that provides access to the data contained in the Periodic Table of the Elements. This sample provides this data in multiple formats, allowing you to sort the data by name, atomic number, symbol name, and an element's physical state at room temperature. TheElements is structured as a Model-View-Controller application.
Touches Port of Apple's Touches sample How to handle touches, including multiple touches that move multiple objects with UIResponder and UIGestureRecognizers.
TVMLAudioVideo Port of Apple's TVMLAudioVideo sample How to to add audio and video playback support for TVML template applications on tvOS.
UICatalog Port of Apple's UICatalog sample How to create and customize user interface controls found in the UIKit framework, along with their various properties and styles.
VideoRecorder Port of Apple's VideoRecorder sample How to create a custom UI for the camera variant of the UIImagePickerController and how to programmatically control video recording.
ContractR Sample app for iOS, Android and JavaFX. How to share code between an iOS and Android app using native UI in both apps. The iOS and Android projects are using a shared core project which holds the Model part of the Model View Controller pattern. Please note that the code in these projects are in need of clean-up, so please let us know when you find strange things. Please also feel free to improve this sample and let us know.

About

RoboVM sample projects

License:Apache License 2.0


Languages

Language:Java 86.3%Language:C 6.3%Language:CSS 3.2%Language:JavaScript 2.7%Language:Objective-C 0.8%Language:HTML 0.4%Language:Shell 0.1%Language:Metal 0.1%Language:Swift 0.1%