Click here to Skip to main content
15,883,749 members
Home / Discussions / Mobile
   

Mobile

 
Questionbasic requiremnt for iphone development? Pin
Le@rner2-Sep-13 2:39
Le@rner2-Sep-13 2:39 
SuggestionRe: basic requiremnt for iphone development? Pin
Richard MacCutchan2-Sep-13 21:32
mveRichard MacCutchan2-Sep-13 21:32 
AnswerRe: basic requiremnt for iphone development? Pin
εїзεїзεїз19-Sep-13 3:13
εїзεїзεїз19-Sep-13 3:13 
Questionhow to get mobile current location using IMEI ? Pin
Bhatt Aniruddh1-Sep-13 22:25
Bhatt Aniruddh1-Sep-13 22:25 
QuestionAndriod Design for Supported to all devices Pin
saravanangopi1-Sep-13 21:45
saravanangopi1-Sep-13 21:45 
QuestionHow to get and identify iPhone connected to pc? Pin
Le@rner29-Aug-13 2:18
Le@rner29-Aug-13 2:18 
SuggestionRe: How to get and identify iPhone connected to pc? Pin
Richard MacCutchan29-Aug-13 3:21
mveRichard MacCutchan29-Aug-13 3:21 
Questionrécuperer les donnes de mysql et l'afficher dans un listView Pin
ingenis27-Aug-13 16:16
ingenis27-Aug-13 16:16 
Salut,
je veux récuperer les donnes de mysql et l'afficher dans un listView.
je suis débutante j’essaye de récupérer seulement le données mais j'ai rien recu dans l'emelateur.
merci de m'aider à resoudre ce probléme.


tierss.php:
PHP
<?php
mysql_connect("127.0.0.1","root","");
mysql_select_db("gestresor");

$q=mysql_query("SELECT * FROM Tiers");
while($e=mysql_fetch_assoc($q))
$output[]=$e;
print(json_encode($output));
mysql_close();
?>



tierss.java:

package com.example.login;


import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;


public class Tierss extends Activity {

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.activity_tierss);




String result = "";
//the year data to send
ArrayList<namevaluepair> nameValuePairs = new ArrayList<namevaluepair>();
//nameValuePairs.add(new BasicNameValuePair("year","1980"));
InputStream is=null;

//http post
try{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://10.0.2.2/formation/tierss.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
}catch(Exception e){
Log.e("log_tag", "Error in http connection "+e.toString());
}

//convert response to string
try{
BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
is.close();

result=sb.toString();
}catch(Exception e){
Log.e("log_tag", "Error converting result "+e.toString());
}

//parse json data
try{
JSONArray jArray = new JSONArray(result);
for(int i=0;i
AnswerRe: récuperer les donnes de mysql et l'afficher dans un listView Pin
Richard MacCutchan27-Aug-13 20:56
mveRichard MacCutchan27-Aug-13 20:56 
QuestionAndroid Pin
Jease13-Aug-13 4:25
Jease13-Aug-13 4:25 
GeneralRe: Android Pin
Fahd Albder3-Nov-13 18:29
Fahd Albder3-Nov-13 18:29 
Questionhow to start Mobile Application? Pin
shanmugarajaa5-Aug-13 2:41
shanmugarajaa5-Aug-13 2:41 
AnswerRe: how to start Mobile Application? Pin
Richard MacCutchan5-Aug-13 3:19
mveRichard MacCutchan5-Aug-13 3:19 
AnswerRe: how to start Mobile Application? Pin
Member 1022630722-Aug-13 11:25
Member 1022630722-Aug-13 11:25 
QuestionRendering and viewer technology in mobile apps like GrabCAD? Pin
Varun Bhartiya31-Jul-13 2:09
Varun Bhartiya31-Jul-13 2:09 
QuestionNew To Andriod Pin
Kevin Marois24-Jul-13 8:37
professionalKevin Marois24-Jul-13 8:37 
AnswerRe: New To Andriod Pin
Richard MacCutchan24-Jul-13 21:15
mveRichard MacCutchan24-Jul-13 21:15 
AnswerRe: New To Andriod Pin
Member 101942646-Aug-13 19:24
Member 101942646-Aug-13 19:24 
QuestionNeed Help in SQLite database for Android Pin
mAzeem221-Jul-13 8:42
mAzeem221-Jul-13 8:42 
AnswerRe: Need Help in SQLite database for Android Pin
Sudhakar Shinde2-Jul-13 23:59
Sudhakar Shinde2-Jul-13 23:59 
AnswerRe: Need Help in SQLite database for Android Pin
Dadecki25-May-15 23:28
Dadecki25-May-15 23:28 
QuestionQustion about scheduling of RTOS Pin
econy28-Jun-13 8:27
econy28-Jun-13 8:27 
Questionhow to identify phone support which character in text mode using AT COMMAND? Pin
Le@rner28-Jun-13 3:05
Le@rner28-Jun-13 3:05 
Questiondatagridview in monodroid (C#) Pin
jojoba2024-Jun-13 4:45
jojoba2024-Jun-13 4:45 
QuestionEmergency Popup Notifications Pin
RJOberg21-Jun-13 5:34
professionalRJOberg21-Jun-13 5:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.