memunculkan native im

by Rizki Muhammad » Thu, 07 Jan 2010 09:35:22 GMT


Sponsored Links
 guys,saya mau nanya, selama ini saya gonta ganti rom kenapa gak pernah
muncul native im yaa? sekarang saya di latest cyan, gimana caranya biar saya
bisa munculin native im yaa?



memunculkan native im

by Budi Sentosa » Thu, 07 Jan 2010 09:52:22 GMT


 di milis ini sudah ada bos
coba search




>


Sponsored Links


Other Threads

1. Json paser showing array length as 0.. pls help

hi guys this the class where i m parsing the values

package com.example;

import java.io.IOException;
import java.util.ArrayList;

import org.apache.http.HttpResponse;
import org.apache.http.ParseException;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.content.Context;
import android.util.Log;

public class JSONhelper {

        private final String baseURL = "http://ajax.googleapis.com/ajax/
services/search/local?v=1.0&sll=48.8565,2.3509&q=restaurant";


        JSONArray resultsJsonArray;
        JSONObject placesJsonObject;
        ArrayList<PlaceInformation> resultArrayList = new
ArrayList<PlaceInformation>();



        public JSONhelper(Context context) {

        }

        public void getJson() {
                HttpGet httpGet = getHttpUriRequest();
                HttpClient httpClient = getHttpClient();
                HttpResponse httpResponse = getHttpResponse(httpGet, 
httpClient);
                JSONObject jsonObject = getJSONObject(httpResponse);

                // initialiseArrayLists(jsonObject);
                getResultsArrayList(jsonObject);
                // Log.v(TAG, "ArrayList initialized=" + flag);
        }



        public void getResultsArrayList(JSONObject jsonObject) {
                try {
                        resultsJsonArray = jsonObject.getJSONArray("resuslt");
                        for (int i = 0; i < resultsJsonArray.length(); i++) {
                                placesJsonObject = 
resultsJsonArray.getJSONObject(i);
                                getPlaceInformation(placesJsonObject);
                        }
                } catch (Exception e) {
                        // TODO: handle exception
                }
        }

        private void getPlaceInformation(JSONObject placesJsonObject2)
                        throws JSONException {
                PlaceInformation placeinfo = new PlaceInformation();
                placeinfo.lat = placesJsonObject2.getString("lat");
                placeinfo.lng = placesJsonObject2.getString("lng");
                placeinfo.title = placesJsonObject2.getString("title");
                placeinfo.city = placesJsonObject2.getString("city");
                placeinfo.country = placesJsonObject2.getString("country");
                placeinfo.streetAddress =
placesJsonObject2.getString("streetAddress");

                placeinfo.addressLines1 = placesJsonObject2
                                .getJSONArray("addressLines").getString(0);
                placeinfo.addressLines2 = placesJsonObject2
                                .getJSONArray("addressLines").getString(1);

                placeinfo.phoneNumbers =
placesJsonObject2.getJSONArray("phoneNumbers")
                                .getJSONObject(0).getString("phoneNumbers");

                resultArrayList.add(placeinfo);

        }



        private HttpGet getHttpUriRequest() {
                HttpGet get = null;
                Log.v("111", "tt" + get);

                String URL = baseURL;// getURL(("since"));
                try {
                        get = new HttpGet(URL);
                        Log.v("111", "tt" + get);
                        Log.v("111", "tt" + URL);
                } catch (IllegalArgumentException e) {
                        // Log.v(TAG, "IllegalArgumentException");
                        e.printStackTrace();
                }
                return get;
        }

        private HttpClient getHttpClient() {
                HttpClient httpClient = new DefaultHttpClient();
                Log.v("222", "ccc" + httpClient);
                return httpClient;
        }

        private HttpResponse getHttpResponse(HttpGet get, HttpClient
httpClient) {
                HttpResponse httpResponse = null;
                try {
                        Log.v("getHttpResponse====", "httpClient" + httpClient);
                        Log.v("getHttpResponse====", "get" + get);
                        httpResponse = httpClient.execute(get);
                        Log.v("333", "rrr" + httpResponse);

                } catch (ClientProtocolException e) {

                        e.printStackTrace();
                } catch (IOException e) {
                        // Log.v(TAG, "IOException");
                        e.printStackTrace();
                }
                return httpResponse;

        }

        JSONObject getJSONObject(HttpResponse httpResponse) {

                String jsonString = null;
                JSONObject responseDataJsonObject = null;
                if (httpResponse.getStatusLine().toString().equals("HTTP/1.1 200
OK"))

                {
                        try {
                                jsonString = 
EntityUtils.toString(httpResponse.getEntity());
                                Log.v("sdfvsd", "*********" + 
jsonString.toString());
                                responseDataJsonObject = new 
JSONObject(jsonString);

                        } catch (ParseException e) {
                                // Log.v(TAG, "ParseException");
                                e.printStackTrace();
                        } catch (IOException e) {
                                // Log.v(TAG, "IOException");
                                e.printStackTrace();
                        } catch (JSONException e) {
                                // Log.v(TAG, "JSONException");
                                e.printStackTrace();
                        }
                }
                return responseDataJsonObject;
        }

}


*********************
later in next class i m

package com.example;


import java.util.ArrayList;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;


public class First extends Activity {
        @Override
        protected void onCreate(Bundle savedInstanceState) {
                // TODO Auto-generated method stub
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);
                JSONhelper jsoNhelper=new JSONhelper(getApplicationContext());
                jsoNhelper.getJson();
                ArrayList<PlaceInformation> a=jsoNhelper.resultArrayList;
                Log.v("First", " arrayList length="+ a.size());

        }

}


here i m not getting the list of array...means the out put....
pls comment and solve my issues

-- 

2. Android Patent issue

All,

I have just started my career in Android world and finding more
interesting. Just wanted to know does this patent issue will impact to
android development?

-- 

3. What does "Battery Use" tell and how is it implemented?

4. Geofence application in android

5. framework to integrate a new voice recognition engine.

6. Android Email Client Omits Email Headers

7. Problems porting Android OS onto a new platform