Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7765937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:17:20+00:00 2026-06-01T15:17:20+00:00

I have following code and i want to pass additional parameter in JSON.getJSONfromURL() method

  • 0

I have following code and i want to pass additional parameter in JSON.getJSONfromURL() method but when i check on android it throws this exception

04-11 11:58:18.929: E/AndroidRuntime(566): FATAL EXCEPTION: main 04-11
11:58:18.929: E/AndroidRuntime(566): java.lang.RuntimeException:
Unable to start activity
ComponentInfo{cyclist.project/cyclist.project.user_discussion}:
java.lang.NullPointerException 04-11 11:58:18.929:
E/AndroidRuntime(566): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
04-11 11:58:18.929: E/AndroidRuntime(566): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-11 11:58:18.929: E/AndroidRuntime(566): at
android.app.ActivityThread.access$2300(ActivityThread.java:125) 04-11
11:58:18.929: E/AndroidRuntime(566): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-11 11:58:18.929: E/AndroidRuntime(566): at
android.os.Handler.dispatchMessage(Handler.java:99) 04-11
11:58:18.929: E/AndroidRuntime(566): at
android.os.Looper.loop(Looper.java:123) 04-11 11:58:18.929:
E/AndroidRuntime(566): at
android.app.ActivityThread.main(ActivityThread.java:4627) 04-11
11:58:18.929: E/AndroidRuntime(566): at
java.lang.reflect.Method.invokeNative(Native Method) 04-11
11:58:18.929: E/AndroidRuntime(566): at
java.lang.reflect.Method.invoke(Method.java:521) 04-11 11:58:18.929:
E/AndroidRuntime(566): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-11 11:58:18.929: E/AndroidRuntime(566): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 04-11
11:58:18.929: E/AndroidRuntime(566): at
dalvik.system.NativeStart.main(Native Method) 04-11 11:58:18.929:
E/AndroidRuntime(566): Caused by: java.lang.NullPointerException 04-11
11:58:18.929: E/AndroidRuntime(566): at
cyclist.project.JSON.getJSONfromURL(JSON.java:60) 04-11 11:58:18.929:
E/AndroidRuntime(566): at
cyclist.project.user_discussion.setList(user_discussion.java:250)
04-11 11:58:18.929: E/AndroidRuntime(566): at
cyclist.project.user_discussion.onCreate(user_discussion.java:154)
04-11 11:58:18.929: E/AndroidRuntime(566): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-11 11:58:18.929: E/AndroidRuntime(566): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
04-11 11:58:18.929: E/AndroidRuntime(566): … 11 more

Code:

    JSONObject json;

    try {
        json = new JSONObject(
        JSON.getJSONfromURL("http://myweb.com/ws_cyc/events_service.php?action=get_chats&title=fsfbnn" ));
    JSONArray miles = json.getJSONArray("cyc");
    JSONObject rec;
    JSONObject rec2 = null; 

    for (int i=0; i<miles.length(); i++){
                rec = miles.getJSONObject(i);
                rec2 = rec.getJSONObject("cycObject");
                new discussion_item(rec2.getString("Chats").toString());
                ImgList.add( rec2.getString("image_path").toString() );
                list.add( rec2.getString("email").toString() + ": " + rec2.getString("Chats").toString() );
            }                                   
    } catch (JSONException e) {
            e.printStackTrace();
        }   

Please guide me how to pass additional parameters in JSON.getJSONfromURL() and how php will get it , my php code to catch jason is

$titlez = json_decode($_GET['title']);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:17:21+00:00Added an answer on June 1, 2026 at 3:17 pm

    As the error log says, it is caused by null Value being passed and attempted to be processed at line 154 of the file user_discussion.java

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code I want to run, but the problem is $this->type
I have the following code: foreach (var control in this.Controls) { } I want
I have the following code in Ruby. I want to convert this code into
I have the following code <a href=process.html>cholera</a> I want to pass cholera to process.html
I have the following code. I want to add/remove check-box values to an array
I want to know is below code correct ? I have following code which
I have the following code: [ [NSDate date] descriptionWithLocale: @yyyy-MM-dd ] I want it
I have the following code, which I want to load values on a selection
I have the following code where after a bool is true I want to
I have a following code , I want to display all the attributes of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.