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


Java Logger.logD方法代码示例

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


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

示例1: callSendMorePointsGeocacheFileMethod

import locus.api.utils.Logger; //导入方法依赖的package包/类
/**
 * Send more geocaches with method, that store byte[] data in raw file and send locus link to this file.
 * This method is useful in case of bigger number of caches that already has some troubles with
 * method over intent.
 * @param ctx current context
 */
public static void callSendMorePointsGeocacheFileMethod(Context ctx) throws RequiredVersionMissingException {
	// get filepath
	File externalDir = ctx.getExternalCacheDir();
	if (externalDir == null || !(externalDir.exists())) {
		Logger.logW(TAG, "problem with obtain of External dir");
		return;
	}

	// prepare data
	PackWaypoints pw = new PackWaypoints("test07");
	for (int i = 0; i < 1000; i++) {
		pw.addWaypoint(generateGeocache(i));
	}
	ArrayList<PackWaypoints> data = new ArrayList<>();
	data.add(pw);

	// send data
	boolean send = ActionDisplayPoints.sendPacksFile(ctx, data,
			new File(externalDir, "testFile.locus").getAbsolutePath(), ExtraAction.CENTER);
	Logger.logD(TAG, "callSendMorePointsGeocacheFileMethod(), " +
			"send:" + send);
}
 
开发者ID:asamm,项目名称:locus-api,代码行数:29,代码来源:SampleCalls.java

示例2: callSendOnePoint

import locus.api.utils.Logger; //导入方法依赖的package包/类
/**
 * Send single point into Locus application.
 * @param ctx current context
 * @throws RequiredVersionMissingException exception in case of missing required app version
 */
public static void callSendOnePoint(Context ctx) throws RequiredVersionMissingException {
	// generate pack
	PackWaypoints pw = new PackWaypoints("callSendOnePoint");
	pw.addWaypoint(generateWaypoint(0));

	// send data
	boolean send = ActionDisplayPoints.sendPack(ctx, pw, ExtraAction.IMPORT);
	Logger.logD(TAG, "callSendOnePoint(), " +
			"send:" + send);
}
 
开发者ID:asamm,项目名称:locus-api,代码行数:16,代码来源:SampleCalls.java

示例3: disablePeriodicUpdatesReceiver

import locus.api.utils.Logger; //导入方法依赖的package包/类
/**
   * Disable updates receiver for PeriodicUpdates. Use this function in case, you have defined received
* in manifest file and you want to enable/disable received dynamically at runtime.
   * @param ctx current context
   * @param lv Locus version to work with
   * @param receiver class that will be registered as receiver
   */
  public static void disablePeriodicUpdatesReceiver(Context ctx, LocusVersion lv,
          Class<? extends BroadcastReceiver> receiver) throws RequiredVersionMissingException {
      Logger.logD(TAG, "disableReceiver(" + ctx + ")");
      PackageManager pm = ctx.getPackageManager();
      pm.setComponentEnabledSetting(
              new ComponentName(ctx, receiver),
              PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
              PackageManager.DONT_KILL_APP);

      // notify about change
      refreshPeriodicUpdateListeners(ctx, lv);
  }
 
开发者ID:asamm,项目名称:locus-api,代码行数:20,代码来源:ActionTools.java

示例4: setFinder

import locus.api.utils.Logger; //导入方法依赖的package包/类
/**
    * Set name of the finder.
    * @param finder name of finder
    */
public void setFinder(String finder) {
	if (finder == null) {
		Logger.logD(TAG, "setFinder(), empty parameter");
		finder = "";
	}
	this.mFinder = finder;
}
 
开发者ID:asamm,项目名称:locus-api,代码行数:12,代码来源:GeocachingLog.java

示例5: onObjectClick

import locus.api.utils.Logger; //导入方法依赖的package包/类
@Override
public void onObjectClick(final ControlObjectClickEvent event) {
    Logger.logD(TAG, "onObjectClick() " + event.getClickType());
    int layoutRef = event.getLayoutReference();
    if (layoutRef != -1) {
        if (mLastSetLayout == R.layout.screen_empty_with_button) {
            mCvStartScreen.onClick(layoutRef);
        } else if (mLastSetLayout == R.layout.screen_guidance) {
    		mCvGuiding.onClick(layoutRef);
    	} else if (mLastSetLayout == R.layout.screen_track_record_running) {
    		mCvTrackRecRunning.onClick(layoutRef);
    	}
    }
}
 
开发者ID:asamm,项目名称:locus-addon-smartwatch2,代码行数:15,代码来源:ControlSmartWatch2.java

