android - phpmyadmin mysqli to sqlite sync data -
am new server based application, need have phpmyadmin mysqli server need sync sqlite can access offline mode also, need easiest method, in advance. haven't tried method because new sqlite , doesn't know how syncing takes place please me
here volley fetching mysqli phpmyadmin server
stringrequest stringrequest = new stringrequest(request.method.post,location, new response.listener<string>() { @override public void onresponse(string response) { try { arraylist<string> arrlist = new arraylist<string>(); jsonarray jsonarray = new jsonarray(response); jsonobject json = null; (int = 0; < jsonarray.length(); i++) { json = jsonarray.getjsonobject(i); final string strvalue = json.getstring("location_name"); arrlist.add(strvalue); adapter1 = new arrayadapter<string>( getbasecontext(), r.layout.drop_list_item, arrlist); autoservice.setadapter(adapter1); } } catch (jsonexception e) { e.printstacktrace(); toast.maketext(getbasecontext(), "json error: " + e.getmessage(), toast.length_long).show(); } } }, new response.errorlistener() { @override public void onerrorresponse(volleyerror error) { } }) { @override protected map<string, string> getparams() { map<string, string> params = new hashmap<string, string>(); params.put("location_name", autoservice.gettext().tostring()); return params; } }; requestqueue requestqueue = volley.newrequestqueue(getbasecontext()); requestqueue.add(stringrequest); }
i need create database , sync volley values app can work fine in offline
Comments
Post a Comment