Skip to content

Commit

Permalink
Test wifi only
Browse files Browse the repository at this point in the history
  • Loading branch information
nlathia committed Jul 30, 2015
1 parent 826ecb0 commit fcb482e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/com/emotionsense/demo/data/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import android.view.View;
import android.widget.Toast;

import com.emotionsense.demo.data.loggers.AsyncEncryptedDatabase;
import com.emotionsense.demo.data.loggers.AsyncWiFiOnlyEncryptedDatabase;
import com.ubhave.datahandler.ESDataManager;
import com.ubhave.datahandler.except.DataHandlerException;
import com.ubhave.datahandler.loggertypes.AbstractDataLogger;
Expand Down Expand Up @@ -42,15 +42,16 @@ protected void onCreate(Bundle savedInstanceState)
try
{
// TODO: change this line of code to change the type of data logger
logger = AsyncEncryptedDatabase.getInstance();
// Note: you shouldn't have more than one logger!
// logger = AsyncEncryptedDatabase.getInstance();
logger = AsyncWiFiOnlyEncryptedDatabase.getInstance();
// logger = AsyncEncryptedFiles.getInstance();
// logger = AsyncUnencryptedDatabase.getInstance();
// logger = AsyncUnencryptedFiles.getInstance();
// logger = StoreOnlyEncryptedDatabase.getInstance();
// logger = StoreOnlyEncryptedFiles.getInstance();
// logger = StoreOnlyUnencryptedDatabase.getInstance();
// logger = StoreOnlyUnencryptedFiles.getInstance();

sensorManager = ESSensorManager.getSensorManager(this);

// Example of starting some sensing in onCreate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
import java.util.HashMap;

import android.content.Context;
import android.util.Log;

import com.emotionsense.demo.data.DemoApplication;
import com.ubhave.datahandler.config.DataStorageConfig;
import com.ubhave.datahandler.except.DataHandlerException;
import com.ubhave.datahandler.loggertypes.AbstractAsyncTransferLogger;
import com.ubhave.datahandler.loggertypes.AbstractDataLogger;
import com.ubhave.datahandler.transfer.DataTransfer;
import com.ubhave.sensormanager.ESException;

public class AsyncWiFiOnlyEncryptedDatabase extends AbstractAsyncTransferLogger
Expand Down Expand Up @@ -67,8 +69,9 @@ protected long getDataLifeMillis()
@Override
protected long getTransferAlarmLengthMillis()
{
// Note: transfer alarm will fire every 2 minutes
return 1000L * 60 * 2;
// Note: transfer alarm will fire every 10 seconds
Log.d(DataTransfer.TAG, "getTransferAlarmLengthMillis => "+(1000L * 10));
return 1000L * 10;
}

@Override
Expand Down

0 comments on commit fcb482e

Please sign in to comment.