Android Open Source - ServicesTutorial Stock Quote Service






From Project

Back to project page ServicesTutorial.

License

The source code is released under:

Apache License

If you think the Android project ServicesTutorial listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.yanlu.android.services.app.service;
/*from w ww .  j a v  a2 s. c  o  m*/
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

public class StockQuoteService extends Service {
    private static final String TAG = "StockQuoteService";

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }


//    public class StockQuoteServiceImpl extends IStockQuoteService {
//    @Override
//    public double getQuote(String ticker) throws RemoteException {
//    Log.v(TAG, "getQuote() called for " + ticker);
//                return 20.0;
//            }
//    }
//    public StockQuoteService() {
//    }
//
//    @Override
//    public void onCreate() {
//    super.onCreate();
//    Log.v(TAG, "onCreate() called"); }
//    @Override
//    public void onDestroy() {
//    super.onDestroy();
//    Log.v(TAG, "onDestroy() called"); }
//    @Override
//    public IBinder onBind(Intent intent) {
//    Log.v(TAG, "onBind() called");
//    return new StockQuoteServiceImpl(); }
}




Java Source Code List

com.yanlu.android.services.app.MainActivity.java
com.yanlu.android.services.app.service.BackgroundService.java
com.yanlu.android.services.app.service.HandlerService.java
com.yanlu.android.services.app.service.MyIntentService.java
com.yanlu.android.services.app.service.StockQuoteService.java
com.yanlu.android.services.app.utils.DeferWorkHandler.java
com.yanlu.android.services.app.utils.ThreadUtils.java