Hi All,
I'm newbie in Samsung Galaxy Gear 2 app development. And I want to know what is the best way to get data from server to wearable device. As well as i've used AJAX function to get data. But there's problem with that function.
There are two screens in my app. Both are working with AJAX function onload. First screen getting data perfectly. But second screen is not responding. Same code and same action with deference is URL. If i refresh the second screen it's working properly. Same as well now first screen is not responding. So can you help me to solve this problem. And please post me what is the best way to get data from server.
Here's full code.
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=320,height=320,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"> <meta charset="utf-8" /> <meta name="description" content="2015" /> <title>Sheadule</title>
<script src="http://code.jquery.com/jquery-latest.min.js"></script> <script> $(document).ready(function() { $.getJSON("URL.php?jsoncallback=?", function(data) {$('#loading').hide(); $('#loading1').hide(); document.getElementById("txtHint").innerHTML = data.gameSheadule; }); }); </script>
<link rel="stylesheet" href="../lib/tau/themes/default/tau.css"> <link rel="stylesheet" href="../css/style.css"> </head> <body> <div class="ui-page ui-page-active" id="main"> <header class="ui-header"> <h2 class="ui-title ui-icon" style="background-image: url(../images/icon.png);">Sheadule</h2> </header> <div class="ui-content content-padding"> <div class="ui-processing" id="loading"></div> <div class="ui-processing-text" id="loading1">Please Wait..</div> <span class=content_text id=txtHint> </span> </div> <footer class="ui-footer ui-grid-col-2"> <a href="index.html" class="ui-btn">Exit</a> <a href="index.html" class="ui-btn ui-color-orange">Home</a> </footer> </div> <script type="text/javascript" src="../../lib/tau/js/tau.js"></script> <script src="..js/lowBatteryCheck.js"></script> </body> </html>
Thank You.