How To send array in params in fast android networking libraryHow to save an Android Activity state using save instance state?How do I check if an array includes an object in JavaScript?How to append something to an array?How to insert an item into an array at a specific index (JavaScript)?How do I determine whether an array contains a particular value in Java?How do I declare and initialize an array in Java?How do I empty an array in JavaScript?Why is the Android emulator so slow? How can we speed up the Android emulator?How to check if an object is an array?How do I remove a particular element from an array in JavaScript?

How to predict the decomposition products of for example barium carbonate?

How do email clients "send later" without storing a password?

Seized engine due to being run without oil

Resume: How to quantify my contributions as a software engineer?

How can I fix a framing mistake so I can drywall?

Has any object launched from Earth gone into the Sun?

Can I disable a battery powered device by reversing half of its batteries?

Creating a Master Image to roll out to 30 new Machines Licensing Issues

Which currencies does Wizz Air use in-flight?

How to easily add discontinuity on x-axis?

How does Vivi differ from other Black Mages?

How do I politely hint customers to leave my store, without pretending to need leave store myself?

Why does F + F' = 1?

Kingdom Map and Travel Pace

My research paper filed as a patent in China by my Chinese supervisor without me as inventor

Is there a standard terminology for female equivalents of terms such as 'Kingdom' and if so, what are the most common terms?

Where does the expression "triple-A" comes from?

Relevance of the Resurrection

Why would "an mule" be used instead of "a mule"?

„nichts wie raus hier“ - explanation based on the literal meaning?

Exact Brexit date and consequences

What is the use of FullForm in Mathematica?

Why was "leaping into the river" a valid trial outcome to prove one's innocence?

Are scroll bars dead in 2019?



How To send array in params in fast android networking library


How to save an Android Activity state using save instance state?How do I check if an array includes an object in JavaScript?How to append something to an array?How to insert an item into an array at a specific index (JavaScript)?How do I determine whether an array contains a particular value in Java?How do I declare and initialize an array in Java?How do I empty an array in JavaScript?Why is the Android emulator so slow? How can we speed up the Android emulator?How to check if an object is an array?How do I remove a particular element from an array in JavaScript?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am using Fast-Android-Networking and I want to send data to server which contains strings and arrays. It's ok to send string but I am unable to send array its not array list. It's simple array.
I have search other solution but all are regarding volley.
can anyone help?
Please dont mark duplicate.
The last 5 parameters are arrays. I tried it as String.valueOf(ReadQuran) but it also didn't work.



My Code:



 AndroidNetworking.post(Api.ROOT_URL +"api/stageFiveFormData")
.addBodyParameter("mto_id",idu)
.addBodyParameter("school_id", scholid)
.addBodyParameter("person_name", personnameS)
.addBodyParameter("designation", designantionS)
.addBodyParameter("cell_number",personcellS)
.addBodyParameter("email",emailpersonS)
.addBodyParameter("whatsapp_number",whatsApppersonS)
.addBodyParameter("school_name",schoolNameS)
.addBodyParameter("postal_address",postalAdressS)
.addBodyParameter("city",cityS)
.addBodyParameter("tehsil",tehsilS)
.addBodyParameter("district",districtS)
.addBodyParameter("s_primary", priamryChecked)
.addBodyParameter("s_middle", middleChecked)
.addBodyParameter("s_high", highChecked)
.addBodyParameter("s_higher", hsChecked)
.addBodyParameter("principal_name", nameOfPrincipalS)
.addBodyParameter("p_contact_num",cellNoPrincipalS)
.addBodyParameter("p_email",emailPrincipalS)
.addBodyParameter("p_whatsapp_number",whatsAppPrincipalS)
.addBodyParameter("class", Class)
.addBodyParameter("rq_book", String.valueOf(ReadQuran))
.addBodyParameter("rqb_qty", String.valueOf(ReadQuranQty))
.addBodyParameter("fq_book", String.valueOf(FehamQuran))
.addBodyParameter("fqb_qty", String.valueOf(FehamQuranQty))




.setPriority(Priority.HIGH)
.build()
.getAsString(new StringRequestListener()
public void onResponse(String response)
try
JSONArray jsonArray = new JSONArray(response);
JSONObject jsonObject = jsonArray.getJSONObject(0);
String result = jsonObject.getString("result");
String message = jsonObject.getString("message");


if (result.equalsIgnoreCase("success"))
Toast.makeText(FormStage5.this, "" + message, Toast.LENGTH_SHORT).show();
Intent intent = new Intent(FormStage5.this, formstage2submittedmsg.class);
startActivity(intent);


pDialog.dismiss();
else/* (result.equalsIgnoreCase("0"))*/
Toast.makeText(FormStage5.this, ""+message, Toast.LENGTH_SHORT).show();
pDialog.dismiss();


catch (JSONException e)
pDialog.dismiss();
Toast.makeText(FormStage5.this, "Something Went Wrong , Try Again", Toast.LENGTH_SHORT).show();





@Override
public void onError(ANError anError)
Toast.makeText(FormStage5.this, "Please Check Your Internet Connection" + anError.toString(), Toast.LENGTH_LONG).show();
pDialog.hide();

);









share|improve this question
































    0















    I am using Fast-Android-Networking and I want to send data to server which contains strings and arrays. It's ok to send string but I am unable to send array its not array list. It's simple array.
    I have search other solution but all are regarding volley.
    can anyone help?
    Please dont mark duplicate.
    The last 5 parameters are arrays. I tried it as String.valueOf(ReadQuran) but it also didn't work.



    My Code:



     AndroidNetworking.post(Api.ROOT_URL +"api/stageFiveFormData")
    .addBodyParameter("mto_id",idu)
    .addBodyParameter("school_id", scholid)
    .addBodyParameter("person_name", personnameS)
    .addBodyParameter("designation", designantionS)
    .addBodyParameter("cell_number",personcellS)
    .addBodyParameter("email",emailpersonS)
    .addBodyParameter("whatsapp_number",whatsApppersonS)
    .addBodyParameter("school_name",schoolNameS)
    .addBodyParameter("postal_address",postalAdressS)
    .addBodyParameter("city",cityS)
    .addBodyParameter("tehsil",tehsilS)
    .addBodyParameter("district",districtS)
    .addBodyParameter("s_primary", priamryChecked)
    .addBodyParameter("s_middle", middleChecked)
    .addBodyParameter("s_high", highChecked)
    .addBodyParameter("s_higher", hsChecked)
    .addBodyParameter("principal_name", nameOfPrincipalS)
    .addBodyParameter("p_contact_num",cellNoPrincipalS)
    .addBodyParameter("p_email",emailPrincipalS)
    .addBodyParameter("p_whatsapp_number",whatsAppPrincipalS)
    .addBodyParameter("class", Class)
    .addBodyParameter("rq_book", String.valueOf(ReadQuran))
    .addBodyParameter("rqb_qty", String.valueOf(ReadQuranQty))
    .addBodyParameter("fq_book", String.valueOf(FehamQuran))
    .addBodyParameter("fqb_qty", String.valueOf(FehamQuranQty))




    .setPriority(Priority.HIGH)
    .build()
    .getAsString(new StringRequestListener()
    public void onResponse(String response)
    try
    JSONArray jsonArray = new JSONArray(response);
    JSONObject jsonObject = jsonArray.getJSONObject(0);
    String result = jsonObject.getString("result");
    String message = jsonObject.getString("message");


    if (result.equalsIgnoreCase("success"))
    Toast.makeText(FormStage5.this, "" + message, Toast.LENGTH_SHORT).show();
    Intent intent = new Intent(FormStage5.this, formstage2submittedmsg.class);
    startActivity(intent);


    pDialog.dismiss();
    else/* (result.equalsIgnoreCase("0"))*/
    Toast.makeText(FormStage5.this, ""+message, Toast.LENGTH_SHORT).show();
    pDialog.dismiss();


    catch (JSONException e)
    pDialog.dismiss();
    Toast.makeText(FormStage5.this, "Something Went Wrong , Try Again", Toast.LENGTH_SHORT).show();





    @Override
    public void onError(ANError anError)
    Toast.makeText(FormStage5.this, "Please Check Your Internet Connection" + anError.toString(), Toast.LENGTH_LONG).show();
    pDialog.hide();

    );









    share|improve this question




























      0












      0








      0








      I am using Fast-Android-Networking and I want to send data to server which contains strings and arrays. It's ok to send string but I am unable to send array its not array list. It's simple array.
      I have search other solution but all are regarding volley.
      can anyone help?
      Please dont mark duplicate.
      The last 5 parameters are arrays. I tried it as String.valueOf(ReadQuran) but it also didn't work.



      My Code:



       AndroidNetworking.post(Api.ROOT_URL +"api/stageFiveFormData")
      .addBodyParameter("mto_id",idu)
      .addBodyParameter("school_id", scholid)
      .addBodyParameter("person_name", personnameS)
      .addBodyParameter("designation", designantionS)
      .addBodyParameter("cell_number",personcellS)
      .addBodyParameter("email",emailpersonS)
      .addBodyParameter("whatsapp_number",whatsApppersonS)
      .addBodyParameter("school_name",schoolNameS)
      .addBodyParameter("postal_address",postalAdressS)
      .addBodyParameter("city",cityS)
      .addBodyParameter("tehsil",tehsilS)
      .addBodyParameter("district",districtS)
      .addBodyParameter("s_primary", priamryChecked)
      .addBodyParameter("s_middle", middleChecked)
      .addBodyParameter("s_high", highChecked)
      .addBodyParameter("s_higher", hsChecked)
      .addBodyParameter("principal_name", nameOfPrincipalS)
      .addBodyParameter("p_contact_num",cellNoPrincipalS)
      .addBodyParameter("p_email",emailPrincipalS)
      .addBodyParameter("p_whatsapp_number",whatsAppPrincipalS)
      .addBodyParameter("class", Class)
      .addBodyParameter("rq_book", String.valueOf(ReadQuran))
      .addBodyParameter("rqb_qty", String.valueOf(ReadQuranQty))
      .addBodyParameter("fq_book", String.valueOf(FehamQuran))
      .addBodyParameter("fqb_qty", String.valueOf(FehamQuranQty))




      .setPriority(Priority.HIGH)
      .build()
      .getAsString(new StringRequestListener()
      public void onResponse(String response)
      try
      JSONArray jsonArray = new JSONArray(response);
      JSONObject jsonObject = jsonArray.getJSONObject(0);
      String result = jsonObject.getString("result");
      String message = jsonObject.getString("message");


      if (result.equalsIgnoreCase("success"))
      Toast.makeText(FormStage5.this, "" + message, Toast.LENGTH_SHORT).show();
      Intent intent = new Intent(FormStage5.this, formstage2submittedmsg.class);
      startActivity(intent);


      pDialog.dismiss();
      else/* (result.equalsIgnoreCase("0"))*/
      Toast.makeText(FormStage5.this, ""+message, Toast.LENGTH_SHORT).show();
      pDialog.dismiss();


      catch (JSONException e)
      pDialog.dismiss();
      Toast.makeText(FormStage5.this, "Something Went Wrong , Try Again", Toast.LENGTH_SHORT).show();





      @Override
      public void onError(ANError anError)
      Toast.makeText(FormStage5.this, "Please Check Your Internet Connection" + anError.toString(), Toast.LENGTH_LONG).show();
      pDialog.hide();

      );









      share|improve this question
















      I am using Fast-Android-Networking and I want to send data to server which contains strings and arrays. It's ok to send string but I am unable to send array its not array list. It's simple array.
      I have search other solution but all are regarding volley.
      can anyone help?
      Please dont mark duplicate.
      The last 5 parameters are arrays. I tried it as String.valueOf(ReadQuran) but it also didn't work.



      My Code:



       AndroidNetworking.post(Api.ROOT_URL +"api/stageFiveFormData")
      .addBodyParameter("mto_id",idu)
      .addBodyParameter("school_id", scholid)
      .addBodyParameter("person_name", personnameS)
      .addBodyParameter("designation", designantionS)
      .addBodyParameter("cell_number",personcellS)
      .addBodyParameter("email",emailpersonS)
      .addBodyParameter("whatsapp_number",whatsApppersonS)
      .addBodyParameter("school_name",schoolNameS)
      .addBodyParameter("postal_address",postalAdressS)
      .addBodyParameter("city",cityS)
      .addBodyParameter("tehsil",tehsilS)
      .addBodyParameter("district",districtS)
      .addBodyParameter("s_primary", priamryChecked)
      .addBodyParameter("s_middle", middleChecked)
      .addBodyParameter("s_high", highChecked)
      .addBodyParameter("s_higher", hsChecked)
      .addBodyParameter("principal_name", nameOfPrincipalS)
      .addBodyParameter("p_contact_num",cellNoPrincipalS)
      .addBodyParameter("p_email",emailPrincipalS)
      .addBodyParameter("p_whatsapp_number",whatsAppPrincipalS)
      .addBodyParameter("class", Class)
      .addBodyParameter("rq_book", String.valueOf(ReadQuran))
      .addBodyParameter("rqb_qty", String.valueOf(ReadQuranQty))
      .addBodyParameter("fq_book", String.valueOf(FehamQuran))
      .addBodyParameter("fqb_qty", String.valueOf(FehamQuranQty))




      .setPriority(Priority.HIGH)
      .build()
      .getAsString(new StringRequestListener()
      public void onResponse(String response)
      try
      JSONArray jsonArray = new JSONArray(response);
      JSONObject jsonObject = jsonArray.getJSONObject(0);
      String result = jsonObject.getString("result");
      String message = jsonObject.getString("message");


      if (result.equalsIgnoreCase("success"))
      Toast.makeText(FormStage5.this, "" + message, Toast.LENGTH_SHORT).show();
      Intent intent = new Intent(FormStage5.this, formstage2submittedmsg.class);
      startActivity(intent);


      pDialog.dismiss();
      else/* (result.equalsIgnoreCase("0"))*/
      Toast.makeText(FormStage5.this, ""+message, Toast.LENGTH_SHORT).show();
      pDialog.dismiss();


      catch (JSONException e)
      pDialog.dismiss();
      Toast.makeText(FormStage5.this, "Something Went Wrong , Try Again", Toast.LENGTH_SHORT).show();





      @Override
      public void onError(ANError anError)
      Toast.makeText(FormStage5.this, "Please Check Your Internet Connection" + anError.toString(), Toast.LENGTH_LONG).show();
      pDialog.hide();

      );






      java android arrays json






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 9:05









      piet.t

      10.3k7 gold badges36 silver badges48 bronze badges




      10.3k7 gold badges36 silver badges48 bronze badges










      asked Mar 28 at 8:53









      Aqib AbbasAqib Abbas

      85 bronze badges




      85 bronze badges

























          2 Answers
          2






          active

          oldest

          votes


















          0
















          The best way is to create a POJO class and set Array value, then pass it. It will automatically gets converted into JSON, if you are using retrofit with GSONConverter factory.






          share|improve this answer
































            0
















            pass the arrayname.toString() as a value






            share|improve this answer



























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );














              draft saved

              draft discarded
















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55393468%2fhow-to-send-array-in-params-in-fast-android-networking-library%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0
















              The best way is to create a POJO class and set Array value, then pass it. It will automatically gets converted into JSON, if you are using retrofit with GSONConverter factory.






              share|improve this answer





























                0
















                The best way is to create a POJO class and set Array value, then pass it. It will automatically gets converted into JSON, if you are using retrofit with GSONConverter factory.






                share|improve this answer



























                  0














                  0










                  0









                  The best way is to create a POJO class and set Array value, then pass it. It will automatically gets converted into JSON, if you are using retrofit with GSONConverter factory.






                  share|improve this answer













                  The best way is to create a POJO class and set Array value, then pass it. It will automatically gets converted into JSON, if you are using retrofit with GSONConverter factory.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 28 at 12:14









                  Jay DangarJay Dangar

                  8876 silver badges19 bronze badges




                  8876 silver badges19 bronze badges


























                      0
















                      pass the arrayname.toString() as a value






                      share|improve this answer





























                        0
















                        pass the arrayname.toString() as a value






                        share|improve this answer



























                          0














                          0










                          0









                          pass the arrayname.toString() as a value






                          share|improve this answer













                          pass the arrayname.toString() as a value







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 28 at 11:26









                          R SatishR Satish

                          13 bronze badges




                          13 bronze badges































                              draft saved

                              draft discarded















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55393468%2fhow-to-send-array-in-params-in-fast-android-networking-library%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                              용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

                              155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해