Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MySQL Android
I am designing an application which accesses data from a fragment.. the error details and code is given below.. Please help
06-21 10:46:12.161: D/dalvikvm(7950): GC_FOR_ALLOC freed 91K, 9% free 11003K/11975K, paused 20ms, total 22ms
06-21 10:46:12.191: D/dalvikvm(7950): GC_FOR_ALLOC freed 30K, 9% free 11188K/12231K, paused 19ms, total 19ms
06-21 10:46:12.231: D/dalvikvm(7950): GC_FOR_ALLOC freed <1K, 7% free 11618K/12487K, paused 19ms, total 20ms
06-21 10:46:12.391: W/IInputConnectionWrapper(7950): getSelectedText on inactive InputConnection
06-21 10:46:12.401: W/IInputConnectionWrapper(7950): setComposingText on inactive InputConnection
06-21 10:46:12.661: D/SensorManager(7950): unregisterListener:: Trklfufi 9 budiwrd5mrfo5WirfulblrwuFmfulTrklfufi$KfukwiFmfulTrklfufiRvht@,*f*abb(
06-21 10:46:12.661: D/Sensors(7950): Remain listener = Sending .. normal delay 200ms
06-21 10:46:12.661: I/Sensors(7950): sendDelay --- 200000000
06-21 10:46:12.661: D/SensorManager(7950): JNI - sendDelay
06-21 10:46:12.661: I/SensorManager(7950): Set normal delay = true
06-21 10:46:13.702: D/dalvikvm(7950): GC_FOR_ALLOC freed 16K, 8% free 12079K/12999K, paused 19ms, total 19ms
06-21 10:46:13.742: D/dalvikvm(7950): GC_FOR_ALLOC freed 3K, 6% free 12943K/13767K, paused 18ms, total 18ms
06-21 10:46:13.862: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:13.862: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:14.823: D/dalvikvm(7950): GC_FOR_ALLOC freed 13K, 7% free 13830K/14791K, paused 21ms, total 22ms
06-21 10:46:14.923: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:14.923: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:19.368: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:19.368: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:20.048: D/dalvikvm(7950): GC_FOR_ALLOC freed 1332K, 14% free 13859K/16071K, paused 27ms, total 27ms
06-21 10:46:20.169: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:20.169: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:20.629: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:20.629: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:22.090: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:22.090: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:25.033: D/SensorManager(7950): registerListener :: handle = 4  name= BMA222 3-axis Accelerometer delay= 200000 Trklfufi 9 budiwrd5mrfo5WirfulblrwuFmfulTrklfufi$KfukwiFmfulTrklfufiRvht@,*f*abb(
06-21 10:46:25.103: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:25.103: E/SpannableStringBuilder(7950): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-21 10:46:25.914: D/dalvikvm(7950): GC_CONCURRENT freed 980K, 12% free 14344K/16135K, paused 8ms+5ms, total 53ms
06-21 10:46:26.014: W/IInputConnectionWrapper(7950): showStatusIcon on inactive InputConnection
06-21 10:46:26.505: D/SensorManager(7950): unregisterListener:: Trklfufi 9 budiwrd5mrfo5WirfulblrwuFmfulTrklfufi$KfukwiFmfulTrklfufiRvht@,*f*abb(
06-21 10:46:26.505: D/Sensors(7950): Remain listener = Sending .. normal delay 200ms
06-21 10:46:26.505: I/Sensors(7950): sendDelay --- 200000000
06-21 10:46:26.505: D/SensorManager(7950): JNI - sendDelay
06-21 10:46:26.505: I/SensorManager(7950): Set normal delay = true
06-21 10:58:17.476: W/ActivityThread(9850): Application com.mahavega.qcdemo can be debugged on port 8100...
06-21 10:58:17.796: D/dalvikvm(9850): GC_FOR_ALLOC freed 108K, 9% free 9563K/10503K, paused 35ms, total 36ms
06-21 10:58:17.796: I/dalvikvm-heap(9850): Grow heap (frag case) to 10.487MB for 437672-byte allocation
06-21 10:58:17.836: D/dalvikvm(9850): GC_CONCURRENT freed 1K, 9% free 9990K/10951K, paused 14ms+2ms, total 33ms
06-21 10:58:17.836: D/dalvikvm(9850): WAIT_FOR_CONCURRENT_GC blocked 4ms
06-21 10:58:17.946: D/dalvikvm(9850): GC_FOR_ALLOC freed 2K, 9% free 10214K/11207K, paused 44ms, total 45ms
06-21 10:58:17.996: D/AndroidRuntime(9850): Shutting down VM
06-21 10:58:17.996: W/dalvikvm(9850): threadid=1: thread exiting with uncaught exception (group=0x414562a0)
06-21 10:58:18.096: E/AndroidRuntime(9850): FATAL EXCEPTION: main
06-21 10:58:18.096: E/AndroidRuntime(9850): java.lang.NullPointerException
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at com.mahavega.qcdemo.Mainmenu$GetEventDetails.onPreExecute(Mainmenu.java:77)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.os.AsyncTask.execute(AsyncTask.java:534)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at com.mahavega.qcdemo.Mainmenu.onCreateView(Mainmenu.java:54)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:911)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:461)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:141)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.support.v4.view.ViewPager.populate(ViewPager.java:1012)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.support.v4.view.ViewPager.populate(ViewPager.java:881)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1366)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.View.measure(View.java:15288)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:617)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:399)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.View.measure(View.java:15288)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4876)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.View.measure(View.java:15288)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4876)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1396)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.widget.LinearLayout.measureVertical(LinearLayout.java:681)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.widget.LinearLayout.onMeasure(LinearLayout.java:574)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.View.measure(View.java:15288)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4876)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2397)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.View.measure(View.java:15288)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1974)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1217)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1390)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1113)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4481)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.Choreographer.doCallbacks(Choreographer.java:555)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.Choreographer.doFrame(Choreographer.java:525)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.os.Handler.handleCallback(Handler.java:615)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.os.Handler.dispatchMessage(Handler.java:92)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.os.Looper.loop(Looper.java:137)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at android.app.ActivityThread.main(ActivityThread.java:4856)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at java.lang.reflect.Method.invokeNative(Native Method)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at java.lang.reflect.Method.invoke(Method.java:511)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
06-21 10:58:18.096: E/AndroidRuntime(9850): 	at dalvik.system.NativeStart.main(Native Method)
06-21 10:58:29.067: I/Process(9850): Sending signal. PID: 9850 SIG: 9
06-21 10:59:38.476: W/ActivityThread(10403): Application com.mahavega.qcdemo can be debugged on port 8100...
06-21 10:59:38.767: D/dalvikvm(10403): GC_FOR_ALLOC freed 94K, 9% free 9563K/10503K, paused 26ms, total 27ms
06-21 10:59:38.767: I/dalvikvm-heap(10403): Grow heap (frag case) to 10.487MB for 437672-byte allocation
06-21 10:59:38.817: D/dalvikvm(10403): GC_CONCURRENT freed 1K, 9% free 9989K/10951K, paused 18ms+2ms, total 42ms
06-21 10:59:38.817: D/dalvikvm(10403): WAIT_FOR_CONCURRENT_GC blocked 26ms
06-21 10:59:38.867: D/dalvikvm(10403): GC_FOR_ALLOC freed 2K, 9% free 10214K/11207K, paused 20ms, total 20ms
06-21 10:59:38.887: D/AndroidRuntime(10403): Shutting down VM
06-21 10:59:38.887: W/dalvikvm(10403): threadid=1: thread exiting with uncaught exception (group=0x414562a0)
06-21 10:59:38.927: E/AndroidRuntime(10403): FATAL EXCEPTION: main
06-21 10:59:38.927: E/AndroidRuntime(10403): java.lang.NullPointerException
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at com.mahavega.qcdemo.Mainmenu$GetEventDetails.onPreExecute(Mainmenu.java:81)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.os.AsyncTask.execute(AsyncTask.java:534)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at com.mahavega.qcdemo.Mainmenu.onCreateView(Mainmenu.java:58)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:911)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:461)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:141)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.support.v4.view.ViewPager.populate(ViewPager.java:1012)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.support.v4.view.ViewPager.populate(ViewPager.java:881)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1366)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.View.measure(View.java:15288)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:617)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:399)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.View.measure(View.java:15288)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4876)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.View.measure(View.java:15288)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4876)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1396)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.widget.LinearLayout.measureVertical(LinearLayout.java:681)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.widget.LinearLayout.onMeasure(LinearLayout.java:574)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.View.measure(View.java:15288)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4876)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2397)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.View.measure(View.java:15288)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1974)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1217)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1390)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1113)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4481)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.Choreographer.doCallbacks(Choreographer.java:555)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.Choreographer.doFrame(Choreographer.java:525)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.os.Handler.handleCallback(Handler.java:615)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.os.Handler.dispatchMessage(Handler.java:92)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.os.Looper.loop(Looper.java:137)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at android.app.ActivityThread.main(ActivityThread.java:4856)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at java.lang.reflect.Method.invokeNative(Native Method)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at java.lang.reflect.Method.invoke(Method.java:511)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
06-21 10:59:38.927: E/AndroidRuntime(10403): 	at dalvik.system.NativeStart.main(Native Method)
06-21 10:59:49.047: I/Process(10403): Sending signal. PID: 10403 SIG: 9
 

