i have written a code in java in eclipse that can let me create a product on a local database ..
im have database contain lat and long, and i use json parser in android. i want to get the value of latitude and longitude from marker that i click.
I get following error:
Error parsing data org.json.JSONException: Value [] of type org.json.JSONArray cannot be converted to JSONObject
Here is the Android and PHP code I have:
private void eventUpdatePoint(String eventStatus,int lat,int lon){
JSONParser jsonParserEUP = new JSONParser();
try
{
List<NameValuePair> params = new ArrayList<NameValuePai
I want to show the alert dialog inside a class which extends with arrayAdapter.
I am getting this error
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
Here my code, what i have tried
public class DeteteAdapter extends ArrayAdapter<Gold> {
private int contexts = Intent.FLAG_ACTIVITY_NEW_TASK;
private Context context;
private List
I have my php web serivce that reterives me list of topics from my forum and I used JSON to pare is into listview in my ANdroid app
unfortunatelly when running the app and when I go the the page where i should see that list I get black blank screen and in my logcat I got this error
03-17 15:00:04.189: E/JSON Parser(379): Error parsing data org.json.JSONException: Value <?xml of type java.la
i'm having a problem getting the json from pinterest it always error on the JSONArray part.
code
JSONArray bodyarray = null;
JSONParser jParser = new JSONParser();
JSONObject json = jParser.getJSONFromUrl(url);
Log.i("url",""+url);
Log.i("json",""+json);
try{
bodyarray = json.getJSONArray(TAG_body); <---- this is the error here "NullPointerException"
Log.i("JSON", ""+bodyarray);
please help me.
I am trying to receive sms and then I am sending SMS message to PHP webserver. When new sms is received then content of that sms is must be passes as NameValuePair parameter to send to web server.
I am attempting to load JSON content into a listview containing image and text but I'm getting a NullPointerException' in line 154 i.e lv1.setAdapter(efficienadapter); in Actualities.class .
I don't know if its because the postlist is null or an error in my code.
someone can help me please
My Actualites class
public class Actualites extends Activity {
ListView lv1;
ProgressDialog Sh
I'm using class that extends AsyncTask but I have error at the line that executes the class
I couldn't figure it out
here is the class that includes my main class and the class that extends AsyncTask
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.apache.http.NameValuePair;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONOb