php - Searching MySQL database using volley -


I tried to retrieve all the data from a MySQL database using a php and in doing this in my app Success was achieved. Now I tried to use an editor to pass a string on php but I am unable to do this. I was successful but without using the volley library. Is there any way to add a "keyword" after the URL using the volley, because I need the only thing to work for?

Example and Code: In the previous version, I have JSONObject json = jParser.makeHttpRequest (url_search, "GET", parameter); want to pass it as a url string: http: //myip/myproject/search.php? Keywords.

I am using this code, such as: field on edittext -> searchIntent.putExtra ("keyword", txtkeyword.getText (). ToString ());

In my search activity:

  increases the public class AllEmpresasActivity activity {// tag personalized last string TAG = AllEmpresasActivity.class.getSimpleName (); // Empresas json URL personal static final string URL = "http://192.168.1.90/android_connect/search.php?params=%1$s,num1"; Personal progression pDialog; Private listing & lt; Empresa & gt; EmpresaList = new Arasuachi & lt; Empresa & gt; (); See the list of private list views; Private customist adapter adapter; Public string search; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (R.layout.all_empresas); Intent SearchContent = Milentant (); Searchkey = searchIntent.getStringExtra ("keyword"); ListView = (ListView) findViewById (R.id.list); Adapter = new customist adapter (this, empressiologist); ListView.setAdapter (adapter); PDialog = New Progress Diablog (this); // http request pDialog.setMessage ("Loading ...") is showing progress dialog before; PDialog.show (); // Change the action bar color getActionBar (). SetBackgroundDrawable (New ColorDrawable (Color.parseColor ("# 1b1b1b")); // Volley Request created by Ozzy Jason Array Raymett Film Reich = New JasonRareWorrett (URL, New Response., Listener and Lieutenant: Jason Array (@) {@ Override Public Video on Response) {Log D. (Tag, Response. To string ();; Hide pdialog (); // parsing for json (int i = 0; i & lt; reaction. Lamp (); i ++) {try {JSONObject obj = response.getJSONObject (i); Empressa Empressa = New Empres (); Empress S.mark.ca (obj. Meet ("marka"); empresa.setThumbnailUrl (obj.getString ("imagempequena"); empresa.setMarcatotal (obj.getString ("marcatotal"); empresa.setDatainicio (obj.getString ( "Datainicio"); empr esa.setActividade (obj.getString ("actividade"); // add empresa to array empresaList.add (empresa);} hold (jsonx option e) {e.printStackTrace ();} } // Inform the list adapter about data changes so that it provides the list view with the updated data adapter. NotifyDataSetChanged ();}}, New response. Error lister () {@ Override Public Wide On Error Response (Volley IRR error) {volley log d. (Tag, "error:" + error. Short message ()); HidePDialog (); }}); // Request Request AppController.getInstance () AddToRequestQueue (movieReq); } @ Override Public Empty OnDesto () {Super. Onsteroy (); HidePDialog (); } Private Zero Hide PDDialog () {if (pDialog! = Null) {pDialog.dismiss (); PDialog = null; }}}}  

  increases the public class AllEmpresasActivity activity. Personal static final string sUrl = "http: //myip/myproject/search.php? Keyword =% 1 $ s"; ... @ Override Protected Zero to Create (InstanceStatus saved from Bundle) {... String Search = Friendly () GetStringExtra ("Keyword"); String url = String.format (sUrl, SearchKey); // Volley Request obj JsonArrayRequest movieReq = New JsonArrayRequest (URL, New Response. Lester & lt; JSONArray & gt; () {...  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -