Back to project page spotastop.
The source code is released under:
MIT License
If you think the Android project spotastop listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.cipciop.spotastop.services; // www. j a va2 s .c o m import java.util.ArrayList; import requests.Criteria; import resources.Resource; import rest.RestApi; import android.app.Service; import android.content.Intent; import android.os.IBinder; import com.cipciop.spotastop.StopSpotApp; public class RetrieveLinesListService extends Service { @Override public IBinder onBind(Intent arg0) { return null; } public int onStartCommand(Intent intent, int flags, int startid) { new Thread(new Runnable() { public void run() { Criteria c=new Criteria(); c.addConstraint("resClass", "cipciop\\spotastop\\Line"); ArrayList<Resource> lines=RestApi.queryResources(c); System.out.println(lines.size()); StopSpotApp.getInstance().updateLinesList(lines); } }).start(); return 0; } }