当前位置: 首页>>代码示例>>Java>>正文


Java Log.d方法代码示例

本文整理汇总了Java中org.md2k.utilities.Report.Log.d方法的典型用法代码示例。如果您正苦于以下问题:Java Log.d方法的具体用法?Java Log.d怎么用?Java Log.d使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.md2k.utilities.Report.Log的用法示例。


在下文中一共展示了Log.d方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
public void onCreate() {
    super.onCreate();
    isStopping = false;
    Log.d(TAG, "onCreate()");
    PermissionInfo permissionInfo = new PermissionInfo();
    permissionInfo.getPermissions(this, new ResultCallback<Boolean>() {
        @Override
        public void onResult(Boolean result) {
            if (!result) {
                Toast.makeText(getApplicationContext(), "!PERMISSION DENIED !!! Could not continue...", Toast.LENGTH_SHORT).show();
                stopSelf();
            } else {
                load();
            }
        }
    });
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:18,代码来源:ServiceStreamProcessor.java

示例2: onCreate

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Log.d(TAG, "onCreate...");
    if(getActivity().getIntent().hasExtra("REMAINING_TIME")){
        remainingTime=getActivity().getIntent().getLongExtra("REMAINING_TIME",Long.MAX_VALUE);
    }else{
        remainingTime=Long.MAX_VALUE;
    }
    getPreferenceManager().getSharedPreferences().edit().clear().apply();
    privacyConfig=ConfigurationManager.getInstance(getActivity()).configuration.privacy;
    newPrivacyData=new PrivacyData();
    handler = new Handler();
    addPreferencesFromResource(R.xml.pref_privacy);
    try {
        privacyManager=PrivacyManager.getInstance(getActivity());
    } catch (IOException e) {
        e.printStackTrace();
    }
    setupButtonSaveCancel();
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKit,代码行数:22,代码来源:PrefsFragmentPrivacySettings.java

示例3: onCreateView

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    final ViewGroup rootView = (ViewGroup) inflater
            .inflate(R.layout.fragment_screen_edit_special, container, false);
    initializeUI(rootView);
    setEditTextThought(rootView);
    layoutEditTextSpecial = (RelativeLayout) rootView.findViewById(R.id.layoutEditTextSpecial);
    textViewThoughtCorrectIncorrect = (TextView) rootView.findViewById(R.id.textViewThoughtCorrectIncorrect);
    for (int i = 0; i < question.getQuestion_responses_selected().size(); i++)
        addTextToBubble(i);
    iteration = question.getQuestion_responses_selected().size();
    Log.d(TAG, "onCreateView(): iteration=" + iteration);
    updateUI();
    return rootView;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-ThoughtShakeup,代码行数:17,代码来源:FragmentEditSpecial.java

示例4: readQuestionsFromFile

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
private ArrayList<Question> readQuestionsFromFile(Context context, String filename) {
    String dir_filename = Constants.CONFIG_DIRECTORY + context.getPackageName() + File.separator + filename;

    ArrayList<Question> questions;
    Log.d(TAG, "readQuestionFromFile() filename=" + filename);
    BufferedReader br;
    try {
        br = new BufferedReader(new InputStreamReader(new FileInputStream(dir_filename)));
        Gson gson = new Gson();
        Type collectionType = new TypeToken<List<Question>>() {
        }.getType();
        questions = gson.fromJson(br, collectionType);
        return questions;
    } catch (IOException e) {
        e.printStackTrace();
    }
    return null;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-EMA,代码行数:19,代码来源:QuestionManager.java

示例5: connectDevice

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
private boolean connectDevice() {
    if (bandClient == null) return false;
    Log.d(TAG, "bandClient=" + bandClient);
    if (bandClient.getConnectionState() == ConnectionState.CONNECTED) return true;
    try {
        ConnectionState state = bandClient.connect().await();
        if (ConnectionState.CONNECTED == state) {
            versionFirmware = bandClient.getFirmwareVersion().await();
            versionHardware = bandClient.getHardwareVersion().await();
            Log.d(TAG, "versionFirmware=" + versionFirmware + " versionHardware=" + versionHardware);
            if (Integer.valueOf(versionHardware) <= 19)
                version = 1;
            else version = 2;
        }
        return ConnectionState.CONNECTED == state;
    } catch (Exception e) {
        if(bandClient.isConnected()) return true;
        Log.d(TAG, deviceId + " exception1");
        Log.d(TAG, deviceId + " ...connectDataKit");
        return false;
    }
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:23,代码来源:Device.java

示例6: register

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
public void register() {
    try {
        dataSourceClient = dataKitAPI.register(createDataSourceBuilder());
    } catch (DataKitException e) {
        Toast.makeText(context, "Unable to register data source", Toast.LENGTH_SHORT).show();
        Log.d("md2k", "here 4");
        LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(Constants.INTENT_STOP));
        e.printStackTrace();
    }

}
 
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:12,代码来源:Output.java

示例7: DataKitManager

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
DataKitManager(Context ccontext) {
        this.context = ccontext;
        dataKitAPI = DataKitAPI.getInstance(context);
        createDataSourceTypeTOChannel();
        streamProcessorWrapper = new StreamProcessorWrapper(context, new org.md2k.streamprocessor.OnReceiveListener() {
            @Override
            public void onReceived(String s, final DataType value) {
                if (s.equals(StreamConstants.ORG_MD2K_PUFFMARKER_PUFFLABEL)) {
                    String directory = Environment.getExternalStorageDirectory().getAbsolutePath() + "/puffResponses/";
                    String filename = "puffResponses.txt";
                    writeResponse(directory, filename, "yes/no ::" + value.getDateTime() + "," + System.currentTimeMillis() + "\n");

/*                    AlertDialogs.AlertDialog(context, "Puff", "Puff detected", R.drawable.ic_info_teal_48dp, "Yes", "No", null, new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            String response = "No";
                            if (which == DialogInterface.BUTTON_POSITIVE) {
                                response = "Yes";
                            }
                            String directory = Environment.getExternalStorageDirectory().getAbsolutePath() + "/puffResponces/";
                            String filename = "puffResponses.txt";
                            writeResponse(directory, filename, response + "::" + value.getDateTime() + "," + System.currentTimeMillis() + "\n");
                        }
                    });
*/
                    Log.d("puffMarker", s + " : " + value.toString());
                }
                try {
                    outputHashMap.get(s).insert(value);
                } catch (DataKitException e) {
                    LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(Constants.INTENT_STOP));
                }
                Log.d("Stream Processor", s + " : " + value.toString());
            }
        });
        active = false;
    }
 
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:38,代码来源:DataKitManager.java

示例8: getInstance

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
public static DatabaseLogger getInstance(Context context) throws IOException {
    if (instance == null) {
        Configuration configuration=ConfigurationManager.getInstance(context).configuration;
        String directory=FileManager.getDirectory(context, configuration.database.location);
        Log.d(TAG, "directory=" + directory);
        if (directory != null)
            instance = new DatabaseLogger(context, directory+ Constants.DATABASE_FILENAME);
        else throw new IOException("Database directory not found");
    }
    return instance;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKit,代码行数:12,代码来源:DatabaseLogger.java

示例9: update

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
private void update() {
    Log.d(TAG, "update()...");
    Status lastStatus;
    if (studyInfoDB == null) lastStatus = new Status(rank, Status.DATAKIT_NOT_AVAILABLE);
    else if (!studyInfoDB.equals(studyInfoFile))
        lastStatus = new Status(rank, Status.CLEAR_OLD_DATA);
    else lastStatus = new Status(rank, Status.SUCCESS);
    Log.d(TAG, "lastStatus=" + lastStatus.log());
    notifyIfRequired(lastStatus);
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:11,代码来源:StudyInfoManager.java

示例10: StudyInfoManager

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
public StudyInfoManager(ModelManager modelManager, String id, int rank) {
    super(modelManager, id, rank);
    Log.d(TAG, "constructor..id=" + id + " rank=" + rank);
    status = new Status(rank, Status.CLEAR_OLD_DATA);
    studyInfoDB = null;
    studyInfoFile = null;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:8,代码来源:StudyInfoManager.java

示例11: onCreate

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
public void onCreate() {
    super.onCreate();
    LocalBroadcastManager.getInstance(this).registerReceiver(br, new IntentFilter("SERVER_ERROR"));
    Log.d(TAG, "Connecting Cerebral Cortex");
    try {
        cerebralCortexManager = CerebralCortexManager.getInstance(ServiceCerebralCortex.this.getApplicationContext());
    } catch (IOException e) {
        e.printStackTrace();
    }
    if(ServerCP.getServerAddress(this)==null) stopSelf();
    else
        cerebralCortexManager.start();
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKit,代码行数:14,代码来源:ServiceCerebralCortex.java

示例12: update

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
public void update() {
    if (isUpdating) return;
    isUpdating = true;
    Log.w(TAG,"time="+ DateTime.convertTimeStampToDateTime(DateTime.getDateTime())+",timestamp="+ DateTime.getDateTime()+",modelManager.update()");
    Log.d(TAG, "update()...");
    Status lastStatus = status;
    while (true) {
        Status curStatus = findLatestStatus();
        Log.d(TAG, "update()...lastStatus=" + lastStatus.log() + " curStatus=" + curStatus.log() + " rankLimit=" + ModelManager.RANK_LIMIT);
        if (curStatus.getRank() == lastStatus.getRank() || curStatus.getStatus() == Status.SUCCESS || curStatus.getRank() == ModelManager.RANK_LIMIT) {
            lastStatus = curStatus;
            break;
        } else {
            if (curStatus.getRank() < lastStatus.getRank())
                setNow(curStatus.getRank());
            else if (curStatus.getRank() > lastStatus.getRank())
                clear(curStatus.getRank() - 1);

        }
        lastStatus = curStatus;
    }
    if (!status.equals(lastStatus)) {
        status = lastStatus;
        Intent intent = new Intent(Status.class.getSimpleName());
        intent.putExtra(Status.class.getSimpleName(), status);
        LocalBroadcastManager.getInstance(context).sendBroadcast(intent);
    }
    isUpdating = false;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:30,代码来源:ModelManager.java

示例13: update

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
public void update() {
    Status curStatus= new Status(rank,Status.SUCCESS);
    for (int i = 0; i < appSettingsList.size(); i++)
        if (!appSettingsList.get(i).isEqual()) {
            curStatus = new Status(rank,Status.APP_CONFIG_ERROR);
            break;
        }
    Log.d(TAG,"status = "+status.log()+" latestStatus="+curStatus.log());
    notifyIfRequired(curStatus);
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:11,代码来源:AppSettingsManager.java

示例14: insertHF

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
public Status insertHF(int ds_id, DataTypeDoubleArray[] dataTypes) {
    Status status = new Status(Status.SUCCESS);
    if (ds_id == -1 || dataTypes == null)
        return new Status(Status.INTERNAL_ERROR);
    if (listPrivacyListDsId.get(ds_id) == null) {
        status = routingManager.insertHF(ds_id, dataTypes);
        if (status.getStatusCode() == Status.INTERNAL_ERROR)
            return status;
    }
    if (ds_id == dsIdPrivacy) {
        Log.d(TAG, "privacy data...process start...");
        processPrivacyData();
    }
    return status;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKit,代码行数:16,代码来源:PrivacyManager.java

示例15: clear

import org.md2k.utilities.Report.Log; //导入方法依赖的package包/类
private void clear(int state) {
    org.md2k.utilities.Report.Log.w(TAG,"time="+ DateTime.convertTimeStampToDateTime(DateTime.getDateTime())+",timestamp="+ DateTime.getDateTime()+",modelManager.clear("+state+")");
    Log.d(TAG, "clear(" + Status.RANK_SUCCESS + "..." + state + ")...");
    for (int s = Status.RANK_SUCCESS; s <= state; s++) {
        for (HashMap.Entry<String, Model> entry : modelHashMap.entrySet())
            if (entry.getValue().getRank() == state)
                entry.getValue().clear();

    }
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:11,代码来源:ModelManager.java


注:本文中的org.md2k.utilities.Report.Log.d方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。