Hello!
I am a newbie trying to make an application, but i am stock because i am still learning all about this world of hybrid-apps.
My question is this, i have this application made by the app-designer and it's ok but i have no idea how to connect my application to the server database, i readed a lot of tutorials and I found about the web services so i did it i created the web service but after this point i have no idea! This created 3 files for me but i don't know what to do with them, Do i need an API key to connect my app?
I know that i must query my app to get the data from the DB with JSON but i don't know where to put or even write code to connect the app. My app will show some budgets, So i need to login with email and password and then show the concepts.
So i am here asking for some help or someone who can guide me, i just need to learn the path and i will search for myself!
Hope someone can help me and sorry for my bad english!
Sergio
Regards!
链接已复制
Are you trying to save locally?
I believe this link will help you-- http://stackoverflow.com/questions/22828109/intel-xdk-connecting-your-mobile-app-to-a-database
and specifically this one--https://software.intel.com/en-us/articles/html5-local-storage
Hello!
No, I am trying to read data from a MYSQL server, so local storage is no viable for me!
But thanks for trying, those links help me to understand more the process to connect the app to the server.
You need to create either an ASP.NET web service or PHP web service.
Pass your query to the web service and return the result as JSON data.
Parse the JSON data in javascript in XDK to display your data.
Hello
This is a Brasil portuguese video but explain intel xdk and mysql connection
https://www.youtube.com/watch?v=XvkoPP05wtk
Download the files on description may help
Marcos
Create your back end in PHP or ASP and call them like this:
var input ="Michael";
//Main function call it from your code
function CallBackEnd(){
intel.xdk.device.getRemoteDataWithID("http://yourserver.com/webservice.php","POST","&user="+input,"CallBackS","CallBackF","12345");
}
//Success callback
function CallBackS(uniqueid,data){
console.log(data);
alert("Response from server is "+data );
}
//Error call back
function CallBackF(uniqueid,data){
alert("Network problem");
}
The main function above will POST the variable user via the value "input".
In you PHP code you can do:
<?php
$data = $_POST['user'];
echo "$data";
?>
In Html
Do this: <button onclick="CallBackEnd();">Push Data</button>
Michael O. wrote:
Create your back end in PHP or ASP and call them like this:
var input ="Michael"; //Main function call it from your code function CallBackEnd(){ intel.xdk.device.getRemoteDataWithID("http://yourserver.com/webservice.php","POST","&user="+input,"CallBackS","CallBackF","12345"); } //Success callback function CallBackS(uniqueid,data){ console.log(data); alert("Response from server is "+data ); } //Error call back function CallBackF(uniqueid,data){ alert("Network problem"); } The main function above will POST the variable user via the value "input". In you PHP code you can do: <?php $data = $_POST['user']; echo "$data"; ?> In Html Do this: <button onclick="CallBackEnd();">Push Data</button>
Hello Michael,
I am new to mobile and web development, so please give me a working example of Web API or web service to retrieve and insert data on SQL and MySQL server using Intel XDK for mobile applications.
How to write, deploy Self Developed Web API or Web Service and consume those service for my mobile app.
Thanks to you in advance you can contact me 20krish@gmail.com
Hello Nick,
With your help i have done data fetching from my SQL Server to my website using C#.
But i am still unable to fetching data in mobile app.
If there is any suggestions, please suggest me.
I would try today for mobile app in Intel XDK.
Thanks Again Bro...