示例6: setName

import locus.api.utils.Logger; //导入方法依赖的package包/类
public void setName(String name) {
	if (name == null) {
		Logger.logD(TAG, "setName(), empty parameter");
		name = "";
	}
	this.mName = name;
}
 
开发者ID:asamm,项目名称:locus-api,代码行数:8,代码来源:GeocachingWaypoint.java

示例7: setName

import locus.api.utils.Logger; //导入方法依赖的package包/类
/**
 * Define name for this image.
 * @param name name of image
 */
public void setName(String name) {
	if (name == null) {
		Logger.logD(TAG, "setName(), empty parameter");
		name = "";
	}
	this.mName = name;
}
 
开发者ID:asamm,项目名称:locus-api,代码行数:12,代码来源:GeocachingImage.java

示例8: callSendOneTrack

import locus.api.utils.Logger; //导入方法依赖的package包/类
/**
 * Send (display) single track on Locus map.
 * @param ctx current context
 * @throws RequiredVersionMissingException exception in case of missing required app version
 */
public static void callSendOneTrack(Context ctx) throws RequiredVersionMissingException {
	// prepare data
	Track track = generateTrack(50, 15);

	// send data
	boolean send = ActionDisplayTracks.sendTrack(ctx, track, ExtraAction.CENTER);
	Logger.logD(TAG, "callSendOneTrack(), " +
			"send:" + send);
}
 
开发者ID:asamm,项目名称:locus-api,代码行数:15,代码来源:SampleCalls.java

示例9: onListItemClick

import locus.api.utils.Logger; //导入方法依赖的package包/类
@Override
public void onListItemClick(final ControlListItem listItem, final int clickType,
        final int itemLayoutReference) {
    Logger.logD(TAG, "Item clicked. Position " + listItem.listItemPosition
            + ", itemLayoutReference " + itemLayoutReference + ". Type was: "
            + (clickType == Control.Intents.CLICK_TYPE_SHORT ? "SHORT" : "LONG"));

    // handle click event
    if (clickType == Control.Intents.CLICK_TYPE_SHORT) {
        int selectedIndex = listItem.listItemPosition;
        trackRecordStart(mTrackRecProfiles.get(selectedIndex).getName());
        vibrateOnTouch();
    }
}
 
开发者ID:asamm,项目名称:locus-addon-smartwatch2,代码行数:15,代码来源:ControlSmartWatch2.java

示例10: setSrcDetails

import locus.api.utils.Logger; //导入方法依赖的package包/类
public void setSrcDetails(String srcDetails) {
	if (srcDetails == null) {
		Logger.logD(TAG, "setSrcDetails(), empty parameter");
		srcDetails = "";
	}
	this.mSrcDetails = srcDetails;
}
 
开发者ID:asamm,项目名称:locus-api,代码行数:8,代码来源:GeocachingTrackable.java

示例11: setTypeImagePath

import locus.api.utils.Logger; //导入方法依赖的package包/类
public void setTypeImagePath(String typeImagePath) {
	if (typeImagePath == null) {
		Logger.logD(TAG, "setTypeImagePath(), empty parameter");
		typeImagePath = "";
	}
	this.mTypeImagePath = typeImagePath;
}
 
开发者ID:asamm,项目名称:locus-api,代码行数:8,代码来源:GeocachingWaypoint.java

示例12: showCircles

import locus.api.utils.Logger; //导入方法依赖的package包/类
public static void showCircles(FragmentActivity activity) throws Exception {
	ArrayList<Circle> circles = new ArrayList<Circle>();

	Circle c0 = new Circle(new Location("c1", 50.15, 15), 10000000, true);
	c0.styleNormal = new GeoDataStyle();

	c0.styleNormal.setPolyStyle(Color.argb(50, Color.red(Color.RED),
			Color.green(Color.RED), Color.blue(Color.RED)));
	circles.add(c0);

	Circle c1 = new Circle(new Location("c1", 50, 15), 1000);
	c1.styleNormal = new GeoDataStyle();
	c1.styleNormal.setLineStyle(Color.BLUE, 2);
	circles.add(c1);

	Circle c2 = new Circle(new Location("c2", 50.1, 15), 1500);
	c2.styleNormal = new GeoDataStyle();
	c2.styleNormal.setLineStyle(Color.RED, 3);
	circles.add(c2);

	Circle c3 = new Circle(new Location("c1", 50.2, 15), 2000);
	c3.styleNormal = new GeoDataStyle();
	c3.styleNormal.setLineStyle(Color.GREEN, 4);
	c3.styleNormal.setPolyStyle(Color.LTGRAY);
	circles.add(c3);

	Circle c4 = new Circle(new Location("c1", 50.3, 15), 1500);
	c4.styleNormal = new GeoDataStyle();
	c4.styleNormal.setLineStyle(Color.MAGENTA, 0);
	c4.styleNormal.setPolyStyle(
			Color.argb(100, Color.red(Color.MAGENTA),
					Color.green(Color.MAGENTA), Color.blue(Color.MAGENTA)));
	circles.add(c4);

	// send data
	boolean send = ActionDisplayVarious.sendCirclesSilent(activity, circles, true);
	Logger.logD(TAG, "showCircles(), " +
			"send:" + send);
}
 
