{"id":13848546,"url":"https://github.com/panxw/android-volley-manager","last_synced_at":"2025-07-12T13:31:32.807Z","repository":{"id":70321411,"uuid":"21157364","full_name":"panxw/android-volley-manager","owner":"panxw","description":"Android Volley by HttpURLConnection(no HttpClient need), JSON, XML, Map, RequestMap(with file) request supported.","archived":false,"fork":false,"pushed_at":"2019-04-23T04:52:52.000Z","size":3075,"stargazers_count":204,"open_issues_count":1,"forks_count":93,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-08-05T19:35:48.200Z","etag":null,"topics":["android-volley","httpurlconnection","panxw","requestmanager","volly-manager"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/panxw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-06-24T08:21:15.000Z","updated_at":"2024-01-16T09:38:14.000Z","dependencies_parsed_at":"2023-02-24T02:00:18.153Z","dependency_job_id":null,"html_url":"https://github.com/panxw/android-volley-manager","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panxw%2Fandroid-volley-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panxw%2Fandroid-volley-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panxw%2Fandroid-volley-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panxw%2Fandroid-volley-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panxw","download_url":"https://codeload.github.com/panxw/android-volley-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225825266,"owners_count":17529905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-volley","httpurlconnection","panxw","requestmanager","volly-manager"],"created_at":"2024-08-04T19:00:51.704Z","updated_at":"2025-07-12T13:31:32.802Z","avatar_url":"https://github.com/panxw.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"Android Volley Manager\n====================\n#### 1.About\nBased on Google's [Android Volley](https://github.com/mcxiaoke/android-volley).  \nPowered by HttpURLConnection, no HttpClient need now!(HttpClient is Deprecated in Android 5.1)  \nSslSocketFactory, HostnameVerifier custom by init.  \nJSON, XML, Map, RequestMap(with file) request supported.  \nAndroid 2.3+(API\u003e=9) is required.  \nTested in Android 5.1, 6.0.\n\n#### 2.Update\nVersion: [![](https://jitpack.io/v/panxw/android-volley-manager.svg)](https://jitpack.io/#panxw/android-volley-manager) (2025-05-26)  \nUpdate Message: new version public by Jitpack.\n\n#### 3.Usage\n\nbuild.gradle\n\n```\nallprojects {\n\trepositories {\n\t    maven { url 'https://jitpack.io' }\n\t}\n...\n}\n\n```\n\napp.gradle\n```\ndependencies {\n    implementation 'com.github.panxw:android-volley-manager:1.0.3.5'\n}\n```\n\n#### 4.Sample\n##### init RequestManager in your Application: \n\n```\n//init default\nRequestManager.getInstance().init(this);\n```\n\nor\n```\n//init with SSLSocketFactory\nRequestManager.getInstance().init(this, sslSocketFactory);\n```\n\nor\n```\n//init with SSLSocketFactory \u0026 HostnameVerifier\nRequestManager.getInstance().init(this, sslSocketFactory, hostnameVerifier);\n```\n\n##### use RequestManager to load data:\n```\n\tpublic class MainActivity extends Activity implements RequestListener {\n\n\t\tprivate static final String TAG = \"VolleyTest\";\n\n\t\tprivate static final String GET_URL = \"https://panxw.github.io/about.html\";\n\n\t\tprivate static final String POST_URL = \"https://panxw.github.io/search?wd=test\";\n\n\t\tprivate static final String POST_JSON = \"{\\\"action\\\":\\\"test\\\", \\\"info\\\":\\\"hello world\\\"}\";\n\n\t\tprivate static final String OUT_FILE = \"upload.txt\";\n\n\t\tprivate static final String OUT_DATA = \"df464764sdf3ds1f3adsf789213557r12-34912-482130487321\";\n\n\t\tprivate static final String UPLOAD_URL = \"http://www.splashpadmobile.com/upload.php\";\n\n\t\tprivate LoadController mLoadController = null;\n\n\t\t@Override\n\t\tprotected void onCreate(Bundle savedInstanceState) {\n\t\t\tsuper.onCreate(savedInstanceState);\n\t\t\tsetContentView(R.layout.activity_main);\n\n\t\t\tthis.testGet();\n\t\t\tthis.testPost();\n\t\t\tthis.testFileUpload();\n\t\t}\n\n\t\tprivate void testGet() {\n\t\t\tmLoadController = RequestManager.getInstance().get(GET_URL, this, 1);\n\t\t}\n\n\t\tprivate void testPost() {\n\t\t\tmLoadController = RequestManager.getInstance().post(POST_URL, POST_JSON,\n\t\t\t\t\tthis, 0);\n\t\t}\n\n\t\tprivate void testFileUpload() {\n\t\t\tMainActivity.prepareFile(this);\n\n\t\t\tRequestMap params = new RequestMap();\n\t\t\tFile uploadFile = new File(this.getFilesDir(), OUT_FILE);\n\t\t\tparams.put(\"uploadedfile\", uploadFile);\n\t\t\tparams.put(\"share\", \"1\");\n\n\t\t\tmLoadController = RequestManager.getInstance().post(UPLOAD_URL, params,\n\t\t\t\t\tthis, 2);\n\t\t}\n\n\t\t@Override\n\t\tpublic void onSuccess(String response, Map\u003cString, String\u003e headers,\n\t\t\t\tString url, int actionId) {\n\t\t\tLog.d(TAG, \"actionId:\" + actionId + \", OnSucess!\\n\" + response);\n\t\t}\n\n\t\t@Override\n\t\tpublic void onError(int errorCode, String errorMsg, String url, int actionId) {\n\t\t\tLog.d(TAG, \"actionId:\" + actionId + \", onError: \" + errorCode+\", \"+errorMsg);\n\t\t}\n\n\t\t@Override\n\t\tpublic void onRequest() {\n\t\t\tLog.d(TAG, \"request send...\");\n\t\t}\n\n\t\t@Override\n\t\tpublic void onBackPressed() {\n\t\t\tsuper.onBackPressed();\n\t\t\tif (mLoadController != null) {\n\t\t\t\tmLoadController.cancel();\n\t\t\t}\n\t\t}\n\n\t\tprivate static void prepareFile(Context context) {\n\t\t\tFileOutputStream fos = null;\n\t\t\ttry {\n\t\t\t\tfos = context.openFileOutput(OUT_FILE, Context.MODE_PRIVATE);\n\t\t\t\ttry {\n\t\t\t\t\tfos.write(OUT_DATA.getBytes());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\tif (fos != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfos.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n```\n\n## License\n\n    Copyright (C) 2011 The Android Open Source Project\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanxw%2Fandroid-volley-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanxw%2Fandroid-volley-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanxw%2Fandroid-volley-manager/lists"}