Devicemotion doesn't work, deviceready also (problem with cordova plugins?)

  • Cocoon Version:
    Newest “Cocoon Developer App” from the store

  • Basic description of the problem:
    Can’t use devicemotion, deviceready listener is unavailable also

  • Device info:
    Samsung Galaxy, Android (7, I guess)

  • Steps will reproduce the problem:
    Launch application and try to use devicemotion

  • Expected result:
    Working devicemotion

  • Webview engine(s):

Hi, can anybody tell me how to use Device Motion in Cocoonjs? I’ve tried everything and without any result, “deviceready” is giving me nothing also . My simple code looks like:

I use Cocoon Developer App, I’ve tried to launch my app there in Canvas+ mode and Webview (another thing - why I don’t have Webview+ there?). Only thing I see is red error about ‘cannot open the javascript file cordova.js’.

stupid forum rid off my code sample:

<script src="cordova.js"></script>
var app = {
	init: function() {
	        console.log('device ready');

document.addEventListener('deviceready', function () {

document.addEventListener('devicemotion', function (event) {
	console.log('motion', event);

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.