Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ktravis/haxe-hardware
Simple OpenFL extension for accessing android device hardware methods.
https://github.com/ktravis/haxe-hardware
Last synced: about 2 months ago
JSON representation
Simple OpenFL extension for accessing android device hardware methods.
- Host: GitHub
- URL: https://github.com/ktravis/haxe-hardware
- Owner: ktravis
- License: mit
- Created: 2014-09-24T00:13:40.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-07-03T10:00:13.000Z (over 3 years ago)
- Last Synced: 2023-03-25T11:17:56.162Z (almost 2 years ago)
- Language: Haxe
- Size: 208 KB
- Stars: 19
- Watchers: 6
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
haxe-hardware
=============Simple OpenFL extension for accessing android device hardware methods.
Currently implements methods to use the android vibrator and access screen
dimensions.Install via `haxelib git haxe-hardware https://github.com/ktravis/haxe-hardware`
Add to `project.xml`:
And import into your project (haxe) with:
import Hardware;Exposed methods are currently:
public static function vibrate(int duration):Void;
public static function getScreenWidth():Int;
public static function getScreenHeight():Int;
public static function wakeUp():Void;More can be simply added in the java source file, replicating the function and
corresponding `JNI.createStaticMethod(...)` call in `Hardware.hx`.
### ContributionsThank you to [alagator](https://github.com/alagatar) for contributing `wakeUp()`!