the code is
package com.mahavega.qcdemo;
 
import java.util.ArrayList;
import java.util.List;
 
import org.apache.http.NameValuePair;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
 
//import com.programmingmobile.pageviewer.R;

import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.StrictMode;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;
 
public class Mainmenu extends Fragment {
	public ProgressDialog pDialog;
	JSONParser jsonParser = new JSONParser();
	private static final String url_product_detials = "http://neogdgt.com/mob/get_det.php";
	//private static final String TAG_ID="event_id";
	private static final String TAG_SUCCESS = "success";
	private static final String TAG_EVENTS = "events";
	private static final String TAG_EVENTITLE = "event_title";
	private static final String TAG_EVENTDET = "event_details";
	public static final Mainmenu newInstance(String message)
	{
		Mainmenu f = new Mainmenu();
		Bundle bdl = new Bundle(1);
	    f.setArguments(bdl);
	    return f;
	}
	
	@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, 
        Bundle savedInstanceState) {
		StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
		  .detectDiskReads().detectDiskWrites().detectNetwork() // StrictMode is most commonly used to catch accidental disk or network access on the application's main thread
		  .penaltyLog().build());
		View v = inflater.inflate(R.layout.activity_main, container, false);
        ImageView ad = (ImageView)v.findViewById(R.id.imageView1);
        new GetEventDetails().execute();
        ad.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v1) {
				v1.startAnimation(AnimationUtils.loadAnimation( v1.getContext(), R.anim.click));
					//boolean inet = isOnline();
						startActivity(new Intent(getActivity(), Adds.class));
						//overridePendingTransition(R.anim.slide_left, R.anim.slide_right);
					//finish();
					
			}
		});
        return v;
	}
	
	
	
	
	class GetEventDetails extends AsyncTask<String, String, String> {
		@Override
		protected void onPreExecute() {
			super.onPreExecute();
			pDialog.setMessage("Loading data from servers. Please wait...");
			pDialog.setIndeterminate(false);
			pDialog.setCancelable(true);
			pDialog.show();
		}
		/**
		 * Getting product details in background thread
		 */
		protected String doInBackground(String... params) {
 
			// updating UI from Background Thread
			getActivity().runOnUiThread(new Runnable() {
				public void run() {
					// Check for success tag
					int success;
					try {
						// Building Parameters
						//String pid="1";
						List<NameValuePair> params = new ArrayList<NameValuePair>();
						// getting product details by making HTTP request
						// Note that product details url will use GET request
						JSONObject json = jsonParser.makeHttpRequest(url_product_detials, "GET", params);
 
						// check your log for json response
						Log.d("Single Product Details", json.toString());
 
						// json success tag
						success = json.getInt(TAG_SUCCESS);
						if (success == 1) {
							// successfully received product details
							JSONArray eventObj = json.getJSONArray(TAG_EVENTS); // JSON Array

							// get first product object from JSON Array
							JSONObject event = eventObj.getJSONObject(0);
 
							// product with this pid found
							TextView txtEventname=(TextView) getView().findViewById(R.id.textView2);
							TextView txtEventdet=(TextView) getView().findViewById(R.id.textView3);
							// Edit Text
							txtEventname.setText(event.getString(TAG_EVENTITLE));
							txtEventdet.setText(event.getString(TAG_EVENTDET));
						}else{
							// product with pid not found
						}
					} catch (JSONException e) {
						e.printStackTrace();
					}
				}
			});
 

			return null;
		}
		protected void onPostExecute(String file_url) {
			// dismiss the dialog once done
			pDialog.dismiss();
		}
 
}
}
 
	
Posted 20-Jun-13 20:35pm
Comments
WajihaAhmed at 22-Jun-13 3:27am
   
What you except? No one has got so much time to read this long log except you! You have the log file, try to trace the error yourself. It isn't that much hard!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 220
2 DamithSL 190
3 Raul Iloc 185
4 Richard MacCutchan 175
0 OriginalGriff 5,130
1 DamithSL 4,197
2 Maciej Los 3,670
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,821


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 21 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100