Click here to Skip to main content
15,919,931 members
Home / Discussions / Mobile
   

Mobile

 
Questionservice to get running application list Pin
prashant_2937-Apr-13 20:04
prashant_2937-Apr-13 20:04 
Questionhow to send gps data via tcp socket from android Client to a .net server and store it in a table of sql server database Pin
haidsai4-Apr-13 12:06
haidsai4-Apr-13 12:06 
AnswerRe: how to send gps data via tcp socket from android Client to a .net server and store it in a table of sql server database Pin
Prasad Khandekar30-Apr-13 4:33
professionalPrasad Khandekar30-Apr-13 4:33 
AnswerSolved! Convert apk to jar Pin
jojoba201130-Mar-13 4:21
jojoba201130-Mar-13 4:21 
AnswerRe: Convert apk to jar Pin
Thomas Daniels30-Mar-13 4:47
mentorThomas Daniels30-Mar-13 4:47 
QuestionRe: Convert apk to jar Pin
jojoba201130-Mar-13 10:48
jojoba201130-Mar-13 10:48 
AnswerRe: Convert apk to jar Pin
Thomas Daniels30-Mar-13 22:52
mentorThomas Daniels30-Mar-13 22:52 
QuestionRe: Convert apk to jar Pin
jojoba201131-Mar-13 7:40
jojoba201131-Mar-13 7:40 
AnswerRe: Convert apk to jar Pin
Thomas Daniels31-Mar-13 21:44
mentorThomas Daniels31-Mar-13 21:44 
AnswerSolved ! Convert apk to jar Pin
jojoba20111-Apr-13 9:47
jojoba20111-Apr-13 9:47 
GeneralRe: Solved ! Convert apk to jar Pin
Thomas Daniels1-Apr-13 20:49
mentorThomas Daniels1-Apr-13 20:49 
AnswerRe: Convert apk to jar Pin
Member 1399322321-Sep-18 7:27
Member 1399322321-Sep-18 7:27 
QuestionCompare mobile platforms deployment for ISV needs Pin
Richard Brett26-Mar-13 14:51
Richard Brett26-Mar-13 14:51 
AnswerRe: Compare mobile platforms deployment for ISV needs Pin
apvkt9-Apr-13 0:24
apvkt9-Apr-13 0:24 
Questionremove selected row in Listview android Pin
fa8725-Mar-13 22:16
fa8725-Mar-13 22:16 
AnswerRe: remove selected row in Listview android Pin
Prasad Khandekar30-Apr-13 4:46
professionalPrasad Khandekar30-Apr-13 4:46 
QuestionANDROID+Sqlserver 2008 Pin
kuldeep vatsal13-Mar-13 20:39
kuldeep vatsal13-Mar-13 20:39 
AnswerRe: ANDROID+Sqlserver 2008 Pin
Richard MacCutchan13-Mar-13 22:33
mveRichard MacCutchan13-Mar-13 22:33 
AnswerRe: ANDROID+Sqlserver 2008 Pin
aamir rafiq29-Mar-13 0:15
aamir rafiq29-Mar-13 0:15 
QuestionAndroid Socket Client Pin
Kumar Himanshu13-Mar-13 1:58
Kumar Himanshu13-Mar-13 1:58 
AnswerRe: Android Socket Client Pin
Prasad Khandekar2-May-13 5:25
professionalPrasad Khandekar2-May-13 5:25 
Hello Kumar,

You can find working examples here. Though not related to binary data transmission, but should get you started.


Below is a sample code for a function which I have used in one of the android application I developed.
Java
/**
 * Helper method to send the request to the MAP
 * @param strUrl The url to be invoked
 * @param params The name value pair list containing the parameters to be sent to MAP
 * @return the JSON response
 */
private JSONObject sendRequest(String strUrl, List<NameValuePair> params) throws Exception
{
    String line = null;
    String strCKVal = null;
    HttpPost httppost = null;
    HttpEntity entity = null;
    HttpClient httpclient = null;
    JSONObject json = null;
    InputStream is = null;
    HttpResponse response = null;
    StringBuilder sb = null;
    BufferedReader reader = null;

    try
    {
        httpclient = new DefaultHttpClient();
        httppost = new HttpPost(strUrl);
        httppost.addHeader("UserAgent","Android");
        if (!StringUtils.isEmpty(_strSesId))
            httppost.addHeader("Cookie", _strSesId);

        httppost.setEntity(new UrlEncodedFormEntity(params, HTTP.UTF_8));
        response = httpclient.execute(httppost);
        entity = response.getEntity();
        is = entity.getContent();
        reader = new BufferedReader(new InputStreamReader(is, "UTF-8"), 8);
        sb = new StringBuilder();
        while ((line = reader.readLine()) != null)
            sb.append(line).append("\n");

        CleanupUtils.doClean(reader);
        CleanupUtils.doClean(is);

        if (sb.length() <= 0)
            throw new Exception("Server did not respond ");

        for (Header h : response.getAllHeaders())
        {
            if ("Set-Cookie".equalsIgnoreCase(h.getName()))
            {
                strCKVal = h.getValue();
                break;
            }
        }

         json = new JSONObject(sb.toString());
        _strSesId = strCKVal;
        return json;
    }
    finally
    {
        CleanupUtils.doClean(reader);
        CleanupUtils.doClean(is);
        if (line != null) line = null;
        if (strCKVal != null) strCKVal = null;
        if (entity != null) entity = null;
        if (httppost != null) httppost = null;
        if (reader != null) reader = null;
        if (is != null) is = null;
        if (response != null) response = null;
        CleanupUtils.doClean(is);
        if (sb  != null)
        {
            sb.delete(0, sb.length());
            sb = null;
        }
        if (httpclient != null) httpclient = null;
    }
}

Prasad P. Khandekar
Knowledge exists, man only discovers it.

QuestionPhoneGap Applications Pin
Sudhakar Shinde12-Mar-13 22:06
Sudhakar Shinde12-Mar-13 22:06 
QuestionPIC-32 UART Receives Only Ten Bytes Then No More Pin
C-P-User-38-Mar-13 11:16
C-P-User-38-Mar-13 11:16 
Questionhow the android mobile can fetch a voice from application on it and send it by calling Pin
saad20005-Mar-13 9:24
saad20005-Mar-13 9:24 
QuestionAPP Demographics Pin
mauricemcse1-Mar-13 7:28
mauricemcse1-Mar-13 7:28 

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.