當前位置: 首頁>>代碼示例>>Java>>正文


Java DetectedActivity.ON_FOOT屬性代碼示例

本文整理匯總了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";
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:DetectedActivityToString.java

示例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);
    }
}
 
開發者ID:maddygy,項目名稱:Activity-Recognition-Tools,代碼行數:26,代碼來源:Constants.java

示例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";
}
 
開發者ID:RobertTrebor,項目名稱:CycleFrankfurtAndroid,代碼行數:22,代碼來源:ActivityRecognitionIntentService.java

示例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";
    }
}
 
開發者ID:Aminoid,項目名稱:react-native-activity-recognition,代碼行數:22,代碼來源:DetectionService.java

示例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);
    }
}
 
開發者ID:JimSeker,項目名稱:googleplayAPI,代碼行數:26,代碼來源:Utils.java

示例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";
    }
}
 
開發者ID:JimSeker,項目名稱:googleplayAPI,代碼行數:26,代碼來源:MainActivity.java

示例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;
    }
}
 
開發者ID:JimSeker,項目名稱:googleplayAPI,代碼行數:26,代碼來源:myAdapter.java

示例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);
    }
}
 
開發者ID:jamescoggan,項目名稱:activity-recognition-example,代碼行數:23,代碼來源:Constants.java

示例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);
    }
}
 
開發者ID:M66B,項目名稱:BackPackTrackII,代碼行數:26,代碼來源:BackgroundService.java

示例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";
    }
}
 
開發者ID:pmwisdom,項目名稱:cordova-background-geolocation-services,代碼行數:22,代碼來源:Constants.java

示例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";
    }
}
 
開發者ID:MD2Korg,項目名稱:mCerebrum-PhoneSensor,代碼行數:22,代碼來源:Constants.java

示例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;
    }
}
 
開發者ID:MD2Korg,項目名稱:mCerebrum-PhoneSensor,代碼行數:20,代碼來源:ActivityType.java

示例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";
}
 
開發者ID:IOT-DSA,項目名稱:dslink-java-android,代碼行數:21,代碼來源:ActivityRecognitionIntentService.java

示例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);
    }
}
 
開發者ID:InspectorIncognito,項目名稱:androidApp,代碼行數:26,代碼來源:Constants.java


注:本文中的com.google.android.gms.location.DetectedActivity.ON_FOOT屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。