Back to project page Metascan-Online.
The source code is released under:
Apache License
If you think the Android project Metascan-Online 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.opswat.metascan; // w ww. j a v a2 s . c om import android.app.Service; import android.content.Intent; import android.os.IBinder; public class ObserverService extends Service{ //private static final String TAG = "MainActivity.java"; RecursiveFileObserver ob; @Override public void onCreate(){ ob = new RecursiveFileObserver("/storage/emulated/0"); } @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub return null; } @Override public int onStartCommand(Intent intent, int flags, int startid){ ob.startWatching(); return START_NOT_STICKY; } @Override public void onDestroy(){ ob.stopWatching(); stopSelf(); } }