I am working as a PHP developer (intermediate level) and do practice some android stuff at home.
I have created and array list which will fetch into an sqlite db inside
For that you have to post your data on php server, then fetch that data and store into your database .
Here i attach one example which send data on server and getting response in json .
HttpPost postMethod = new HttpPost("Your Url");
List nameValuePairs = new ArrayList();
// test is a one array list
for(int i=0;i
Here sample[] is a field in which i assign array value to send on server . From server side you have to fetch the sample[] field .
public static String convertStreamToString(InputStream is)
{
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line = null;
try
{
while ((line = reader.readLine()) != null)
{
sb.append(line + "\n");
}
}
catch (IOException e)
{
e.printStackTrace();
}
finally
{
try
{
is.close();
}
catch (IOException e)
{
e.printStackTrace();
}
}
return sb.toString();
}