Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.damagedapps.dcedge.services;
- import android.app.Service;
- import android.content.ComponentName;
- import android.content.Intent;
- import android.content.ServiceConnection;
- import android.os.*;
- import android.os.Process;
- import android.util.Log;
- import android.widget.Toast;
- import com.damagedapps.dcedge.IDownloadService;
- import com.damagedapps.dcedge.custom.DownloadDetails;
- /**
- * Created by IntelliJ IDEA.
- * User: AdamGessel
- * Date: Oct 20, 2010
- * Time: 2:57:04 PM
- */
- public class DownloadService extends Service {
- private final String TAG = "DCEdgeService";
- @Override
- public IBinder onBind(Intent arg0) {
- return mBinder;
- }
- private final IDownloadService.Stub mBinder = new IDownloadService.Stub() {
- public void Download(DownloadDetails ui) throws RemoteException {
- Toast.makeText(DownloadService.this,"Testing!!!", Toast.LENGTH_LONG).show();
- }
- };
- @Override
- public void onCreate() {
- super.onCreate();
- Log.v(TAG, "onCreate() called");
- }
- private boolean downloadFile(DownloadDetails dd) {
- Toast.makeText(DownloadService.this,"Download started...", Toast.LENGTH_LONG).show();
- return true;
- }
- @Override
- public void onDestroy() {
- super.onDestroy();
- Log.v(TAG, "onDestroy() called");
- }
- @Override
- public void onStart(Intent intent, int startId) {
- super.onStart(intent, startId);
- Log.v(TAG, "onStart() called");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement