Giter Site home page Giter Site logo

servrox / ionic4-device-motion Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 2.0 1.08 MB

An Ionic project to test device motion + orientation.

Home Page: https://servrox.github.io/ionic4-device-motion/home

JavaScript 6.53% TypeScript 72.39% HTML 9.42% CSS 11.66%
ionic4 ionic ionic-framework ionic-cordova ionic-native ionic-plugin ionic-angular ionic-apps ionic-applications ionic-demo

ionic4-device-motion's Introduction

Build Status

Device Motion + Orientation Demo

Ionic 4 Motion + Orientation Demo App

Tested options ✔️

  • DeviceOrientation: ionic native plugin
  • DeviceOrientation: navigator object
  • DeviceOrientation: window event
  • DeviceMotion: ionic native plugin
  • DeviceMotion: navigator object
  • DeviceMotion: window event
  • DeviceMotion: LinearAccelerationSensor (Web API)
  • compassneedscalibration: window event

Info 💩

To protect users’ privacy, iOS 12.2 will limit Web apps’ access to iPhone’s sensors

read full article on arstechnica.com

Built With 🛠️

Authors 👑

  • Marcel Mayer

ionic4-device-motion's People

Stargazers

 avatar

Watchers

 avatar  avatar

ionic4-device-motion's Issues

error TS2304: Cannot find name 'LinearAccelerationSensor'.

I am trying to incorporate your tests in my app, but when i am trying to run it using ionic cordova run browser, your project runs absolutely fine but my project gives error

[ng] ERROR in src/app/devicemotion/devicemotion.page.ts:251:33 - error TS2304: Cannot find name 'LinearAccelerationSensor'.
[ng] 251       const accelerometer = new LinearAccelerationSensor();


my `ionic info` below, incase you need

Ionic:

   Ionic CLI                     : 5.4.13 (C:\Users\saurabh\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 5.0.1
   @angular-devkit/build-angular : 0.803.25
   @angular-devkit/schematics    : 8.3.25
   @angular/cli                  : 8.3.25
   @ionic/angular-toolkit        : 2.1.2

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : not available
   Cordova Plugins   : not available

Utility:

   cordova-res : not installed
   native-run  : 0.3.0

System:

   Android SDK Tools : 26.1.1 (C:\Users\saurabh\AppData\Local\Android\Sdk)
   NodeJS            : v12.14.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.13.4
   OS                : Windows 10

Difference between ionic info of your project and mine, is this the reason for error ? see image below -
https://ibb.co/FhwYdZf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.