Skip to content

Most visited

Recently visited

navigation
XYZTouristAttractions / Shared / src / com.example.android.xyztouristattractions.common /

Constants.java

1
/*
2
 * Copyright 2015 Google Inc. All rights reserved.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
 
17
package com.example.android.xyztouristattractions.common;
18
 
19
public class Constants {
20
 
21
    private Constants() {};
22
 
23
    // Set to false to have the geofence trigger use the enhanced notifications instead
24
    public static final boolean USE_MICRO_APP = true;
25
 
26
    public static final int GOOGLE_API_CLIENT_TIMEOUT_S = 10; // 10 seconds
27
    public static final String GOOGLE_API_CLIENT_ERROR_MSG =
28
            "Failed to connect to GoogleApiClient (error code = %d)";
29
 
30
    // Used to size the images in the mobile app so they can animate cleanly from list to detail
31
    public static final int IMAGE_ANIM_MULTIPLIER = 2;
32
 
33
    // Resize images sent to Wear to 400x400px
34
    public static final int WEAR_IMAGE_SIZE = 400;
35
 
36
    // Except images that can be set as a background with parallax, set width 640x instead
37
    public static final int WEAR_IMAGE_SIZE_PARALLAX_WIDTH = 640;
38
 
39
    // The minimum bottom inset percent to use on a round screen device
40
    public static final float WEAR_ROUND_MIN_INSET_PERCENT = 0.08f;
41
 
42
    // Max # of attractions to show at once
43
    public static final int MAX_ATTRACTIONS = 4;
44
 
45
    // Notification IDs
46
    public static final int MOBILE_NOTIFICATION_ID = 100;
47
    public static final int WEAR_NOTIFICATION_ID = 200;
48
 
49
    // Intent and bundle extras
50
    public static final String EXTRA_ATTRACTIONS = "extra_attractions";
51
    public static final String EXTRA_ATTRACTIONS_URI = "extra_attractions_uri";
52
    public static final String EXTRA_TITLE = "extra_title";
53
    public static final String EXTRA_DESCRIPTION = "extra_description";
54
    public static final String EXTRA_LOCATION_LAT = "extra_location_lat";
55
    public static final String EXTRA_LOCATION_LNG = "extra_location_lng";
56
    public static final String EXTRA_DISTANCE = "extra_distance";
57
    public static final String EXTRA_CITY = "extra_city";
58
    public static final String EXTRA_IMAGE = "extra_image";
59
    public static final String EXTRA_IMAGE_SECONDARY = "extra_image_secondary";
60
    public static final String EXTRA_TIMESTAMP = "extra_timestamp";
61
 
62
    // Wear Data API paths
63
    public static final String ATTRACTION_PATH = "/attraction";
64
    public static final String START_PATH = "/start";
65
    public static final String START_ATTRACTION_PATH = START_PATH + "/attraction";
66
    public static final String START_NAVIGATION_PATH = START_PATH + "/navigation";
67
    public static final String CLEAR_NOTIFICATIONS_PATH = "/clear";
68
 
69
    // Maps values
70
    public static final String MAPS_INTENT_URI = "geo:0,0?q=";
71
    public static final String MAPS_NAVIGATION_INTENT_URI = "google.navigation:mode=w&q=";
72
 
73
}
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.