I am integrating famo.us application with apache cordova, i've followed the following steps to achieve this task
1) Installed the cordova , famo.us and all the other packges necessary to build cordova as well as famo.us applications
2) I've created a famo.us project using yo famous
, as per suggested on this link : https://github.com/Famous/famous and have also served it using grunt serve
3) i copied the timbre tutorial from the famo.us starter kit and pasted into the app folder of the famo.us project (build through yo famous
).
4) Then again i served the project using grunt serve
and it worked absolutely fine in browser (chrome and Firefox both)
5) Then i created a project in netbeans by new project -> html5 -> cordova application
6) Then i copied all the content in app folder of famo.us application and pasted in www folder of cordova project and built it using net beans and tested it on browser and it worked absolutely fine (both chrome and firefox)
7) Then i built the cordova project on my Android and it's not showing the strip view of the Timbre Sample Application of famo.us, it opens the menu drawer but there all i can see the blank white background and nothing where it was supposed to show the strip view options of the timbre project
8) Then i copied the package from cordova project platform -> android -> AndroidManifest.xml and pasted it into the DDMS of eclips and opened the menu drawer and see the following error on it:
err: has no method 'now' at http://code.famo.us/famous/0.2/famous.min.js:48
I don't know where i am going wrong, I've also tried download http://code.famo.us/famous/0.2/famous.min.js
file and saved it into the js folder in www folder of cordova project and included it into the html and also check it is including, but facing the same problem.
I am doing Google on it from so many time but no success. Please guide me in this regards. it's working absolutely fine on browser but not on the Android.
Also please let me know if there is any other more efficient way to integrate Famo.us Project with Apache Cordova.
EDIT
I've added the code.famo.us in my whitelist, the config.xml code is:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" id="com.coolappz.coda" version="1.0.0">
<name>coda</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html"/>
<access origin="*"/>
<access uri="code.famo.us" subdomains="false" />
<access uri="*" subdomains="true" />
</widget>
but still i got the error
err: 09-17 13:23:58.666: E/Web Console(13557): Uncaught TypeError: Object #<Performance> has no method 'now' at file:///android_asset/www/js/famous.min.js:48
index.html file is:
<!DOCTYPE HTML>
<title>famo.us App</title>
<meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<!-- shims for backwards compatibility -->
<script type="text/javascript" src="http://code.famo.us/lib/functionPrototypeBind.js"></script>
<script type="text/javascript" src="http://code.famo.us/lib/classList.js"></script>
<script type="text/javascript" src="http://code.famo.us/lib/requestAnimationFrame.js"></script>
<!-- module loader -->
<script type="text/javascript" src="http://code.famo.us/lib/require.js"></script>
<!-- <script type="text/javascript" src="js/famous.min.js" ></script>-->
<!-- famous -->
<link rel="stylesheet" type="text/css" href="http://code.famo.us/famous/0.2/famous.css" />
<script type="text/javascript" src="http://code.famo.us/famous/0.2/famous.min.js"></script>
<!-- app code -->
<link rel="stylesheet" type="text/css" href="css/app.css" />
<script type="text/javascript">
require.config({
baseUrl: './src/'
});
require(['main']);
</script>
<body></body>