public class DownloadManager {

    /**
     * ダウンロード完了リスナー
     *
     */
    public interface OnFinishedListener {
        /**
         *
         * @param result
         */
        public void onFinished(int result);
    }


    /**
     * @param url
     * @param file
     */
    public void DownloadStart(  final OnFinishedListener listener) {
        Log2.i("start:"+url);

	if(listener != null) {
	    listener.onFinished(result);
	}
    }
}

// 使う時
DownloadManager manager = new DownloadManager();
manager.DownloadStart( 
            new DownloadManager.OnFinishedListener() {
                @Override
                public void onFinished(int result) {
			Log2.i("finish");
                }
            });
}

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

© 2024 Falco Tech Blog Suffusion theme by Sayontan Sinha