GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Document @NativeClass and co. · Issue #12 · NativeScript/docs Open DescriptionFrom @vallemar ...how and when to use the @nativeclass or @interface annotations, also how to add delegates in iOS. In general, how to access native under the most common situations Example android class@NativeClass() @Interfaces([android.hardware.SensorEventListener]) class SensorEventListenerAndroid extends java.lang.Object implements android.hardware.SensorEventListener { callback: (event: number[]) => void; callbackOnAccuracyChanged: ( sensor: android.hardware.Sensor, accuracy: number ) => void; constructor(callback: (data) => void) { super(); this.callback = callback; return global.__native(this); } onAccuracyChanged(sensor: android.hardware.Sensor, accuracy: number): void { if (this.callbackOnAccuracyChanged) { this.callbackOnAccuracyChanged(sensor, accuracy); } } onSensorChanged(event: android.hardware.SensorEvent): void { if (!event || (event.values.length === 0 && event.values[0])) return; this.callback(event.values as number[]); } } export { SensorEventListenerAndroid }; Document:
Eventually, we'll consolidate all of these into the Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |