/developers/samples/android/deprecated/wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/ |
D | AssetUtils.java | 36 InputStream is = context.getAssets().open(asset); in loadAsset() local 37 int size = is.available(); in loadAsset() 39 is.read(buffer); in loadAsset() 40 is.close(); in loadAsset() 59 InputStream is = null; in loadBitmapAsset() local 62 is = context.getAssets().open(asset); in loadBitmapAsset() 63 if (is != null) { in loadBitmapAsset() 64 bitmap = BitmapFactory.decodeStream(is); in loadBitmapAsset() 69 if (is != null) { in loadBitmapAsset() 71 is.close(); in loadBitmapAsset()
|
/developers/build/prebuilts/gradle/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/ |
D | AssetUtils.java | 36 InputStream is = context.getAssets().open(asset); in loadAsset() local 37 int size = is.available(); in loadAsset() 39 is.read(buffer); in loadAsset() 40 is.close(); in loadAsset() 59 InputStream is = null; in loadBitmapAsset() local 62 is = context.getAssets().open(asset); in loadBitmapAsset() 63 if (is != null) { in loadBitmapAsset() 64 bitmap = BitmapFactory.decodeStream(is); in loadBitmapAsset() 69 if (is != null) { in loadBitmapAsset() 71 is.close(); in loadBitmapAsset()
|
/developers/build/prebuilts/gradle/Quiz/Application/src/main/java/com/example/android/wearable/quiz/ |
D | JsonUtils.java | 39 InputStream is = context.getAssets().open(fileName); in loadJsonFile() local 40 int size = is.available(); in loadJsonFile() 42 is.read(buffer); in loadJsonFile() 43 is.close(); in loadJsonFile()
|
/developers/samples/android/deprecated/wearable/wear/Quiz/Application/src/main/java/com/example/android/wearable/quiz/ |
D | JsonUtils.java | 39 InputStream is = context.getAssets().open(fileName); in loadJsonFile() local 40 int size = is.available(); in loadJsonFile() 42 is.read(buffer); in loadJsonFile() 43 is.close(); in loadJsonFile()
|
/developers/build/prebuilts/gradle/MessagingService/ |
D | README.md | 10 when the notification is presented there. 11 Note: Each unread conversation from a user is sent as a distinct 21 is automotive enabled. 41 MessagingFragment is shown to the user. Depending on the button clicked, the MessagingService is 45 When a message is read, the associated PendingIntent is triggered and MessageReadReceiver is called 46 with the appropriate conversationId. Similarly, when a reply is received, the MessageReplyReceiver 47 is called with the appropriate conversationId. MessageLogger logs each event and shows them in a 95 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/DarkTheme/ |
D | README.md | 12 whether the device theme is dark or not. There are multiple ways you can allow 39 - MODE_NIGHT_AUTO_BATTERY. Dark when battery saver is enabled, light otherwise. 46 Smart Dark is a new feature in Android Q which can automatically theme a light app to 48 APIs. It is made for apps which do not have explicit Dark Theme support yet. 50 Smart Dark applies to any theme whose value of `android:isLightTheme=true`. This is set on 56 This feature is implemented in the `PreferencesFragment`. As you can see in the 59 (you can see it in `layout/fragment_preferences.xml#L19`). In this case, when Smart Dark is 67 can choose the Light theme, Dark theme, or System Default (when the app is running on 73 Also, it recommends that this user choice is stored and applied whenever the user opens 74 the app again. In the code sample, the user preference is automatically stored in [all …]
|
/developers/build/prebuilts/gradle/DragAndDropAcrossApps/ |
D | README.md | 21 Which gesture or action triggers this is up to you as an app developer. 28 is down while the drag is starting, and the most recent touch/click 29 position is used as the original position of the drag shadow. 35 By default a drag and drop operation is constrained by the window 41 If a Uri requiring permission grants is being sent, then the 47 until the activity is alive, or until the `release()` method is called on the 95 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/WearHighBandwidthNetworking/ |
D | README.md | 5 Sample demonstrates how to determine if a high-bandwidth network is available for use cases that 8 high-bandwidth network operations if the bandwidth of currently available networks is inadequate. 13 On Android Wear, a high-bandwidth network is not always available, as the platform manages network 18 1. Check for an active network, and if there is one, check its bandwidth. 19 2. If there isn't an active network, or its bandwidth is insufficient, request access to an 21 3. If a high-bandwidth network is still not avaiable, ask the user to connect to a new Wi-Fi 32 ensure a high-bandwidth network is available. In addition, the sample demonstrates the ideal user 36 Wear device and that it is unplugged, as Wear devices may prefer high-bandwidth networks by default 87 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/media/HdrViewfinder/ |
D | README.md | 7 compositing together the latest two frames whenever a new frame is captured. 16 frames, and then compositing together the latest two frames whenever a new frame is 30 The HDR fusion and the split-screen viewfinder processing is done with RenderScript; as is the 33 fused/composited, a standard YUV->RGB color transform is applied before the the data is written 34 to the output Allocation. The HDR fusion algorithm is very simple, and tends to result in 37 Data is passed between the subsystems (camera, RenderScript, and display) using the 88 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/HdrViewfinder/ |
D | README.md | 7 compositing together the latest two frames whenever a new frame is captured. 16 frames, and then compositing together the latest two frames whenever a new frame is 30 The HDR fusion and the split-screen viewfinder processing is done with RenderScript; as is the 33 fused/composited, a standard YUV->RGB color transform is applied before the the data is written 34 to the output Allocation. The HDR fusion algorithm is very simple, and tends to result in 37 Data is passed between the subsystems (camera, RenderScript, and display) using the 88 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/DirectBoot/ |
D | README.md | 6 is always available while the device is booted both before and after any 13 storage which is always available while the device is booted. 20 …- A new storage location which is always available while the device is booted, both before and aft… 23 Credential protected storage is unavailable (an direct boot aware component primarily relies on dat… 38 You need to be careful what data is stored/moved to a device protected storage 88 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/sensors/BatchStepSensor/ |
D | README.md | 18 event when a step is detected, while the step counter returns the total number of 21 Both sensors only count steps while a listener is registered. This sample only covers the 22 basic case, where a listener is only registered while the app is running. Likewise, 23 batched sensors can be used in the background (when the CPU is suspended), which 24 requires manually flushing the [sensor event][3] queue before it overflows, which is not 76 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/NetworkConnect/ |
D | README.md | 6 HttpsURLConnection. AsyncTask is used to perform the fetch on a background thread. 12 [`HttpsURLConnection`][4]. Since API 11, it is required by default that all network 14 when the network response is ready should the work return to the main thread to update 15 the UI. An [`AsyncTask`][3] is a viable background task manager that is used to perform 19 a network connection, and if so, what type of connection it is. 76 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/connectivity/network/NetworkConnect/ |
D | README.md | 6 HttpsURLConnection. AsyncTask is used to perform the fetch on a background thread. 12 [`HttpsURLConnection`][4]. Since API 11, it is required by default that all network 14 when the network response is ready should the work return to the main thread to update 15 the UI. An [`AsyncTask`][3] is a viable background task manager that is used to perform 19 a network connection, and if so, what type of connection it is. 76 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/BatchStepSensor/ |
D | README.md | 18 event when a step is detected, while the step counter returns the total number of 21 Both sensors only count steps while a listener is registered. This sample only covers the 22 basic case, where a listener is only registered while the app is running. Likewise, 23 batched sensors can be used in the background (when the CPU is suspended), which 24 requires manually flushing the [sensor event][3] queue before it overflows, which is not 76 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/ui/transition/BasicTransition/ |
D | README.md | 12 A Scene is an encapsulation of the state of a view hierarchy, 16 scene dynamically as it is entered. 18 A Transition is a mechanism to automatically animate changes that 19 occur when a new scene is entered. Some transition capabilities are 20 automatic. That is, entering a scene may cause animations to run which 29 TransitionManager is used to specify custom transitions for particular 78 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/BasicTransition/ |
D | README.md | 12 A Scene is an encapsulation of the state of a view hierarchy, 16 scene dynamically as it is entered. 18 A Transition is a mechanism to automatically animate changes that 19 occur when a new scene is entered. Some transition capabilities are 20 automatic. That is, entering a scene may cause animations to run which 29 TransitionManager is used to specify custom transitions for particular 78 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/PictureInPicture/ |
D | README.md | 6 The sample plays a video. The video keeps on playing when the app is turned in to 13 As of Android O, activities can launch in [Picture-in-Picture (PiP)][1] mode. PiP is a 16 The app is *paused* when it enters PiP mode, but it should continue showing content. For this 27 activity should behave when it is in PiP mode. You can also use it to call 28 [setPictureInPictureParams()][8] and update the current behavior. If the app is in not PiP mode, it 32 available for PiP mode. The aspect ratio is used when the activity is in PiP mode. The action items 34 item is selected. 91 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/PictureInPicture/kotlinApp/ |
D | README.md | 5 The sample plays a video. The video keeps on playing when the app is turned in to 12 As of Android O, activities can launch in [Picture-in-Picture (PiP)][1] mode. PiP is a 15 The app is *paused* when it enters PiP mode, but it should continue showing content. For this 27 activity should behave when it is in PiP mode. You can also use it to call 28 [setPictureInPictureParams()][8] and update the current behavior. If the app is in not PiP mode, it 32 available for PiP mode. The aspect ratio is used when the activity is in PiP mode. The action items 34 item is selected. 91 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/templates/create/_MODULE_/ |
D | build.gradle.ftl | 12 distributed under the License is distributed on an "AS IS" BASIS, 18 <#-- This build script is a bootstrapper for the "real" android build script that 19 is contained in templates/base. It includes only what's necessary for Android Studio 37 <#-- Note that target SDK is hardcoded in this template. We expect all samples
|
/developers/build/templates/CardStream/_MODULE_/src/template/java/_PACKAGE_/cardstream/ |
D | CardStreamAnimator.java.ftl | 12 distributed under the License is distributed on an "AS IS" BASIS, 49 * Define disappearing animation of a child which fired when a view is removed programmatically 57 * Define appearing animation of a child which fired when a view is added programmatically 66 * which fired when a view is not moved enough to be removed. 77 * which fired when a view is removing by a user swipe action. 87 * A simple CardStreamAnimator implementation which is used to turn animations off.
|
/developers/build/templates/create/ |
D | template-params.xml.ftl | 12 distributed under the License is distributed on an "AS IS" BASIS, 32 Introductory text that explains what the sample is intended to demonstrate. Edit 54 <!-- Most samples just need to udpate the Categories field. This is a comma- 63 <!-- Beginner is for "getting started" type content, or essential content. 66 Intermediate is for content that covers material a beginner doesn't need 67 to know, but that a skilled developer is expected to know. 70 Advanced is for highly technical content geared towards experienced developers. 73 Expert is reserved for highly technical or specialized content, and should
|
/developers/samples/android/connectivity/wifidirect/DirectP2P/Application/src/main/java/com/example/android/wifidirectp2p/ |
D | FileTransferService.java | 61 InputStream is = null; in onHandleIntent() local 63 is = cr.openInputStream(Uri.parse(fileUri)); in onHandleIntent() 67 DeviceDetailFragment.copyFile(is, stream); in onHandleIntent()
|
/developers/build/prebuilts/gradle/JumpingJack/ |
D | README.md | 34 The detectJump method above assumes that when a person is wearing the watch, the x-component of gra… 35 as measured by the Gravity Sensor is +9.8 when the hand is downward and -9.8 when the hand 36 is upward (signs are reversed if the watch is worn on the right hand). Since the upward or 89 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/DownloadableFonts/kotlinApp/ |
D | README.md | 5 Downloadable Fonts is a feature that allows apps to request a certain font from a provider 6 instead of bundling it or downloading it themselves. This means, there is no need to bundle the 24 The third parameter is a query string about the requested font. The syntax of the query is defined 33 corresponding classes in the framework, but the feature is available back to API level 14 if you 47 meta-data tag in the AndroidManifest, you can avoid the delay until the font is downloaded by the 67 You can sign up for the beta program so that the beta version of Google Play Services is 69 If you have Google Play Services whose version number is equal or above 11.x.x, that means you 121 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|