My question is how can I send certain parameters that have to go back to the server if the event is done on
val store_id = 5463 val option = playsong val play_now = true val song_id = 163309
These are data that I have to return if the event is done on click and I have to do it by POST and JSON method. It should be noted that the data I receive comes from the same server and I visualize it in a recyclerview
@SuppressLint("Registered")
class VolleySingleton : Application(){
override fun onCreate() {
super.onCreate()
instance = this
}
val requestQueue: RequestQueue? = null
get() {
if (field == null){
return Volley.newRequestQueue(applicationContext)
}
return field
}
fun <T> addToRequestQueue(request: Request<T>) {
request.tag = TAG
requestQueue?.add(request)
}
companion object {
private val TAG = VolleySingleton::class.java.simpleName
var instance: VolleySingleton? = null
}
}
this is what I have been without success