- Knowledge Base
- Developer
- HMT Development Examples
-
Developer
-
RealWear Navigator™ 500 Series
- Overview
- Features and Specifications
- Wearing Your Device
- Device Setup
- Interacting with Your Device
- Device Power
- Battery Use
- Home Screen
- My Programs
- My Camera
- My Files
- My Training
- Safety
- Device Care
- Ownership Information
- User Guide
- FAQ
- Thermal Camera Module
- Display Technology Comparison
- Cleaning Your Device
-
RealWear Cloud
-
RealWear Releases
-
RealWear HMT-1®
-
RealWear HMT-1Z1®
-
RealWear Apps
-
Configure
-
RealWear Modules & Accessories
-
RealWear Navigator™ Series
Development Example – Movie Viewer Applet
The movie viewer can be used by third party applications. These applications can launch the movie viewer application directly, and pass in a video file. In order to launch a video the application passes the location of the file they wish to open. This video must be saved locally on the device.
Applications broadcast Intent.ACTION_VIEW with the file’s URI and Mime type.
File movie =
new File(Environment.getExternalStorageDirectory(), "document.pdf");
String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(
MimeTypeMap.getFileExtensionFromUrl(document.toURI().toString()));
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setDataAndType(Uri.fromFile(document), mimeType);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent)