Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e1a9e64

Browse files
author
Alex Gotev
committed
Update README.md
Added usage example for array parameter values using arrays and lists
1 parent aa3b747 commit e1a9e64

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,21 @@ Upload it to your server and pass "uploaded_file" as the second parameter to the
6464

6565
request.addParameter("parameter-name", "parameter-value");
6666
67-
//If you want to add an array of strings, you can simply to the following:
67+
//If you want to add an array of strings, you can do the following:
6868
request.addParameter("array-parameter-name", "value1");
6969
request.addParameter("array-parameter-name", "value2");
7070
request.addParameter("array-parameter-name", "valueN");
71+
72+
//or
73+
String[] values = new String[] {"value1", "value2", "valueN"};
74+
request.addArrayParameter("array-parameter-name", values);
75+
76+
//or
77+
List<String> valuesList = new ArrayList<String>();
78+
valuesList.add("value1");
79+
valuesList.add("value2");
80+
valuesList.add("valueN");
81+
request.addArrayParameter("array-parameter-name", valuesList);
7182

7283
request.setNotificationConfig(
7384
android.R.drawable.ic_menu_upload, //Notification icon. You can use your own app's R.drawable.your_resource

0 commit comments

Comments
 (0)