开发者ID:asamm,项目名称:locus-api,代码行数:40,代码来源:SampleCalls.java

示例13: DeviceCommService

import locus.api.utils.Logger; //导入方法依赖的package包/类
/**
 * Default constructor.
 *
 * @param ctx current context
 */
private DeviceCommService(Context ctx) {
	super(ctx);
	Logger.logD(TAG, "Device comm service started.");
	try {
		lv = LocusUtils.getActiveVersion(ctx);
		onUpdate(ActionTools.getDataUpdateContainer(ctx, lv));
	} catch (RequiredVersionMissingException e) {
		mLastUpdate = null;
	}
}
 
开发者ID:asamm,项目名称:locus-addon-wearables,代码行数:16,代码来源:DeviceCommService.java

示例14: ControlSmartWatch2

import locus.api.utils.Logger; //导入方法依赖的package包/类
/**
 * Create sample control.
 *
 * @param hostAppPackageName Package name of host application.
 * @param context The context.
 * @param handler The handler to use
 */
public ControlSmartWatch2(String hostAppPackageName, Context context, Handler handler) {
    super(context, hostAppPackageName);
    Logger.logD(TAG, "ControlSmartWatch2(" + hostAppPackageName + ", " + context + ", " + handler + ")");
    this.mContext = context;
    this.mInflater = (LayoutInflater) mContext.getSystemService
            (Context.LAYOUT_INFLATER_SERVICE);
    this.mPrefs = PreferenceManager.getDefaultSharedPreferences(mContext);
    this.mRunning = true;
    if (handler == null) {
        throw new IllegalArgumentException("handler == null");
    }
    
    // basic initialization
    mCvStartScreen = createControlStartScreen();
    mCvGuiding = createControlGuiding();
    mCvTrackRecRunning = createControlTrackRecordRunning();
    initializeMenus();
    
    // prepare views for generating
    int screenModeValue = mPrefs.getInt(
            KEY_I_LAST_SCREEN_MODE, ScreenMode.GUIDING.ordinal());
    mScreenMode = ScreenMode.values()[screenModeValue];
    int screenGuidingModeValue = mPrefs.getInt(
            KEY_I_LAST_SCREEN_GUIDANCE_MODE, ScreenGuidingImageMode.MAP.ordinal());
    mGuidingMode = ScreenGuidingImageMode.values()[screenGuidingModeValue];
    
    // prepare UI
    Resources res = mContext.getResources();
    mImageWidth = (int) res.getDimension(R.dimen.view_image_width);
    mImageHeight = (int) res.getDimension(R.dimen.view_image_height);
    mCompassGenerator = new CompassGenerator(
    		mImageWidth, mImageHeight);

    // perform check and start automatic checker
    performLocusCheck();

    // class for periodic checks.
    Runnable mChecker = new Runnable() {

        @Override
        public void run() {
            try {
                // repeat actions till system is running
                while (mRunning) {
                    Thread.sleep(mLocusVersion == null ? 1000 : 5000);

                    // perform update
                    performLocusCheck();
                }
            } catch (Exception e) {
                Logger.logE(TAG, "mChecker, run()", e);
            }
        }
    };
    new Thread(mChecker).start();
}
 
开发者ID:asamm,项目名称:locus-addon-smartwatch2,代码行数:64,代码来源:ControlSmartWatch2.java

示例15: onIncorrectData

import locus.api.utils.Logger; //导入方法依赖的package包/类
/**
 * Notify about incorrect data.
 */
void onIncorrectData() {
	Logger.logD(TAG, "onIncorrectData()");
	mLastUpdate = null;
}
 
开发者ID:asamm,项目名称:locus-addon-wearables,代码行数:8,代码来源:DeviceCommService.java


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