I have a Hybrid app I built with HTML5, CSS3, JavaScript and some jQuery. I am also using FireBase to store data. Everything works good, until I PhoneGap my application to device (Android). It loads server content, so I know the internet is not a problem. The HTML and CSS work fine. But none of the functions work, like my .js files are being ignored. Steps taken so far:
Ensured <access origin="*" />
is included in the config.xml file,
Ensured <uses-permission android:name="android.permission.INTERNET" />
is included in the AndroidManifest.xml file,
Ensured all <script>
tags are included in the <body>
tags of each HTML file,
Ensured index.html retains the original PhoneGap index.js file with the app init
code in it and that all my <script>
tags are loaded after that,
Ensured index.html contains all the <script>
tags for the project.
Below is the PhoneGapped index.html file for your inspection:
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
<meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline' gap:; style-src 'self' 'unsafe-inline'; media-src *" />
<link rel="stylesheet" href="css/customFitStyling.css" type="text/css">
<link rel="stylesheet" href="css/w3c_v4.css" type="text/css">
<title>CustomFit</title>
</head>
<body>
<!--CONTENT-->
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
</script>
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/customFitFunctions.js"></script>
<script type="text/javascript" src="js/setFalseBool.js"></script>
</body>
</html>