本文整理匯總了Java中com.google.android.gms.location.DetectedActivity.ON_FOOT屬性的典型用法代碼示例。如果您正苦於以下問題:Java DetectedActivity.ON_FOOT屬性的具體用法?Java DetectedActivity.ON_FOOT怎麽用?Java DetectedActivity.ON_FOOT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.google.android.gms.location.DetectedActivity
的用法示例。
在下文中一共展示了DetectedActivity.ON_FOOT屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getNameFromType
private String getNameFromType(int activityType) {
switch (activityType) {
case DetectedActivity.RUNNING:
return "running";
case DetectedActivity.IN_VEHICLE:
return "in_vehicle";
case DetectedActivity.ON_BICYCLE:
return "on_bicycle";
case DetectedActivity.ON_FOOT:
return "on_foot";
case DetectedActivity.STILL:
return "still";
case DetectedActivity.UNKNOWN:
return "unknown";
case DetectedActivity.TILTING:
return "tilting";
}
return "unknown";
}
示例2: getActivityString
public static String getActivityString(int detectedActivityType) {
switch(detectedActivityType) {
case DetectedActivity.IN_VEHICLE:
return "IN_VEHICLE";
case DetectedActivity.ON_BICYCLE:
return "ON_BICYCLE";
case DetectedActivity.ON_FOOT:
return "ON_FOOT";
case DetectedActivity.RUNNING:
return "RUNNING";
case DetectedActivity.STILL:
return "STILL";
case DetectedActivity.TILTING:
return "TILTING";
case DetectedActivity.UNKNOWN:
return "UNKNOWN";
case DetectedActivity.WALKING:
return "WALKING";
default:
return "Unknown";
}
}
開發者ID:QuintechDevOps,項目名稱:cordova-plugin-quintech-background-geolocation,代碼行數:22,代碼來源:ActivityRecognitionLocationProvider.java
示例3: getActivityString
/**
* Returns a human readable String corresponding to a detected activity type.
*/
public static String getActivityString(Context context, int detectedActivityType) {
Resources resources = context.getResources();
switch(detectedActivityType) {
case DetectedActivity.IN_VEHICLE:
return resources.getString(R.string.in_vehicle);
case DetectedActivity.ON_BICYCLE:
return resources.getString(R.string.on_bicycle);
case DetectedActivity.ON_FOOT:
return resources.getString(R.string.on_foot);
case DetectedActivity.RUNNING:
return resources.getString(R.string.running);
case DetectedActivity.STILL:
return resources.getString(R.string.still);
case DetectedActivity.TILTING:
return resources.getString(R.string.tilting);
case DetectedActivity.UNKNOWN:
return resources.getString(R.string.unknown);
case DetectedActivity.WALKING:
return resources.getString(R.string.walking);
default:
return resources.getString(R.string.unidentifiable_activity, detectedActivityType);
}
}
示例4: getNameFromType
/**
* Map detected activity types to strings
*@param activityType The detected activity type
*@return A user-readable name for the type
*/
private String getNameFromType(int activityType) {
switch(activityType) {
case DetectedActivity.IN_VEHICLE:
return "in_vehicle";
case DetectedActivity.ON_BICYCLE:
return "on_bicycle";
case DetectedActivity.ON_FOOT:
return "on_foot";
case DetectedActivity.STILL:
return "still";
case DetectedActivity.UNKNOWN:
return "unknown";
case DetectedActivity.TILTING:
return "tilting";
}
return "unknown";
}
示例5: getActivityString
public static String getActivityString(int detectedActivityType) {
switch(detectedActivityType) {
case DetectedActivity.IN_VEHICLE:
return "IN_VEHICLE";
case DetectedActivity.ON_BICYCLE:
return "ON_BICYCLE";
case DetectedActivity.ON_FOOT:
return "ON_FOOT";
case DetectedActivity.RUNNING:
return "RUNNING";
case DetectedActivity.STILL:
return "STILL";
case DetectedActivity.TILTING:
return "TILTING";
case DetectedActivity.UNKNOWN:
return "UNKNOWN";
case DetectedActivity.WALKING:
return "WALKING";
default:
return "UNIDENTIFIABLE";
}
}
示例6: getActivityString
/**
* Returns a human readable String corresponding to a detected activity type.
*/
static String getActivityString(Context context, int detectedActivityType) {
Resources resources = context.getResources();
switch(detectedActivityType) {
case DetectedActivity.IN_VEHICLE:
return resources.getString(R.string.in_vehicle);
case DetectedActivity.ON_BICYCLE:
return resources.getString(R.string.on_bicycle);
case DetectedActivity.ON_FOOT:
return resources.getString(R.string.on_foot);
case DetectedActivity.RUNNING:
return resources.getString(R.string.running);
case DetectedActivity.STILL:
return resources.getString(R.string.still);
case DetectedActivity.TILTING:
return resources.getString(R.string.tilting);
case DetectedActivity.UNKNOWN:
return resources.getString(R.string.unknown);
case DetectedActivity.WALKING:
return resources.getString(R.string.walking);
default:
return resources.getString(R.string.unidentifiable_activity, detectedActivityType);
}
}
示例7: getActivityString
/**
* Returns a human readable String corresponding to a detected activity type.
*/
public static String getActivityString(int detectedActivityType) {
switch (detectedActivityType) {
case DetectedActivity.IN_VEHICLE:
return "In a Vehicle";
case DetectedActivity.ON_BICYCLE:
return "On a bicycle";
case DetectedActivity.ON_FOOT:
return "On Foot";
case DetectedActivity.RUNNING:
return "Running";
case DetectedActivity.STILL:
return "Still (not moving)";
case DetectedActivity.TILTING:
return "Tilting";
case DetectedActivity.UNKNOWN:
return "Unknown Activity";
case DetectedActivity.WALKING:
return "Walking";
default:
return "Unknown Type";
}
}
示例8: getActivityPic
/**
* Returns a human readable String corresponding to a detected activity type.
*/
public static int getActivityPic(int detectedActivityType) {
switch (detectedActivityType) {
case DetectedActivity.IN_VEHICLE:
return R.drawable.car;
case DetectedActivity.ON_BICYCLE:
return R.drawable.bike;
case DetectedActivity.ON_FOOT:
return R.drawable.walk;
case DetectedActivity.RUNNING:
return R.drawable.run;
case DetectedActivity.STILL:
return R.drawable.still;
case DetectedActivity.TILTING:
return R.drawable.tilt;
case DetectedActivity.UNKNOWN:
return R.drawable.unknown;
case DetectedActivity.WALKING:
return R.drawable.walk;
default:
return R.drawable.unknown;
}
}
示例9: getActivityString
public static String getActivityString(Context context, int detectedActivityType) {
Resources resources = context.getResources();
switch (detectedActivityType) {
case DetectedActivity.IN_VEHICLE:
return resources.getString(R.string.in_vehicle);
case DetectedActivity.ON_BICYCLE:
return resources.getString(R.string.on_bicycle);
case DetectedActivity.ON_FOOT:
return resources.getString(R.string.on_foot);
case DetectedActivity.RUNNING:
return resources.getString(R.string.running);
case DetectedActivity.STILL:
return resources.getString(R.string.still);
case DetectedActivity.TILTING:
return resources.getString(R.string.tilting);
case DetectedActivity.UNKNOWN:
return resources.getString(R.string.unknown);
case DetectedActivity.WALKING:
return resources.getString(R.string.walking);
default:
return resources.getString(R.string.unidentifiable_activity, detectedActivityType);
}
}
示例10: getActivityName
public static String getActivityName(int activityType, Context context) {
switch (activityType) {
case DetectedActivity.STILL:
return context.getString(R.string.still);
case DetectedActivity.TILTING:
return context.getString(R.string.tilting);
case DetectedActivity.ON_FOOT:
return context.getString(R.string.on_foot);
case DetectedActivity.WALKING:
return context.getString(R.string.walking);
case DetectedActivity.RUNNING:
return context.getString(R.string.running);
case DetectedActivity.ON_BICYCLE:
return context.getString(R.string.on_bicycle);
case DetectedActivity.IN_VEHICLE:
return context.getString(R.string.in_vehicle);
case DetectedActivity.UNKNOWN:
return context.getString(R.string.unknown);
case -1:
return context.getString(R.string.motion);
case -2:
return context.getString(R.string.displacement);
default:
return context.getString(R.string.undefined);
}
}
示例11: getActivityString
public static String getActivityString(int detectedActivityType) {
switch(detectedActivityType) {
case DetectedActivity.IN_VEHICLE:
return "IN_VEHICLE";
case DetectedActivity.ON_BICYCLE:
return "ON_BICYCLE";
case DetectedActivity.ON_FOOT:
return "ON_FOOT";
case DetectedActivity.RUNNING:
return "RUNNING";
case DetectedActivity.STILL:
return "STILL";
case DetectedActivity.TILTING:
return "TILTING";
case DetectedActivity.UNKNOWN:
return "UNKNOWN";
case DetectedActivity.WALKING:
return "WALKING";
default:
return "Unknown";
}
}
示例12: getActivityString
public static String getActivityString(int detectedActivityType) {
switch(detectedActivityType) {
case DetectedActivity.IN_VEHICLE:
return "IN_VEHICLE";
case DetectedActivity.ON_BICYCLE:
return "ON_BICYCLE";
case DetectedActivity.ON_FOOT:
return "ON_FOOT";
case DetectedActivity.RUNNING:
return "RUNNING";
case DetectedActivity.STILL:
return "STILL";
case DetectedActivity.TILTING:
return "TILTING";
case DetectedActivity.UNKNOWN:
return "UNKNOWN";
case DetectedActivity.WALKING:
return "WALKING";
default:
return "UNDEFINED";
}
}
示例13: getActivityType
private int getActivityType(int type) {
switch (type) {
case DetectedActivity.STILL:
return ResultType.ActivityType.STILL;
case DetectedActivity.ON_FOOT:
return ResultType.ActivityType.ON_FOOT;
case DetectedActivity.TILTING:
return ResultType.ActivityType.TILTING;
case DetectedActivity.WALKING:
return ResultType.ActivityType.WALKING;
case DetectedActivity.RUNNING:
return ResultType.ActivityType.RUNNING;
case DetectedActivity.ON_BICYCLE:
return ResultType.ActivityType.ON_BICYCLE;
case DetectedActivity.IN_VEHICLE:
return ResultType.ActivityType.IN_VEHICLE;
default:
return ResultType.ActivityType.UNKNOWN;
}
}
示例14: getNameFromType
private String getNameFromType(int activityType) {
switch (activityType) {
case DetectedActivity.IN_VEHICLE:
return "in_vehicle";
case DetectedActivity.ON_BICYCLE:
return "on_bicycle";
case DetectedActivity.RUNNING:
return "running";
case DetectedActivity.WALKING:
return "walking";
case DetectedActivity.ON_FOOT:
return "on_foot";
case DetectedActivity.STILL:
return "still";
case DetectedActivity.TILTING:
return "tilting";
case DetectedActivity.UNKNOWN:
return "unknown";
}
return "unknown";
}
示例15: getActivityString
/**
* Returns a human readable String corresponding to a detected activity type.
*/
public static String getActivityString(Context context, int detectedActivityType) {
Resources resources = context.getResources();
switch (detectedActivityType) {
case DetectedActivity.IN_VEHICLE:
return resources.getString(R.string.in_vehicle);
case DetectedActivity.ON_BICYCLE:
return resources.getString(R.string.on_bicycle);
case DetectedActivity.ON_FOOT:
return resources.getString(R.string.on_foot);
case DetectedActivity.RUNNING:
return resources.getString(R.string.running);
case DetectedActivity.STILL:
return resources.getString(R.string.still);
case DetectedActivity.TILTING:
return resources.getString(R.string.tilting);
case DetectedActivity.UNKNOWN:
return resources.getString(R.string.unknown);
case DetectedActivity.WALKING:
return resources.getString(R.string.walking);
default:
return resources.getString(R.string.unidentifiable_activity, detectedActivityType);
}
}