Not sure where I make a mistake. Code: public class VaccinationTotalUSA extends Fragment { RecyclerView rvRecentRecord; ProgressBar progressBar; private static final String TAG = VaccinationTotalUSA.class.getSimpleName(); ArrayList<VaccinationTimeline> recentRecords; @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_vaccination, container, false); // call view rvRecentRecord = view.findViewById(R.id.vaccinationRecord); progressBar = ..
Category : android-volley
I am trying to get json data from my php server but whenever i try im getting "org.json.JSONException: End of input at character 0 of" also im using fragment for bottom menu private void getData() { // Initialize a new RequestQueue instance RequestQueue queue = Volley.newRequestQueue(this); JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, dataurl+name, null, new Response.Listener<JSONObject>() ..
I have updated volley to 1.2.0. I got confused between the request listener and deliverResponse. If i get the response in StringRequest stringRequest = new StringRequest(apiUrl, response -> {} then why would i need an override method like @Override protected void deliverResponse(String response) { super.deliverResponse(response);} <br/> Can someone simplify these please. Thanks. Source: Android..

I’m trying to create a recyclerview with a viewpager per element. Each element has its own photos that I fetch from the server with a JSON Array. I want it to look like this: Source: Android..
I have develop an app that communicates with my web server via the Volley library. Communication occurs by exchanging strings in POST. My server uses HTTPS, so I think the data being exchanged is safe. But I think it is better to encrypt the data. I searched, also here on stackoverflow, how to encrypt data ..
This is the class I’m using: https://gist.github.com/ycui1/5d25672430e6c014a9ef6b422f82652e this is the code: val request = object: VolleyFileUploadRequest(Method.POST, url, Response.Listener { val response = JSONObject(it) // finishSend(response, comment) }, Response.ErrorListener { commentNotSent() } ) { override fun getByteData(): MutableMap<String, FileDataPart> { val params = HashMap<String, FileDataPart>() params["file"] = FileDataPart("file$rnds", getBytes(finalInputSteam!!)!!,"fffff") return params } override fun getParams(): MutableMap<String, ..
I am trying to access data sent from stringRequest here: public class ProductDetailActivity extends AppCompatActivity { String cart_url = "http://192.168.1.15/AndroidAppDatabaseConnection/add_to_cart.php"; String favorites_url = "http://192.168.1.15/AndroidAppDatabaseConnection/add_to_favorites.php"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_product_detail); Intent intent = getIntent(); String imageUrl = intent.getStringExtra(EXTRA_URL); String email = intent.getStringExtra("user"); final int product_id = intent.getIntExtra(EXTRA_ID, 0); String name = intent.getStringExtra(EXTRA_NAME); Double ..
URL: https://api.alquran.cloud/v1/quran/quran-uthmani I want to receive the data at this address, but I cannot get data from the list named "surah" in the data. Can you help me? How to solve this problem? I can show the "data" list but I don’t know how to get the "surah" arry in it. My java code: String ..
i’m new to android development. on my one of the first tries, i’m trying to send request to php server using volley plugin. android studio doesn’t show ant error while debugging. but when i run the application, it stops on calling the function. here is my tryout. please guide me where i made mistake. private ..
<?php $host = "localhost"; $user = "******"; $pass = "******"; $dbname = "******"; $conn = mysqli_connect($host, $user, $pass,$dbname); if(!$conn){ die(‘Could not connect: ‘.mysqli_connect_error()); } else{ $a=$_POST[‘a’]; $b=$_POST[‘b’]; $target_dir="upoads"; $image=$a; if(!file_exists($target_dir)){ mkdir($target_dir,0777,true); } $one=rand()."_".time().".jpeg"; ‘$target_dir1=$target_dir."/".$one; if(file_put_contents($target_dir1,base64_decode($image))){ // echo ‘{The file has been Uploaded.}’; }’ here is how i insert my file $target_di="http://myserver.online/nostics/$target_dir1"; $sql="UPDATE rmreg SET photo ..
Recent Comments