Cleanup anchors in android guides (#26)

* [android] app-fund anchor cleanup

* [android] app fund tab/misc cleanups

* [android] remove more anchors

* [android] remove unused anchors

* [android] fix warnings
This commit is contained in:
Mark McLemore 2018-03-05 03:33:00 -08:00 коммит произвёл Craig Dunn
Родитель a82b2afb26
Коммит 030c42cf4e
146 изменённых файлов: 192 добавлений и 1131 удалений

Просмотреть файл

@ -6,7 +6,7 @@ ms.assetid: 157F0899-4E3E-4538-90AF-B59B8A871204
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 01/31/2018
ms.date: 02/28/2018
---
# Accessibility on Android
@ -197,7 +197,6 @@ translations of the file can be provided in your app. See the
[Android localization guide](~/android/app-fundamentals/localization.md)
to learn how add localized string files to an application project.
<a name="testing" />
## Testing Accessibility
@ -208,7 +207,6 @@ You may need to install [TalkBack](https://play.google.com/store/apps/details?id
from Google Play if it does not appear in **Settings > Accessibility**.
## Related Links
- [Cross-platform Accessibility](~/cross-platform/app-fundamentals/accessibility.md)

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: 05B34788-F2D2-4347-B66B-40AFD7B1D167
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 02/28/2018
---
# Activity Lifecycle
@ -370,7 +370,6 @@ three options for storing instance state during the Activity lifecycle:
This guide covers the first two options.
<a name="Bundle_State" />
### Bundle State
@ -469,7 +468,6 @@ c = bundle.GetInt ("counter", -1);
> `OnSaveInstanceState` so that the state of the view hierarchy can also be saved.
<a name="View_State" />
##### View State
@ -524,8 +522,6 @@ For an example of saving state using a `Bundle`, refer to the
[Walkthrough - Saving the Activity state](saving-state.md).
<a name="Bundle_Limitations" />
#### Bundle Limitations
Although `OnSaveInstanceState` makes it easy to save transient
@ -552,7 +548,6 @@ gets saved in an object as needed. The next section introduces
`OnRetainNonConfigurationInstance` as a way of preserving more complex
data types through configuration changes.
<a name="Persisting_Complex_Data" />
### Persisting Complex Data

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: A6090101-67C6-4BDD-9416-F2FB74805A87
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Walkthrough - Saving the Activity state
@ -73,7 +73,7 @@ When we click the **Back** button, *Activity B* is destroyed and
Next, we're going to change the application so that we have a button
that counts and displays the number of times it is clicked. First,
let's add a `_counter` instance variable to `MainActivity`:
let's add a `_counter` instance variable to `MainActivity`:
```csharp
int _counter = 0;

Просмотреть файл

@ -7,14 +7,13 @@ ms.assetid: 58CB7B34-3140-4BEB-BE2E-209928C1878C
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Understanding Android API Levels
_Xamarin.Android has several Android API level settings that determine your app's compatibility with multiple versions of Android. This guide explains what these settings mean, how to configure them, and what effect they have on your app at run time._
<a name="quick" />
## Quick Start
@ -109,7 +108,6 @@ details). If you are consuming or creating a library, see
configuring API level settings for libraries.
<a name="verslevels" />
## Android Versions and API Levels
@ -120,7 +118,6 @@ single Android API Level. Because users install apps on older as well
as the most recent versions of Android, real-world Android apps must be
designed to work with multiple Android API levels.
<a name="versions" />
### Android Versions
@ -201,7 +198,6 @@ of older and newer Android versions. How can you guarantee that your
app will run consistently and reliably on so many different versions of
Android? Android's API levels can help you manage this problem.
<a name="apilevels" />
### Android API Levels
@ -230,7 +226,6 @@ example, if the API level of an Android device is lower than the
minimum API level that you specify for your app, the Android device
will prevent the user from installing your app.
<a name="settings" />
## Project API Level Settings
@ -240,7 +235,6 @@ followed by detailed explanations of how to configure *Target
Framework*, *Minimum Android version*, and *Target Android version*
settings in Xamarin.Android.
<a name="sdk" />
### Android SDK Platforms
@ -284,7 +278,7 @@ app to be compiled at that support library's minimum API level or
greater.
> [!NOTE]
> **Note:** Beginning in August 2018, the Google Play Console
> Beginning in August 2018, the Google Play Console
will require that new apps target API level 26 (Android 8.0) or higher.
Existing apps will be required to target API level 26 or higher
beginning in November 2018. For more information, see

Просмотреть файл

@ -7,14 +7,13 @@ ms.assetid: 646ED563-C34E-256D-4B56-29EE99881C27
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 02/28/2018
---
# Android Audio
_The Android OS provides extensive support for multimedia, encompassing both audio and video. This guide focuses on audio in Android and covers playing and recording audio using the built-in audio player and recorder classes, as well as the low-level audio API. It also covers working with Audio events broadcast by other applications, so that developers can build well-behaved applications._
<a name="Overview" />
## Overview
@ -54,7 +53,6 @@ It is necessary to request the `RECORD_AUDIO` permissions in **AndroidManifest.X
![Required permissions section of Android Manifest with RECORD\_AUDIO enabled](android-audio-images/image01.png)
<a name="Playing_Audio_with_the_MediaPlayer_Class" />
## Playing Audio with the MediaPlayer Class
@ -67,7 +65,6 @@ thrown. It's important to interact with `MediaPlayer` in the order
described below to avoid errors.
<a name="Initializing_and_Playing" />
### Initializing and Playing
@ -106,7 +103,6 @@ public void StartPlayer(String filePath)
}
```
<a name="Suspending_and_Resuming_Playback" />
### Suspending and Resuming Playback
@ -141,7 +137,6 @@ calling the
player.Release();
```
<a name="Using_the_MediaRecorder_Class_to_Record_Audio" />
## Using the MediaRecorder Class to Record Audio
@ -154,7 +149,6 @@ order to record audio, the `RECORD_AUDIO` permission must be set. For
instructions on how to set application permissions see
[Working with AndroidManifest.xml](~/android/platform/android-manifest.md).
<a name="Initializing_and_Recording" />
### Initializing and Recording
@ -219,7 +213,6 @@ void RecordAudio (String filePath)
}
```
<a name="Stopping_recording" />
### Stopping recording
@ -229,7 +222,6 @@ To stop the recording, call the `Stop` method on the `MediaRecorder`:
recorder.Stop();
```
<a name="Cleaning_up" />
### Cleaning up
@ -251,11 +243,9 @@ method:
recorder.Release();
```
<a name="Managing_Audio_Notifications" />
## Managing Audio Notifications
<a name="The_AudioManager_Class" />
### The AudioManager Class
@ -267,7 +257,6 @@ features, such as volume and ringer mode control. The `AudioManager`
allows an application to handle audio notifications to control audio
playback.
<a name="Managing_Audio_Focus" />
### Managing Audio Focus
@ -301,7 +290,6 @@ For more information about audio focus, see
[Managing Audio Focus](http://developer.android.com/training/managing-audio/audio-focus.html).
<a name="Registering_the_Callback_for_Audio_Focus" />
#### Registering the Callback for Audio Focus
@ -325,7 +313,6 @@ the callback. This deregisters the callback and releases the audio
resources, so that other applications may obtain audio focus.
<a name="Requesting_Audio_Focus" />
#### Requesting Audio Focus
@ -368,7 +355,6 @@ Boolean RequestAudioResources(INotificationReceiver parent)
}
```
<a name="Releasing_Audio_Focus" />
#### Releasing Audio Focus
@ -378,7 +364,6 @@ the audio resources of the device. Other applications will receive a
notification of this audio focus change if they have registered their
own listeners.
<a name="Low_Level_Audio_API" />
## Low Level Audio API
@ -394,16 +379,12 @@ approach is preferable. Such scenarios include:
3. Audio streaming.
<a name="AudioTrack_Class" />
### AudioTrack Class
The [AudioTrack](https://developer.xamarin.com/api/type/Android.Media.AudioTrack/) class uses the
low-level audio APIs for recording, and is the low-level equivalent of
the `MediaPlayer` class.
<a name="Initializing_and_Playing" />
#### Initializing and Playing
@ -453,7 +434,6 @@ void PlayAudioTrack(byte[] audioBuffer)
}
```
<a name="Pausing_and_Stopping_the_Playback" />
#### Pausing and Stopping the Playback
@ -473,7 +453,6 @@ terminate the playback permanently:
audioTrack.Stop();
```
<a name="Cleaning_up" />
#### Cleanup
@ -484,7 +463,6 @@ released by calling [Release](https://developer.xamarin.com/api/member/Android.M
audioTrack.Release();
```
<a name="The_AudioRecord_Class" />
### The AudioRecord Class
@ -493,7 +471,6 @@ equivalent of `AudioTrack` on the recording side. Like `AudioTrack`, it
uses memory buffers directly, in place of files and URIs. It requires
that the `RECORD_AUDIO` permission be set in the manifest.
<a name="Initializing_and_Recording" />
#### Initializing and Recording
@ -555,7 +532,6 @@ void RecordAudio()
}
```
<a name="Stopping_the_Recording" />
#### Stopping the Recording
@ -567,7 +543,6 @@ terminates the recording:
audRecorder.Stop();
```
<a name="Clean_Up" />
#### Cleanup
@ -579,7 +554,6 @@ method releases all resources associated with it:
audRecorder.Release();
```
<a name="Summary" />
## Summary

Просмотреть файл

@ -1,5 +1,5 @@
---
title: "Broadcast Receiver in Xamarin.Android"
title: "Broadcast Receivers in Xamarin.Android"
description: "This section discusses how to use a Broadcast Receiver."
ms.topic: article
ms.prod: xamarin
@ -7,10 +7,10 @@ ms.assetid: B2727160-12F2-43EE-84B5-0B15C8FCF4BD
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Broadcast Receiver in Xamarin.Android
# Broadcast Receivers in Xamarin.Android
_This section discusses how to use a Broadcast Receiver._

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: D4BC889D-9164-49BB-9B7B-F6C4E4E109F1
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# CPU Architectures
@ -108,7 +108,7 @@ the [Nexus 9](http://www.google.com/nexus/9/)) can run apps configured for
make it possible for your app to address more memory.
> [!NOTE]
> **Note:**: 64-bit runtime support is currently an experimental
> 64-bit runtime support is currently an experimental
> feature. Remember that 64-bit runtimes are *not* required to run your app on 64-bit devices.
## Additional Information

Просмотреть файл

@ -14,7 +14,6 @@ ms.date: 02/16/2018
_Android provides a very rich and diverse framework for supporting 2D graphics and animations. This topic introduces these frameworks and discusses how to create custom graphics and animations for use in a Xamarin.Android application._
<a name="Overview" />
## Overview
@ -107,7 +106,6 @@ Refer to
more information on how to utilize Android's accessibility APIs.
<a name="2D_Graphics" />
## 2D Graphics
@ -132,7 +130,6 @@ will change based on calculations related to the value of the slider.
Let's examine Drawable Resources first. They are simpler and cover the
most common custom drawing cases.
<a name="Drawable Resources" />
### Drawable Resources
@ -262,7 +259,6 @@ For more details about the XML elements and syntax of Drawable
Resources, consult
[Google's documentation](http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape).
<a name="Using the Canvas Drawing API" />
### Using the Canvas Drawing API
@ -317,7 +313,6 @@ instructions. For example:
text is drawn at location `x,y` .
<a name="Drawing with the Canvas API" />
#### Drawing with the Canvas API
@ -359,7 +354,6 @@ should a screen similar to the following:
![Screen with red paint and green paint objects](graphics-and-animation-images/image3.png)
<a name="Animation" />
## Animation
@ -386,7 +380,6 @@ for animations:
In general, property animation is the preferred system to use as it is
more flexible and offers more features.
<a name="View Animations" />
### View Animations
@ -500,7 +493,6 @@ myImage.StartAnimation(myAnimation);
Now that we have a fundamental understanding of how View Animations
work, lets move to Property Animations.
<a name="Property Animations" />
### Property Animations
@ -624,7 +616,6 @@ animator.Start();
As you can see from the previous code snippet, `ObjectAnimator` can
reduce and simplify the code that is necessary to animate an object.
<a name="Drawable Animations" />
### Drawable Animations
@ -679,7 +670,6 @@ protected override void OnCreate(Bundle bundle)
At this point we have covered the foundations of the animation APIs
available in an Android application.
<a name="Summary" />
## Summary

Просмотреть файл

@ -14,7 +14,6 @@ ms.date: 02/16/2018
_This topic describes how to handle device orientation changes in Xamarin.Android. It covers how to work with the Android resource system to automatically load resources for a particular device orientation as well as how to programmatically handle orientation changes._
<a name="Overview" />
## Overview
@ -40,7 +39,6 @@ This guide examines the following orientation topics:
programmatically as well as how to handle orientation changes
manually.
<a name="Handling_Rotation_Declaratively_with_Layouts" />
## Handling Rotation Declaratively with Layouts
@ -54,7 +52,6 @@ This includes support for:
- *Drawable Resources* &ndash; Specifying which drawables are loaded
for each orientation.
<a name="Layout_Resources" />
### Layout Resources
@ -92,7 +89,6 @@ inflated, as shown in the screenshot below:
[ ![Same screen but in landscape orientation](handling-rotation-images/01-sml.png)](handling-rotation-images/01.png)
<a name="Orientation-Specific_Layouts" />
#### Orientation-Specific Layouts
@ -139,7 +135,6 @@ demonstrates the new XML loading, as shown below:
[ ![Portrait and landscape screenshots printing the portrait mode](handling-rotation-images/02.png)](handling-rotation-images/02.png)
<a name="Drawable_Resources" />
### Drawable Resources
@ -168,7 +163,6 @@ orientation, as shown below:
[ ![Different version of Monkey.png shown in portrait and landscape modes](handling-rotation-images/03.png)](handling-rotation-images/03.png)
<a name="Handling_Rotation_Programmatically" />
## Handling Rotation Programmatically
@ -178,7 +172,6 @@ When we add controls programmatically, an application must manually
account for device orientation, which is handled automatically when we
use XML resources.
<a name="Adding_Controls_in_Code" />
### Adding Controls in Code
@ -234,7 +227,6 @@ results in the application displaying the `TextView` as shown:
[ ![Increment counter button shown in both portrait and landscape modes](handling-rotation-images/04.png)](handling-rotation-images/04.png)
<a name="Detecting_Orientation_in_Code" />
### Detecting Orientation in Code
@ -290,7 +282,6 @@ rotated to landscape, as shown here:
[ ![View state is preserved across portrait and landscape modes](handling-rotation-images/05.png)](handling-rotation-images/05.png)
<a name="Preventing_Activity_Restart" />
### Preventing Activity Restart
@ -367,7 +358,6 @@ orientation changes. The code still uses the `surfaceOrientartion` in
When we run the application, Android loads the user interface changes
as device rotation occurs, and does not restart the Activity.
<a name="Preventing_Activity_Restart_for_Declarative_Layouts" />
## Preventing Activity Restart for Declarative Layouts
@ -382,7 +372,6 @@ programmatic layout. Simply set `ConfigurationChanges` in the
code that does need to run for the orientation change can again be
implemented in the `OnConfigurationChanged` method.
<a name="Maintaining_State_During_Orientation_Changes" />
## Maintaining State During Orientation Changes
@ -403,7 +392,6 @@ For more information on persisting state in Android, refer to the
[Activity Lifecycle](~/android/app-fundamentals/activity-lifecycle/index.md)
guide.
<a name="Summary" />
## Summary

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: D7ABAFAB-5CA2-443D-B902-2C7F3AD69CE2
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# HttpClient Stack and SSL/TLS Implementation Selector for Android
@ -16,38 +16,50 @@ _The HttpClient Stack and SSL/TLS Implementation selectors determine the HttpCli
## Overview
Xamarin.Android provides two combo boxes that will control the TLS settings for an Android app. One combo box will identify which `HttpMessageHandler` will use when instantiating an `HttpClient` object, while the other identifies which TLS implementation will be used by web requests.
Xamarin.Android provides two combo boxes that will control the TLS
settings for an Android app. One combo box will identify which
`HttpMessageHandler` will use when instantiating an `HttpClient`
object, while the other identifies which TLS implementation will be
used by web requests.
> [!NOTE]
> **Note:** Projects must reference the **System.Net.Http** assembly.
> Projects must reference the **System.Net.Http** assembly.
# [Visual Studio](#tab/vswin)
The settings for the HttpClient stack are found in the Project Options for a Xamarin.Android project. Click on the **Android Options** tab, and then click on the **Advanced Options** button. This will display the **Advanced Android Options** dialog which has two combo boxes, one for the HttpClient implementation and one for the SSL/TLS implementation:
The settings for the HttpClient stack are found in the Project Options
for a Xamarin.Android project. Click on the **Android Options** tab,
and then click on the **Advanced Options** button. This will display
the **Advanced Android Options** dialog which has two combo boxes, one
for the HttpClient implementation and one for the SSL/TLS
implementation:
[ ![Visual Studio Android Options](http-stack-images/tls07-vs-sml.png)](http-stack-images/tls07-vs.png)
# [Visual Studio for Mac](#tab/vsmac)
The settings for the HttpClient stack are found in the Project Options for a Xamarin.Android Project. Click on the **Build > Android Build** settings and click on the **General** tab:
[ ![Visual Studio for Mac Android Options](http-stack-images/tls07-xs-sml.png)](http-stack-images/tls07-xs.png)
-----
## HttpClient Stack Selector
This project option controls which `HttpMessageHandler` implementation will be used each time an `HttpClient` object is instantiated. By default, this is the managed `HttpClientHandler`.
# [Visual Studio](#tab/vswin)
This project option controls which `HttpMessageHandler` implementation
will be used each time an `HttpClient` object is instantiated. By
default, this is the managed `HttpClientHandler`.
[ ![Android HttpClient implementation combo box in Visual Studio](http-stack-images/tls04-vs-sml.png)](http-stack-images/tls04-vs.png)
# [Visual Studio for Mac](#tab/vsmac)
The settings for the HttpClient stack are found in the Project Options
for a Xamarin.Android Project. Click on the **Build > Android Build**
settings and click on the **General** tab:
[ ![Visual Studio for Mac Android Options](http-stack-images/tls07-xs-sml.png)](http-stack-images/tls07-xs.png)
## HttpClient Stack Selector
This project option controls which `HttpMessageHandler` implementation
will be used each time an `HttpClient` object is instantiated. By
default, this is the managed `HttpClientHandler`.
![Android HttpClient implementation combo box in Visual Studio for Mac](http-stack-images/tls04-xs.png )
-----
@ -85,9 +97,14 @@ Java/OS code instead of implementing everything in managed code.
### Programatically Using `AndroidClientHandler`
The `Xamarin.Android.Net.AndroidClientHandler` is an `HttpMessageHandler` implementation specifically for Xamarin.Android. Instances of this class will use the native `java.net.URLConnection` implementation for all HTTP connections. This will theoretically provide an increase in HTTP performance and smaller APK sizes.
The `Xamarin.Android.Net.AndroidClientHandler` is an
`HttpMessageHandler` implementation specifically for Xamarin.Android.
Instances of this class will use the native `java.net.URLConnection`
implementation for all HTTP connections. This will theoretically
provide an increase in HTTP performance and smaller APK sizes.
This code snippet is an example of how to explicitly for a single instance of the `HttpClient` class:
This code snippet is an example of how to explicitly for a single
instance of the `HttpClient` class:
```csharp
// Android 5.0 or higher, Xamarin.Android 6.1 or higher
@ -95,12 +112,14 @@ HttpClient client = new HttpClient(new Xamarin.Android.Net.AndroidClientHandler
```
> [!NOTE]
> **Note**: The underlying Android device must support TLS 1.2 (ie. Android 5.0 and later)
> The underlying Android device must support TLS 1.2 (ie. Android 5.0 and later)
## SSL/TLS implementation build option
This project option controls what underlying TLS library will be used by all web request, both `HttpClient` and `WebRequest`. By default, TLS 1.2 is selected:
This project option controls what underlying TLS library will be used
by all web request, both `HttpClient` and `WebRequest`. By default, TLS
1.2 is selected:
# [Visual Studio](#tab/vswin)
@ -118,9 +137,16 @@ For example:
var client = new HttpClient();
```
If the HttpClient implementation was set to **Managed** and the TLS implementation was set to **Native TLS 1.2+**, then the `client` object would automatically use the managed `HttpClientHandler` and TLS 1.2 (provided by the BoringSSL library) for its HTTP requests.
If the HttpClient implementation was set to **Managed** and the TLS
implementation was set to **Native TLS 1.2+**, then the `client` object
would automatically use the managed `HttpClientHandler` and TLS 1.2
(provided by the BoringSSL library) for its HTTP requests.
However, if the **HttpClient implementation** is set to `AndroidHttpClient`, then all `HttpClient` objects will use the underlying Java class `java.net.URLConnection` and will be unaffected by the **TLS/SSL implementation** value. `WebRequest` objects would use the BoringSSL library.
However, if the **HttpClient implementation** is set to
`AndroidHttpClient`, then all `HttpClient` objects will use the
underlying Java class `java.net.URLConnection` and will be unaffected
by the **TLS/SSL implementation** value. `WebRequest` objects would use
the BoringSSL library.
## Other ways to control SSL/TLS configuration
@ -130,8 +156,11 @@ There are three ways that a Xamarin.Android application can control the TLS sett
2. Programatically using `Xamarin.Android.Net.AndroidClientHandler`.
3. Declare environment variables (optional).
Of the three choices, the recommended approach is to use the Xamarin.Android project options to declare the default `HttpMessageHandler` and TLS for the entire app. Then, if necessary, programmatically instantiate `Xamarin.Android.Net.AndroidClientHandler` objects.
These options are described above.
Of the three choices, the recommended approach is to use the
Xamarin.Android project options to declare the default
`HttpMessageHandler` and TLS for the entire app. Then, if necessary,
programmatically instantiate `Xamarin.Android.Net.AndroidClientHandler`
objects. These options are described above.
The third option &ndash; using environment variables &ndash; is explained below.

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: D1277939-A1E8-468E-B136-820D816AF853
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/15/2018
ms.date: 03/01/2018
---
# Android Localization
@ -90,7 +90,7 @@ suffixing resource directories with language and culture identifiers.
![Screenshot of Resources/drawable and Resources/values folders for multiple cultural identifiers](localization-images/resources.png)
> [!NOTE]
> **Note:** when specifying a top-level language like `es` only
> When specifying a top-level language like `es` only
two characters are required; however when specifying a full locale, the
directory name format requires a dash and lowercase **r** to separate
the two parts, for example **pt-rBR** or **zh-rCN**. Compare this to
@ -191,13 +191,13 @@ In the **Strings.xml**
```xml
<plurals name="numberOfTasks">
<!--
As a developer, you should always supply "one" and "other"
strings. Your translators will know which strings are actually
needed for their language.
-->
<item quantity="one">There is %d task left.</item>
<item quantity="other">There are %d tasks still to do.</item>
<!--
As a developer, you should always supply "one" and "other"
strings. Your translators will know which strings are actually
needed for their language.
-->
<item quantity="one">There is %d task left.</item>
<item quantity="other">There are %d tasks still to do.</item>
</plurals>
```
@ -292,8 +292,6 @@ The next screenshot shows the [localized **Tasky** sample](https://github.com/co
RTL text is localized using **Strings.xml** files in the same way as
LTR text.
<a name="testing" />
## Testing
Make sure to thoroughly test the default locale. Your application will

Просмотреть файл

@ -6,21 +6,19 @@ ms.assetid: 2E54F1D0-45F4-43A7-B3A3-4F483B7150CB
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Notifications in Xamarin.Android
<a name="Overview" />
## Overview
This section shows how to implement notifications in Xamarin.Android.
It explains the various UI elements of an Android notification and
discusses the API's involved with creating and displaying a
notification.
This section explains how to implement notifications in
Xamarin.Android. It describes the various UI elements of an Android
notification and discusses the API's involved with creating and
displaying a notification.
<a name="Sections" />
## Sections

Просмотреть файл

@ -14,7 +14,6 @@ ms.date: 01/30/2018
_This walkthrough demonstrates how to use local notifications in Xamarin.Android applications. It demonstrates the basics of creating and publishing a local notification. When the user clicks the notification in the notification area, it starts up a second Activity._
<a name="overview" />
## Overview
@ -29,7 +28,6 @@ The following screenshots illustrate some examples of this application:
[![Example screenshots with notification](local-notifications-walkthrough-images/1-overview-sml.png)](local-notifications-walkthrough-images/1-overview.png)
<a name="walkthrough" />
## Walkthrough
@ -38,7 +36,6 @@ template. Let's call this project **LocalNotifications**. (If you are
not familiar with creating Xamarin.Android projects, see
[Hello, Android](~/android/get-started/hello-android/hello-android-quickstart.md).)
<a name="add-v4-support" />
### Add the Android.Support.V4.App Component
@ -66,7 +63,6 @@ any ambiguity:
using TaskStackBuilder = Android.Support.V4.App.TaskStackBuilder;
```
<a name="define-id" />
### Define the Notification ID
@ -78,7 +74,6 @@ the `MainActivity` class:
private static readonly int ButtonClickNotificationId = 1000;
```
<a name="add-code" />
### Add Code to Generate the Notification
@ -135,7 +130,6 @@ provided by the template):
button.Click += ButtonOnClick;
```
<a name="second-activity" />
### Create a Second Activity
@ -197,7 +191,6 @@ We must also create a resource layout for **SecondActivity**. Add a new
</LinearLayout>
```
<a name="add-icon" />
### Add a Notification Icon
@ -209,7 +202,6 @@ create your own custom icon. We'll name the icon file
**Resources/drawable** folder. Remember to use **Add > Existing Item ...**
to include this icon file in your project.
<a name="run-app" />
### Run the Application
@ -244,7 +236,6 @@ and the Android
design guide.
<a name="summary" />
## Summary

Просмотреть файл

@ -47,7 +47,6 @@ Android notifications use two types of layouts:
Each of these layout types (and how to create them) is explained in the
following sections.
<a name="base-layout" />
### Base Layout
@ -125,7 +124,6 @@ types of notification metadata:
with Android 8.0, [notification channels](#notif-chan) are used to
control how notifications are presented to the user.
<a name="expanded-layouts" />
### Expanded Layouts
@ -158,7 +156,6 @@ notifications:
in this article) explains how to create *Big Text*, *Inbox*, and
*Image* notifications.
<a name="notification-creation" />
## Notification Creation
@ -201,7 +198,6 @@ class, which is responsible for publishing notifications and displaying
them to the user. A reference to this class can be obtained from any
context, such as an activity or a service.
<a name="how-to-generate" />
### How to Generate a Notification
@ -292,7 +288,6 @@ example sets the timestamp to the current time:
```csharp
builder.SetWhen (Java.Lang.JavaSystem.CurrentTimeMillis());
```
<a name="sound-and-vibr" />
### Enabling Sound and Vibration
@ -410,7 +405,6 @@ A notification remains visible until one of three things happens:
For more about updating Android notifications, see
[Modify a Notification](http://developer.android.com/training/notify-user/managing.html#Updating).
<a name="starting-an-activity" />
### Starting an Activity from a Notification
@ -629,7 +623,6 @@ notification on Oreo devices. If you don't target Android 8.0, your app
will still run on Android 8.0, but with the same notification behavior
as it would exhibit when running on Android 7.1 or earlier.
<a name="notif-chan-create" />
### Creating a Notification Channel
@ -680,7 +673,6 @@ To create a notification channel, do the following:
notificationManager.CreateNotificationChannel (chan);
```
<a name="notif-chan-post" />
### Posting to a Notifications Channel
@ -775,7 +767,6 @@ resizing operations that could delay the posting of the notification.
For more about notification icon sizes in Android, see
[Notification Icons](http://developer.android.com/design/style/iconography.html#notification).
<a name="big-text-style" />
### Big Text Style
@ -824,7 +815,6 @@ In this example, the message text and summary text are stored in the
`BigTextStyle` object (`textStyle`) before it is passed to
`Notification.Builder.`
<a name="image-style" />
### Image Style
@ -923,7 +913,6 @@ be thrown if the image is too large for Android to resize.
For more about loading and decoding large bitmap images, see
[Load Large Bitmaps Efficiently](https://developer.xamarin.com/recipes/android/resources/general/load_large_bitmaps_efficiently).
<a name="inbox-style" />
### Inbox Style
@ -980,7 +969,6 @@ generate a continuous stream of new, mostly similar notifications. For
more information about this approach, see
[Summarize your notifications](http://developer.android.com/design/patterns/notifications.html#summarize_your_notifications).
<a name="configuring-metadata" />
## Configuring Metadata
@ -990,7 +978,6 @@ category. Android uses this information &mdash; along with user
preference settings &mdash; to determine how and when to display
notifications.
<a name="priority-settings" />
### Priority Settings
@ -1061,7 +1048,6 @@ notification:
Because the "Thought for the day" notification is a low-priority
notification, Android will not display it in Heads-up format.
<a name="visibility-settings" />
### Visibility Settings
@ -1104,7 +1090,6 @@ lockscreen is secure (i.e., secured via PIN, pattern, or password)
&ndash; if the lockscreen is not secure, the full content of the
notification is available on the lockscreen.
<a name="category-settings" />
### Category Settings
@ -1217,7 +1202,6 @@ activity from a notification. This sample code is explained in the
[Using Local Notifications in Xamarin.Android](~/android/app-fundamentals/notifications/local-notifications-walkthrough.md)
walkthrough.
<a name="notification-styles" />
### Notification Styles
@ -1237,7 +1221,6 @@ Similarly, your app can use `NotificationCompat.InboxStyle` and
`NotificationCompat.BigPictureStyle` for *Inbox* and *Image* styles,
respectively.
<a name="priority-and-category" />
### Notification Priority and Category
@ -1265,7 +1248,6 @@ this example code will call `SetCategory` only when it is available
&ndash; it will not call `SetCategory` when the API level is less than
21.
<a name="lockscreen-visibility" />
### Lockscreen Visibility
@ -1281,7 +1263,6 @@ if ((int) Android.OS.Build.Version.SdkInt >= 21) {
}
```
<a name="summary" />
## Summary

Просмотреть файл

@ -6,12 +6,11 @@ ms.assetid: 3C440714-43E3-4D31-946F-CA59DAB303E8
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Permissions In Xamarin.Android
<a name="overview" />
## Overview
@ -46,7 +45,7 @@ This document will discuss how to add permissions to a Xamarin.Android applicati
> [!NOTE]
> **Note:** It is possible that permissions for hardware may affect how the app is filtered by Google Play. For example, if the app requires permission for the camera, then Google Play will not show the app in the Google Play Store on a device that does not have a camera installed.
> It is possible that permissions for hardware may affect how the app is filtered by Google Play. For example, if the app requires permission for the camera, then Google Play will not show the app in the Google Play Store on a device that does not have a camera installed.
<a name="requirements" />
@ -55,7 +54,6 @@ This document will discuss how to add permissions to a Xamarin.Android applicati
It is strongly recommended that Xamarin.Android projects include the [Xamarin.Android.Support.Compat](https://www.nuget.org/packages/Xamarin.Android.Support.Compat/) NuGet package. This package will backport permission specific APIs to older versions of Android, providing one common interface without the need to constantly check the version of Android that the app is running on.
<a name="requesting_permissions" />
## Requesting System Permissions
@ -64,9 +62,8 @@ The first step in working with Android permissions is to declare the permissions
Apps that target Android 6.0 or higher cannot assume that because the user granted permission at some point in the past, that the permission will be valid the next time. An app that targets Android 6.0 must always perform a runtime permission check. Apps that target Android 5.1 or lower do not need to perform a run-time permission check.
> [!NOTE]
> **Note:** Applications should only request the permissions that they require.
> Applications should only request the permissions that they require.
<a name="declaring_permissions_in_the_manifest" />
### Declaring Permissions in the Manifest
@ -115,7 +112,6 @@ Xamarin.Android will automatically add some permissions at build time to Debug b
For apps that target Android 5.1(API level 22) or lower, there is nothing more that needs to be done. Apps that will run on Android 6.0 (API 23 level 23) or higher should proceed on to the next section on how to perform run time permission checks.
<a name="run_time_permission_checks" />
### Runtime Permission Checks in Android 6.0
@ -209,7 +205,6 @@ public override void OnRequestPermissionsResult(int requestCode, string[] permis
}
```
<a name="summary" />
## Summary

Просмотреть файл

@ -6,7 +6,7 @@ ms.assetid: AE5A864E-192D-475E-C731-99249C2E7D9E
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Alternate Resources
@ -302,7 +302,7 @@ As a result of this process, Android will use the drawable resources in the
resource directory `drawable-en-port-ldpi` for the device.
> [!NOTE]
> **Note:** The screen size qualifiers provide one exception to
> The screen size qualifiers provide one exception to
> this selection process. It is possible for Android to select resources that are
> designed for a smaller screen than what the current device provides. For
> example, a large screen device may use the resources provide for a normal sized

Просмотреть файл

@ -23,7 +23,6 @@ can read from by your application using
In this simple demo, we are going to add a text file asset to our
project, read it using `AssetManager`, and display it in a TextView.
<a name="Add_Asset_to_Project" />
## Add Asset to Project
@ -50,7 +49,6 @@ Visual Studio for Mac should have set the **Build Action** for this file to
Selecting the correct **BuildAction** ensures that the file will be
packaged into the APK at compile time.
<a name="Reading_Assets" />
## Reading Assets
@ -84,7 +82,6 @@ protected override void OnCreate (Bundle bundle)
}
```
<a name="Running_the_Application" />
## Running the Application

Просмотреть файл

@ -49,7 +49,6 @@ Resources folder:
Java would have. It is automatically created by the Xamarin.Android
tools and will be regenerated from time to time.
<a name="Creating_and_Accessing_Resources" />
## Creating and Accessing Resources
@ -87,7 +86,6 @@ Once resources have been added to a project, there are two ways to use
them in an application &ndash; programmatically (inside code) or from
XML files.
<a name="Referencing_Resources_Programmatically" />
## Referencing Resources Programmatically
@ -149,7 +147,6 @@ syntax:
(without the extension) or the value of the android:name attribute
for resources that are in an XML element.
<a name="Referencing_Resources_from_XML" />
## Referencing Resources from XML

Просмотреть файл

@ -6,7 +6,7 @@ ms.assetid: 762572F0-173A-D994-0510-8F36BEF3D487
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 09/20/2017
ms.date: 03/01/2018
---
# Default Resources
@ -21,12 +21,6 @@ resource type:
# [Visual Studio](#tab/vswin)
![Default resource files](default-resources-images/01-resource-files-vs.png)
# [Visual Studio for Mac](#tab/vsmac)
![Default resource files](default-resources-images/01-resource-files-xs.png)
-----
In the image above, the project has default values for drawable resources,
layouts, and values (XML files that contain simple values).
@ -51,8 +45,6 @@ A complete list of resource types is provided below:
the button may change color with each change in state. The list is
expressed in a state list.
# [Visual Studio](#tab/vswin)
- **drawable** &ndash; Drawable resources are a general
concept for graphics that can be compiled into the application and
then accessed by API calls or referenced by other XML resources.
@ -61,9 +53,61 @@ A complete list of resource types is provided below:
[Nine-Patches](https://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch),
state lists, generic shapes defined in XML, etc.
- **layout** &ndash; XML files that describe a user interface layout,
such as an activity or a row in a list.
- **menu** &ndash; XML files that describe application menus such as
*Options Menus*, *Context Menus*, and *submenus*. For an example of
menus, see the
[Popup Menu Demo](https://developer.xamarin.com/samples/monodroid/PopupMenuDemo/) or the
[Standard Controls](https://developer.xamarin.com/samples/mobile/StandardControls/) sample.
- **raw** &ndash; Arbitrary files that are saved in their raw, binary
form. These files are compiled into an Android application in a
binary format.
- **values** &ndash; XML files that contain simple values. An XML file
in the values directory does not define a single resource, but
instead can define multiple resources. For example one XML file may
hold a list of string values, while another XML file may hold a list
of color values.
- **xml** &ndash; XML files that are similar in function to the .NET
configuration files. These are arbitrary XML that can be read at run
time by the application
# [Visual Studio for Mac](#tab/vsmac)
- **font** &ndash; Starting in API level 26, it is possible to embed fonts as a resource in an Android application. The Support Library 26 will backport fonts to API level 14. Embedding fonts allows applications to
![Default resource files](default-resources-images/01-resource-files-xs.png)
In the image above, the project has default values for drawable resources,
layouts, and values (XML files that contain simple values).
A complete list of resource types is provided below:
- **animator** &ndash; XML files that describe property animations.
Property animations were introduced in API level 11 (Android 3.0)
and provides for the animation of properties on an object. Property
animations are a more flexible and powerful way to describe
animations on any type of object.
- **anim** &ndash; XML files that describe *tween* animations. Tween
animations are a series of animation instructions to perform
transformations on the contents of a View object, or example,
rotation an image or growing the size of text. Tween animations are
limited to only View objects.
- **color** &ndash; XML files that describe a state list of colors. To
understand color state lists, consider a UI widget such as a Button.
It may make have different states such as pressed or disabled, and
the button may change color with each change in state. The list is
expressed in a state list.
- **font** &ndash; Starting in API level 26, it is possible to embed
fonts as a resource in an Android application. The Support Library
26 will backport fonts to API level 14. Embedding fonts allows
applications to
- **mipmap** &ndash; Drawable resources are a general
concept for graphics that can be compiled into the application and
@ -73,8 +117,6 @@ A complete list of resource types is provided below:
[Nine-Patches](https://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch),
state lists, generic shapes defined in XML, etc.
-----
- **layout** &ndash; XML files that describe a user interface layout,
such as an activity or a row in a list.
@ -97,3 +139,5 @@ A complete list of resource types is provided below:
- **xml** &ndash; XML files that are similar in function to the .NET
configuration files. These are arbitrary XML that can be read at run
time by the application
-----

Просмотреть файл

@ -6,12 +6,11 @@ ms.assetid: 3F543FC5-FDED-47F8-8D2C-481FCC98BFDA$
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 01/30/2018
ms.date: 03/01/2018
---
# Fonts
<a name="overview" />
## Overview
@ -56,7 +55,6 @@ As long as fonts are provided to an Android application in a proper way, they ca
This guide will first discuss how to use fonts as an Android resource, and then move on to discuss how to download fonts at runtime.
<a name="fonts_as_a_resource" />
## Fonts as a Resource
@ -135,7 +133,6 @@ Once a font family has been defined, it can be used declaratively by setting the
/>
```
<a name="programatically_assigning_fonts" />
### Programmatically Assigning Fonts
@ -154,7 +151,6 @@ var typeface = Typeface.Create("<FONT FAMILY NAME>", Android.Graphics.TypefaceSt
textView1.Typeface = typeface;
```
<a name="downloading_fonts" />
## Downloading Fonts
@ -198,7 +194,6 @@ The `font-family` element contains the following attributes, declaring the infor
Once the fonts are defined, it may be necessary to provide information about the _font certificates_ involved with the download.
<a name="font_certificates" />
### Font Certificates
@ -228,7 +223,6 @@ For example, the following XML is named **Resources/values/fonts_cert.xml** and
With these resource files in place, the app is capable of downloading the fonts.
<a name="downloadable_font_resource_declaration" />
### Declaring Downloadable Fonts as Resources
@ -249,7 +243,6 @@ To download these fonts, they have to be declared in **AndroidManifest.XML** by
<meta-data android:name="downloadable_fonts" android:resource="@array/downloadable_fonts" />
```
<a name="programatically_downloading_fonts" />
### Downloading a Font with the Font APIs
@ -322,10 +315,6 @@ public class FontDownloadHelper : FontsContractCompat.FontRequestCallback
}
}
/// <summary>
/// EventArg when a font has been downloaded.
/// </summary>
public class FontDownloadEventArg : EventArgs
{
public FontDownloadEventArg(Android.Graphics.Typeface typeface)
@ -356,7 +345,6 @@ fontHelper.FontDownloaded += (object sender, FontDownloadEventArg e) =>
fontHelper.DownloadFonts(this); // this is an Android Context instance.
```
<a name="summary" />
## Summary

Просмотреть файл

@ -14,7 +14,6 @@ ms.date: 02/01/2018
_This article introduces the concept of Android resources in Xamarin.Android and will document how to use them. It covers how to use resources in your Android application to support application localization, and multiple devices including varying screen sizes and densities._
<a name="Overview" />
## Overview

Просмотреть файл

@ -6,7 +6,7 @@ ms.assetid: 3D17DE45-115C-7192-5685-44F8EEE07DCC
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 10/12/2017
ms.date: 03/01/2018
---
# Creating Resources for Varying Screens
@ -18,7 +18,6 @@ in a sub-optimal user experience. For example, images may appear blurry, images
may occupy too much (or not enough) screen space which causes the position of UI
elements in the layout will overlap or be too far apart.
<a name="Concepts" />
## Concepts
@ -59,7 +58,6 @@ To help deal with this complexity, the Android framework prefers to use
independent pixels, UI elements will appear to the user to have the
same physical size on screens with different densities.
<a name="Supporting_Various_Screen_Sizes_and_Densities" />
## Supporting Various Screen Sizes and Densities
@ -78,7 +76,6 @@ with the higher resolution or density images and then scale down. This
will prevent any blurring or distortion that may result from the
resizing.
<a name="Declare_the_Screen_Size_the_Application_Supports" />
### Declare the Screen Size the Application Supports
@ -102,30 +99,24 @@ To do this in Xamarin.Android, it is necessary to first add an
[![Android Manifest](resources-for-varying-screens-images/01-android-manifest-vs-sml.png)](resources-for-varying-screens-images/01-android-manifest-vs.png)
# [Visual Studio for Mac](#tab/vsmac)
[![Android Manifest](resources-for-varying-screens-images/01-android-manifest-xs-sml.png)](resources-for-varying-screens-images/01-android-manifest-xs.png)
-----
**AndroidManifest.xml** is added to the **Properties** directory. The file
is then edited to include
[supports-screens](http://developer.android.com/guide/topics/manifest/supports-screens-element.html):
# [Visual Studio](#tab/vswin)
[![Adding supports-screens](resources-for-varying-screens-images/02-adding-supports-screens-vs-sml.png)](resources-for-varying-screens-images/02-adding-supports-screens-vs.png)
# [Visual Studio for Mac](#tab/vsmac)
[![Android Manifest](resources-for-varying-screens-images/01-android-manifest-xs-sml.png)](resources-for-varying-screens-images/01-android-manifest-xs.png)
**AndroidManifest.xml** is added to the **Properties** directory. The file
is then edited to include
[supports-screens](http://developer.android.com/guide/topics/manifest/supports-screens-element.html):
[![Adding supports-screens](resources-for-varying-screens-images/02-adding-supports-screens-xs-sml.png)](resources-for-varying-screens-images/02-adding-supports-screens-xs.png)
-----
<a name="Provide_Alternate_Layouts_for_Different_Screen_Sizes" />
### Provide Alternate Layouts for Different Screen Sizes
Although Android will resize according the screen size, this may not be
@ -208,7 +199,6 @@ qualifiers as shown in the following screen shot:
-----
<a name="Provide_Different_Bitmaps_for_Different_Screen_Densities" />
### Provide Different Bitmaps for Different Screen Densities
@ -228,7 +218,6 @@ resources:
![Screenshots with density-specific resources](resources-for-varying-screens-images/07-density-specific-resources.png)
<a name="Create_Varying_Density_Resources_with_Android_Asset_Studio" />
### Create Varying Density Resources with Android Asset Studio
@ -244,7 +233,6 @@ common screen densities by providing one image. Android Asset Studio
will then create the bitmaps with some customizations and then allow
them to be downloaded as a zip file.
<a name="Tips_for_Multiple_Screens" />
## Tips for Multiple Screens
@ -287,7 +275,6 @@ tips can help minimize the effort necessary to support various devices:
density-independent units are best reserved for when specifying the
margins and padding of UI elements.
<a name="Testing_Multiple_Screens" />
## Testing Multiple Screens

Просмотреть файл

@ -6,7 +6,7 @@ ms.assetid: 405A1FA0-4EFA-4AEB-B672-F36307B9CF16
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Touch in Android
@ -51,7 +51,7 @@ respond to a touch event:
> [!NOTE]
> **Note:** Not all Android devices support touch screens.
> Not all Android devices support touch screens.
Adding the following tag to your manifest file causes Google Play to
only display your app to those devices that are touch enabled:

Просмотреть файл

@ -237,7 +237,7 @@ foreach (var s in stocksStartingWithA) {
```
> [!NOTE]
> **Note:** When writing SQL statements directly you create a
> When writing SQL statements directly you create a
> dependency on the names of tables and columns in your database, which
> have been generated from your classes and their attributes. If you
> change those names in your code you must remember to update any

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: E5314D7F-2AAC-40DA-BEBA-27C834F078DD
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 03/29/2017
ms.date: 03/01/2018
---
# Firebase Cloud Messaging
@ -22,7 +22,6 @@ server, and it provides a step-by-step procedure for acquiring
credentials so that your app can use FCM services.
<a name="overview" />
## Overview
@ -49,7 +48,6 @@ information about the different types of Firebase messages, see
[About FCM Messages](https://firebase.google.com/docs/cloud-messaging/concept-options).
<a name="inaction" />
## Firebase Cloud Messaging in Action
@ -144,7 +142,6 @@ detects this and automatically notifies the app server to delete the
registration token.
<a name="downstream" />
### Downstream Messaging
@ -177,9 +174,6 @@ For detailed information about receiving downstream FCM messages on
Android, see
[Remote Notifications with FCM](~/android/data-cloud/google-messaging/remote-notifications-with-fcm.md).
<a name="topic" />
### Topic Messaging
*Topic Messaging* makes it possible for an app server to send a message
@ -262,7 +256,6 @@ project to receive FCM push notification messages on Android, see
[Remote Notifications with FCM](~/android/data-cloud/google-messaging/remote-notifications-with-fcm.md).
<a name="furtherreading" />
## For Further Reading
@ -278,7 +271,6 @@ project to receive FCM push notification messages on Android, see
explain and define the Extensible Messaging and Presence Protocol (XMPP).
<a name="summary" />
## Summary

Просмотреть файл

@ -21,7 +21,6 @@ Messaging routes messages between your app and an app server, and it
provides a step-by-step procedure for acquiring credentials so that
your app can use GCM services.
<a name="overview" />
## Overview
@ -44,7 +43,6 @@ For information about implementing an app server for GCM, see
[About GCM Connection Server](https://developers.google.com/cloud-messaging/server).
<a name="inaction" />
## Google Cloud Messaging in Action
@ -100,7 +98,6 @@ The following sections explain how these credentials are used when
client apps communicate with app servers through GCM.
<a name="registration" />
### Registration with GCM
@ -137,7 +134,6 @@ unregistration and unsubscription, and it describes the process of
unregistration when a client app is uninstalled.
<a name="downstream" />
### Downstream Messaging
@ -166,8 +162,6 @@ downstream GCM messages on Android, see
[Remote Notifications](~/android/data-cloud/google-messaging/remote-notifications-with-gcm.md).
<a name="topic" />
#### Topic Messaging
*Topic Messaging* is a type of downstream messaging where the app
@ -182,7 +176,6 @@ explains how to send messages from an app server to multiple devices
that subscribe to a particular topic.
<a name="group" />
#### Group Messaging
@ -197,8 +190,6 @@ explains how app servers can send a single message to multiple client
app instances running on devices that belong to a group.
<a name="upstream" />
### Upstream Messaging
If your client app connects to a server that supports
@ -236,7 +227,6 @@ credentials for access to Google's GCM servers. The following sections
describe the steps required to complete this process:
<a name="googleservices" />
### Enable Google Services for Your App
@ -277,7 +267,6 @@ describe the steps required to complete this process:
provides useful guidelines for protecting your API Key.
<a name="projectsettings" />
### View Your Project Settings
@ -296,7 +285,6 @@ To view the **API key**, click **API Manager** and then click **Credentials**:
[![Viewing the API key](google-cloud-messaging-images/11-view-credentials-sml.png)](google-cloud-messaging-images/11-view-credentials.png)
<a name="furtherreading" />
## For Further Reading
@ -310,7 +298,6 @@ To view the **API key**, click **API Manager** and then click **Credentials**:
the Extensible Messaging and Presence Protocol (XMPP).
<a name="summary" />
## Summary

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: 4D7C5F46-C997-49F6-AFDA-6763E68CDC90
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Remote Notifications with Firebase Cloud Messaging
@ -635,7 +635,7 @@ the device (or emulator) and repeat the above steps.
> [!NOTE]
> **Note:** if you force-close the app, FCM will stop delivering
> If you force-close the app, FCM will stop delivering
> notifications. Android prevents background service broadcasts from
> inadvertently or unnecessarily launching components of stopped
> applications. (For more information about this behavior, see
@ -822,7 +822,7 @@ Log.Debug(TAG, "Notification Message Body: " + message.GetNotification().Body);
```
> [!NOTE]
> **Note:** If you set breakpoints in `FirebaseMessagingService`,
> If you set breakpoints in `FirebaseMessagingService`,
> your debugging session may or may not hit these breakpoints because of
> how FCM delivers messages.

Просмотреть файл

@ -843,7 +843,6 @@ build **MessageSender** and open a console window where we can
run it from the command line.
<a name="tryit" />
### Try It!

Просмотреть файл

@ -59,7 +59,6 @@ script these steps using
[Rake](http://martinfowler.com/articles/rake.html).
<a name="Setting_android_versionCode" />
### Creating the Version Code for the APK
@ -127,7 +126,6 @@ the developer. The process of calculating the correct
An example of how to do so will be covered in the walkthrough at the
end of this document.
<a name="CreatingAndroidManifest" />
### Create A Temporary AndroidManifest.XML
@ -183,7 +181,6 @@ The following list explains each command line parameter:
the Xamarin.Android project.
<a name="SignAndZipAlign" />
### Sign and Zipalign The APK
@ -203,7 +200,6 @@ run on a device. This is the format of the command line to use:
zipalign -f -v 4 <SIGNED_APK_TO_ZIPALIGN> <PATH/TO/ZIP_ALIGNED.APK>
```
<a name="Automating_APK_Creation_With_Rake" />
## Automating APK Creation With Rake

Просмотреть файл

@ -6,12 +6,11 @@ ms.assetid: 3BE5EE1E-3FF6-4E95-7C9F-7B443EE3E94C
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/15/2018
ms.date: 03/01/2018
---
# Build Process
<a name="Overview" />
## Overview
@ -23,8 +22,6 @@ supporting the `AndroidAsset`, `AndroidResource`, and other
[Android-callable wrappers](~/android/platform/java-integration/android-callable-wrappers.md),
and generating a `.apk` for execution on Android devices.
<a name="App_Packaging" />
<a name="Application_Packages" />
## Application Packages
@ -40,7 +37,6 @@ In broad terms, there are two types of Android application packages
Not coincidentally, these match the MSBuild `Configuration` which
produces the package.
<a name="Shared_Runtime" />
### Shared Runtime
@ -74,7 +70,6 @@ Fast deployment is enabled by default, and may be disabled in Debug builds
by setting the `$(EmbedAssembliesIntoApk)` property to `True`.
<a name="MSBuild_Projects" />
## MSBuild Projects
@ -114,7 +109,6 @@ The following build targets are defined for Xamarin.Android projects:
`Resource.designer.cs` file. This target is usually called by the
IDE when new resources are added to the project.
<a name="Build_Properties" />
## Build Properties
@ -180,7 +174,6 @@ Install properties control the behavior of the `Install` and
MSBuild /t:Install ProjectName.csproj /p:AdbTarget=-e
```
<a name="App_Packaging" />
### Packaging Properties
@ -631,8 +624,6 @@ The following MSBuild properties are used with
The default value will change in a future release.
<a name="Resgen" />
<a name="Resource_Properties" />
### Resource Properties
@ -665,7 +656,6 @@ resources.
**Experimental**. Added in Xamarin.Android 7.0.
<a name="Signing" />
<a name="Signing_Properties" />
### Signing Properties
@ -754,15 +744,12 @@ multiple files, and they will be evaluated in no particular order (so don't
specify the same environment variable or system property in multiple
files).
<a name="Java_Interop_Support" />
<a name="AndroidJavaSource" />
### AndroidJavaSource
Files with a Build action of `AndroidJavaSource` are Java source code which
will be included in the final Android package.
<a name="AndroidJavaLibrary" />
### AndroidJavaLibrary
@ -770,8 +757,6 @@ Files with a Build action of `AndroidJavaLibrary` are Java
Archives ( `.jar` files) which will be included in the final Android
package.
<a name="Resources" />
<a name="AndroidResource" />
### AndroidResource
@ -818,8 +803,6 @@ distinct resource names.
</ItemGroup>
```
<a name="Native_Library_Support" />
<a name="AndroidNativeLibrary" />
### AndroidNativeLibrary
@ -880,7 +863,6 @@ These files are ignored unless the `$(EnableProguard)` MSBuild property
is `True`.
<a name="Target_Definitions" />
## Target Definitions

Просмотреть файл

@ -11,7 +11,6 @@ ms.date: 02/05/2018
# Debuggable Attribute
<a name="Overview" />
To make debugging possible, Android supports the Java Debug Wire Protocol (JDWP). This is a technology that allows tools such as ADB to communicate with a JVM. While JDWP is important during development, it should be disabled prior to the applicaiton being published.

Просмотреть файл

@ -46,7 +46,6 @@ device selection, a way to clear log entries, a search box, and
play/stop/pause buttons.
<a name="Accessing_from_the_Command_Line" />
## Accessing from the Command Line
@ -67,7 +66,6 @@ only emulator running.
More commands can be found by just running **adb**.
<a name="Writing_to_the_Debug_Log" />
## Writing to the Debug Log
@ -91,7 +89,6 @@ W/myapp (11103): this is a warning message
E/myapp (11103): this is an error message
```
<a name="Interesting_Messages" />
## Interesting Messages

Просмотреть файл

@ -14,7 +14,6 @@ ms.date: 02/16/2018
_This guide explains how to use the Google Android SDK Emulator with Visual Studio._
<a name="overview" />
## Overview
@ -24,7 +23,6 @@ configurations is created as a _virtual device_. In this guide, you
will learn how to launch the emulator from Visual Studio and how to
troubleshoot common problems.
<a name="sections" />
## Sections
@ -41,7 +39,6 @@ creating new virtual devices, see
[Android Emulator Setup](~/android/get-started/installation/android-emulator/index.md).
<a name="summary" />
## Summary

Просмотреть файл

@ -134,7 +134,6 @@ unknown reason. To help resolve this error, see
-----
<a name="solutions" />
## Solutions to Common Problems
@ -143,7 +142,6 @@ configuring changes to your computer or by installing additional
software. The following sections describe these issues and provide
solutions.
<a name="deployment" />
### Deployment Issues
@ -178,7 +176,6 @@ steps:
emulator again.
<a name="haxm-issues" />
### HAXM Issues
@ -210,7 +207,6 @@ such as Hyper-V, Windows Device Guard, and some antivirus software:
or uninstall this software, reboot, and retry the Android SDK
Emulator.
<a name="bios" />
#### Incorrect BIOS Settings

Просмотреть файл

@ -22,7 +22,6 @@ occur on a device, it must be
[setup for development](~/android/get-started/installation/set-up-device-for-development.md)
and connected to your PC or Mac.
<a name="Debug_Application" />
## Debug Application
@ -68,7 +67,6 @@ application:
-----
<a name="Summary" />
## Summary

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: CD128CB9-499F-4558-B49F-77248824EFDF
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Visual Studio Android Emulator
@ -32,8 +32,6 @@ profiles* (similar to device definitions in the default Android SDK
emulator) to simulate different types of Android devices. Finally, a
troubleshooting section explains common pitfalls and workarounds.
<a name="requirements" />
## Requirements
To run the emulator, the computer must meet the requirements to run
@ -49,8 +47,6 @@ potential problems with HAXM, see
[HAXM Virtualization Conflicts](~/android/deploy-test/debugging/android-sdk-emulator/troubleshooting.md#virt-conflicts).
<a name="launching" />
## Running the Emulator
Visual Studio makes several
@ -154,7 +150,6 @@ For more information about how to use these features, see
[Introducing Visual Studio's Emulator for Android](https://blogs.msdn.microsoft.com/visualstudioalm/2014/11/12/introducing-visual-studios-emulator-for-android/).
<a name="device_profiles" />
## Configuring Device Profiles
@ -200,8 +195,6 @@ This list can be shortened by clicking **Uninstall this profile** in the
currently no way to create a customized device profile in this emulator.
<a name="troubleshooting" />
## Troubleshooting
This section describes some common errors and workarounds when using the
@ -236,7 +229,6 @@ Use the following steps to make this change:
4. Click **OK** and close the Hyper-V Manager window.
<a name="app_fail" />
### App deploys and starts but fails immediately
@ -247,7 +239,6 @@ processor and the Hyper-V virtual machine. To resolve this error,
follow the instructions in
[The Emulator will not start](#cant_connect) (above).
<a name="mscorlib" />
### Emulator stops with the diagnostic message: **libaot-mscorlib.dll.so not found**
@ -262,7 +253,6 @@ To resolve this error, use the following steps to disable fast deployment:
[ ![Use Fast Deployment option unchecked](visual-studio-android-emulator-images/18-fast-deployment-vs-sml.png)](visual-studio-android-emulator-images/18-fast-deployment-vs.png)
<a name="dragndrop" />
### Drag and Drop does not work
@ -272,7 +262,6 @@ with Administrator privilege), drag and drop of .APK or .ZIP files may
not work. To work around this problem, run *Visual Studio Emulator for
Android* without elevated permissions (i.e., not as Administrator).
<a name="other" />
### Other errors
@ -282,7 +271,6 @@ complete guide to Visual Studio Android Emulator troubleshooting, see
[Troubleshooting the Visual Studio Emulator for Android](https://msdn.microsoft.com/en-us/library/mt228282.aspx).
<a name="summary" />
## Summary

Просмотреть файл

@ -57,7 +57,6 @@ Xamarin.Android supports the `XA_HTTP_CLIENT_HANDLER_TYPE` variable,
which may be set either via `adb shell setprop debug.mono.env` or via
the `$(AndroidEnvironment)` Build action.
<a name="XA_HTTP_CLIENT_HANDLER_TYPE" />
### `XA_HTTP_CLIENT_HANDLER_TYPE`

Просмотреть файл

@ -60,7 +60,6 @@ For example, the [Hello, Android](https://developer.xamarin.com/samples/HelloM4A
Linking results in a package that is 30% the size of the original
(unlinked) package in 1.2.0, and 18% of the unlinked package in 4.0.1.
<a name="Control" />
## Control
@ -86,7 +85,6 @@ public class MyActivity {
}
```
<a name="Linker_Behavior" />
### Linker Behavior
@ -132,7 +130,6 @@ E/mono (17755): at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (Int
E/mono (17755): at (wrapper dynamic-method) object:95bb4fbe-bef8-4e5b-8e99-ca83a5d7a124 (intptr,intptr,intptr)
```
<a name="PreserveAttribute" />
### Preserving Code
@ -213,7 +210,6 @@ namespace Android.Runtime
```
<a name="falseflag" />
### falseflag
@ -241,7 +237,6 @@ class MyActivity {
```
<a name="linkskip" />
### linkskip
@ -254,7 +249,6 @@ be linked at all, while allowing other user assemblies to be skipped with the *L
</PropertyGroup>
```
<a name="LinkDescription" />
### LinkDescription
@ -265,7 +259,6 @@ file. Custom linker configuration files may be required to preserve
`internal` or `private` members that need to be preserved.
<a name="Custom_Attributes" />
### Custom Attributes

Просмотреть файл

@ -14,7 +14,6 @@ ms.date: 02/05/2018
_Android can run on several different computer architectures. This document discusses the different CPU architectures that may be employed for a Xamarin.Android application. This document will also explain how Android applications are packaged to support different CPU architectures. The Application Binary Interface (ABI) will be introduced, and guidance will be provided regarding which ABIs to use in a Xamarin.Android application._
<a name="Overview" />
## Overview
@ -67,14 +66,12 @@ there is an `armeabi-v7a` directory present and the device is an
> [!NOTE]
> **Note**: Xamarin.Android will ensure that `.so` are added to the APK in the correct order. This bug should not be an issue for users of Xamarin.Android.
<a name="ABI_Descriptions" />
### ABI Descriptions
Each ABI supported by Android is identified by a unique name.
<a name="armeabi" />
#### armeabi
@ -91,7 +88,6 @@ below). Using `aremabi` code on a single-core `armeabi-v7a` device is
safe.
<a name="armeabi-v7a" />
#### armeabi-v7a
@ -104,7 +100,6 @@ performance improvements over an application that uses `armeabi`.
**Note:** `armeabi-v7a` machine code will not run on ARMv5 devices.
<a name="arm64-v8a" />
#### arm64-v8a
@ -115,7 +110,6 @@ this architecture (for more information, see
[Experimental Features](https://developer.xamarin.com/releases/android/xamarin.android_5/xamarin.android_5.1/#Experimental_Features)).
<a name="x86" />
#### x86
@ -131,10 +125,8 @@ extensions such as:
**Note:** Google TV, although it runs on x86, is not supported by Android's NDK or
by Xamarin.Android. <a name="mips" />
<a name="x86_64" />
#### x86_64
@ -154,7 +146,6 @@ supported by Android.
but will be in a future release.
<a name="APK_File_Format" />
#### APK File Format
@ -192,7 +183,6 @@ A quick description of the contents of the `.apk` file:
> **Note**: The file `libmonodroid.so` is the native library required by all Xamarin.Android applications.
<a name="Android_Device_ABI_Support" />
#### Android Device ABI Support
@ -210,7 +200,6 @@ For example, a typical ARMv5TE device will only have a primary ABI of
`armeabi-v7a` and a secondary ABI of `armeabi`. A typical x86 device
would only specify a primary ABI of `x86`.
<a name="Android_Native_Library_Installation" />
### Android Native Library Installation
@ -347,7 +336,6 @@ $APP/lib/libone.so # from armeabi
$APP/lib/libtwo.so # from armeabi-v7a
```
<a name="Xamarin.Android_and_ABIs" />
### Xamarin.Android and ABIs
@ -371,7 +359,6 @@ Xamarin.Android 5.1, see
Xamarin.Android does not currently provide support for `mips`.
<a name="Declaring_Supported_ABIs" />
### Declaring Supported ABI's

Просмотреть файл

@ -16,7 +16,6 @@ section covers the steps involved with the public distribution of an application
created with Xamarin.Android via channels such as e-mail, a private web server,
Google Play, or the Amazon App Store for Android.
<a name="Overview" />
## Overview

Просмотреть файл

@ -15,7 +15,6 @@ It is possible to publish an application without using any of the
existing Android marketplaces. This section will explain these other
publishing methods and the licensing levels of Xamarin.Android.
<a name="Xamarin_Licensing" />
## Xamarin Licensing
@ -38,7 +37,6 @@ Visit the [visualstudio.com](https://www.visualstudio.com/xamarin/) to download
Community Edition or to learn more about purchasing the Professional
and Enterprise editions.
<a name="Allow_Installation_from_Unknown_Sources" />
## Allow Installation from Unknown Sources
@ -56,7 +54,6 @@ Security**, as shown in the following diagram:
> **Note:** Some network providers might prevent the installation of applications from unknown sources, regardless of this setting.
<a name="Publishing_by_E-Mail" />
## Publishing by E-Mail
@ -72,7 +69,6 @@ against piracy or unauthorized distribution. It is best reserved for
situations where the recipients of the application are few, and they
are trusted not to distribute the application.
<a name="Publishing_by_Web" />
## Publishing by Web
@ -82,7 +78,6 @@ providing a download link to users. When an Android-powered device
browses to a link and then downloads the application, that application
will automatically be installed once the download is complete.
<a name="Manually_Installing_an_APK" />
## Manually Installing an APK

Просмотреть файл

@ -21,7 +21,6 @@ Amazon does not limit the size of APKs. However, if an APK is larger than
30MB, then it will use FTP for distribution rather than the Amazon Mobile App
Distribution Portal.
<a name="Submitting_Apps:_Binary_Info" />
## Submitting Apps: Binary Info
@ -36,7 +35,6 @@ by Amazon require the following assets:
- Updates to five videos may be provided.
<a name="Approval_Process" />
## Approval Process

Просмотреть файл

@ -44,7 +44,6 @@ Google play does not allow an expansion file to be uploaded to an existing APK
or for existing APKs to be updated. If it is necessary to update an expansion
file, then a new APK must be uploaded with the `versionCode` updated.
<a name="Expansion_File_Storage" />
## Expansion File Storage
@ -80,7 +79,6 @@ zip file, media playback calls may directly use files in the zip
without having to unpack the zip file. The media files should not be
compressed when added to the zip file.
<a name="FileName_Format" />
### FileName Format
@ -99,7 +97,6 @@ The three components of this scheme are:
For example, if the APK version is 21, and the package name is `mono.samples.helloworld`, the
main expansion file will be named **main.21.mono.samples.helloworld**.
<a name="Download_Process" />
## Download Process
@ -141,7 +138,6 @@ download:
- Errors that occur during the download are gracefully handled and recoverable.
<a name="Architectural_Overview" />
## Architectural Overview

Просмотреть файл

@ -53,7 +53,6 @@ Google Licensing service is also a key component of APK expansion files
Licensing services to obtain the URLs of the expansion files that will be
downloaded.
<a name="Requirements" />
## Requirements

Просмотреть файл

@ -22,7 +22,6 @@ and advertise your application, guidelines for rating your application on Google
Play, and using filters to restrict the deployment of an application to certain
devices.
<a name="Requirements" />
## Requirements
@ -44,7 +43,6 @@ Google Play is not globally available. Some locations may not be supported
for the distribution of applications.
<a name="Becoming_a_Publisher" />
## Becoming a Publisher
@ -67,7 +65,6 @@ lists of countries can be found in the following links:
1. [Supported Locations for distribution to Google Play users](https://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&amp;answer=138294) &ndash; This is a list of all countries where applications may be distributed.
<a name="Preparing_Promotional_Assets" />
### Preparing Promotional Assets
@ -77,7 +74,6 @@ graphics, and video to be submitted. Google Play will then use those assets to
advertise and promote the application.
<a name="Launcher_Icons" />
#### Launcher Icons
@ -110,7 +106,6 @@ Tips for Launcher Icons:
alpha channel, and should not be full-framed images.
<a name="High_Resolution_Application_Icon" />
#### High Resolution Application Icons
@ -128,7 +123,6 @@ is a helpful tool for creating suitable launcher icons and the
high-resolution application icon.
<a name="Screen_shots" />
#### Screen Shots
@ -142,7 +136,6 @@ The specs for screen shots are:
1. 320w x 480h or 480w x 800h or 480w x 854h. Landscaped images will be cropped.
<a name="Promotional_Graphic" />
#### Promotional Graphic
@ -152,7 +145,6 @@ This is an optional image used by Google Play:
1. No border in art.
<a name="Feature_Graphic" />
#### Feature Graphic
@ -164,7 +156,6 @@ alone without an application icon.
1. This graphic may be scaled down: use large text and keep graphics simple.
<a name="Video_Link" />
#### Video Link
@ -173,7 +164,6 @@ be 30 seconds to 2 minutes in length and showcase the best parts of your
application.
<a name="pubgp" />
### Publishing to Google Play

Просмотреть файл

@ -11,14 +11,12 @@ ms.date: 02/15/2018
# Manually Uploading the APK
<a name="Uploading_the_APK" />
The first time an APK is submitted to Google Play (or if an early
version of Xamarin.Android is used) the APK must be manually uploaded
through the [Google Play Developer Console](https://play.google.com/apps/publish).
This guide explains the steps required for this process.
<a name="devconsole" />
## Google Play Developer Console
@ -71,7 +69,6 @@ After the APK is uploaded, it is saved as a draft. It cannot be
published until more details are provided to Google Play as described
next.
<a name="Listing_Details" />
## Store Listing
@ -81,7 +78,6 @@ of the application:
[ ![Store Listing dialog](manually-uploading-the-apk-images/07-store-listing-sml.png)](manually-uploading-the-apk-images/07-store-listing.png)
<a name="Upload_Assets" />
### Graphics Assets
@ -94,7 +90,6 @@ All of the promotional assets that were prepared earlier are uploaded in
this section. Guidance is provided as to what promotional assets must
be provided and what format they should be provided in.
<a name="categorization" />
### Categorization
@ -104,7 +99,6 @@ After the **GRAPHICS ASSETS** section is a **CATEGORIZATION** section, select th
Content rating is covered after the next section.
<a name="contact_details" />
### Contact Details
@ -116,7 +110,6 @@ the application:
It is possible to provide a URL for the privacy policy of the App in the **PRIVACY POLICY** section, as indicated above.
<a name="content_rating" />
## Content Rating
@ -158,7 +151,6 @@ The items in the Medium maturity list are subjective, as such it is
possible that a guideline that may seem to dictate a Medium maturity
rating may be intense enough to warrant a High maturity rating.
<a name="pricing_and_distribution" />
## Pricing &amp; Distribution
@ -176,7 +168,6 @@ click **set up a merchant account** and follow the instructions.
[ ![Pricing and Distribution dialog](manually-uploading-the-apk-images/12-pricing-sml.png)](manually-uploading-the-apk-images/12-pricing.png)
<a name="manage_countries" />
### Manage Countries
@ -185,7 +176,6 @@ countries an app may be distibuted to:
[ ![Manage countries dialog](manually-uploading-the-apk-images/13-manage-countries-sml.png)](manually-uploading-the-apk-images/13-manage-countries.png)
<a name="other_information" />
### Other Information
@ -199,7 +189,6 @@ After this section are additional options that may be selected, such as
opting into **Designed for Families** and distributing the
app through Google Play for Education.
<a name="consent" />
### Consent
@ -215,7 +204,6 @@ For more information about publishing your app in Google Play,
see [Welcome to the Google Play Developer Console Help Center](https://support.google.com/googleplay/android-developer#topic=3450769).
<a name="Google_Play_Filters" />
## Google Play Filters

Просмотреть файл

@ -11,7 +11,6 @@ ms.date: 02/16/2018
# Preparing an Application for Release
<a name="Compile_the_Application_for_Release" />
After an application has been coded and tested, it is necessary to
prepare a package for distribution. The first task in preparing
@ -143,7 +142,6 @@ bytecode*. The build process first uses the Xamarin.Android linker to
optimize the app at the managed code (C#) level, and then it later uses
ProGuard (if enabled) to optimize the APK at the Java bytecode level.
<a name="Configure_the_Linker" />
### Configure the Linker
@ -210,7 +208,6 @@ The options for controlling the linker are as follows:
Linking can produce some unintended side effects, so it is important
that an application be re-tested in Release mode on a physical device.
<a name="proguard" />
### ProGuard
@ -382,7 +379,6 @@ configured for Release mode, and it is disabled by default. For more
information about AOT Compilation, see
[AOT](http://www.mono-project.com/docs/advanced/aot/).
<a name="llvm" />
#### LLVM Optimizing Compiler
@ -425,7 +421,6 @@ that determine how the app is
[how it is protected from tampering](#protect_app), and how it can be
packaged to support different architectures and size restrictions.
<a name="Specify_Supported_Architectures" />
### Specify Supported Architectures
@ -435,7 +430,6 @@ contain machine code to support multiple, different architectures. See
[CPU Architectures](~/android/app-fundamentals/cpu-architectures.md)
for details about supporting multiple CPU architectures.
<a name="multiabi" />
### Generate One Package (.APK) per Selected ABI
@ -446,7 +440,6 @@ rather than a single, large APK for all supported ABI's. This option is
available only when the project is configured for Release mode, and it
is disabled by default.
<a name="multidex" />
### Multi-Dex

Просмотреть файл

@ -7,14 +7,13 @@ ms.assetid: 29C0E850-3A49-4618-9078-D59BE0284D5A
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# ProGuard
_ProGuard is a Java class file shrinker, optimizer, obfuscator, and pre-verifier. It detects and removes unused code, analyzes and optimizes bytecode, then obfuscates classes and class members. This guide explains how ProGuard works, how to enable it in your project, and how to configure it. It also provides several examples of ProGuard configurations._
<a name="overview" />
## Overview
@ -52,7 +51,6 @@ section, Xamarin.Android ProGuard uses only a subset of these
steps.
<a name="xa_proguard" />
## ProGuard in Xamarin.Android
@ -75,7 +73,6 @@ two separate steps:
Each of these steps is described next.
<a name="linker" />
### Linker Step
@ -95,7 +92,6 @@ in Xamarin.Android, see
[Linking on Android](~/android/deploy-test/linker.md).)
<a name="proguard_step" />
### ProGuard Step
@ -103,7 +99,6 @@ After the linker step completes successfully, ProGuard is run to remove
unused Java bytecode. This is the step that optimizes the APK.
<a name="using" />
## Using ProGuard
@ -113,7 +108,6 @@ ProGuard configuration file, or you can create your own custom
configuration file for ProGuard to use.
<a name="enabling" />
### Enabling ProGuard
@ -138,7 +132,6 @@ section describes how to create a customized ProGuard configuration
file.
<a name="customizing" />
### Customizing ProGuard
@ -208,8 +201,6 @@ the `[Register]` custom attribute, see
[Working with JNI](~/android/platform/java-integration/working-with-jni.md).
<a name="options" />
### ProGuard Options
ProGuard offers a number of options that you can configure to provide
@ -251,7 +242,6 @@ The following options are *ignored* by Xamarin.Android:
- [Preverification Options](https://stuff.mit.edu/afs/sipb/project/android/sdk/android-sdk-linux/tools/proguard/docs/manual/usage.html#preverificationoptions)
<a name="nougat" />
## ProGuard and Android Nougat
@ -269,7 +259,6 @@ You can find all versions of ProGuard at the
[SourceForge page](https://sourceforge.net/projects/proguard/files/).
<a name="examples" />
## Example ProGuard Configurations
@ -339,7 +328,6 @@ Android app:
public static <fields>;
}
<a name="build" />
## ProGuard and the Xamarin.Android Build Process
@ -400,13 +388,8 @@ from the IDE:
C:\Program Files (x86)\Java\jdk1.8.0_92\\bin\java.exe -jar C:\Android\android-sdk\tools\proguard\lib\proguard.jar -include obj\Release\proguard\proguard_xamarin.cfg -include obj\Release\proguard\proguard_project_references.cfg -include obj\Release\proguard\proguard_project_primary.cfg "-injars 'obj\Release\proguard\__proguard_input__.jar';'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v7.0\mono.android.jar'" "-libraryjars 'C:\Android\android-sdk\platforms\android-25\android.jar'" -outjars "obj\Release\proguard\__proguard_output__.jar" -optimizations !code/allocation/variable
```
<a name="troubleshoot" />
## Troubleshooting
<a name="files" />
### File Issues
The following error message may be displayed when ProGuard reads its
@ -437,15 +420,12 @@ text editor that allows you to omit the BOM.
-----
<a name="other" />
### Other Issues
The ProGuard
[Troubleshooting](https://stuff.mit.edu/afs/sipb/project/android/sdk/android-sdk-linux/tools/proguard/docs/index.html#manual/troubleshooting.html)
page discusses common issues you may encounter (and solutions) when using ProGuard.
<a name="summary" />
## Summary

Просмотреть файл

@ -139,7 +139,6 @@ For more information about the keystore, see
-----
<a name="signapkvs" />
<a name="signingxs" />
## Sign the APK
@ -226,7 +225,6 @@ for more information about publishing an *ad-hoc* APK.
-----
<a name="nextsteps" />
## Next Steps

Просмотреть файл

@ -11,7 +11,6 @@ ms.date: 02/16/2018
# Manually Signing the APK
<a name="signing_legacy" />
After the application has been built for release, the APK must be signed prior to distribution so that it can be run on an Android device. This process is typically handled with the IDE, however there are some situations where it is necessary to sign the APK manually, at the command line. The following steps are involved with signing an APK:
@ -31,7 +30,6 @@ After the application has been built for release, the APK must be signed prior t
The order of the steps is important and is dependent on which tool used to sign the APK. When using **apksigner**, it is important to first **zipalign** the application, and then to sign it with **apksigner**. If it is necessary to use **jarsigner** to sign the APK, then it is important to first sign the APK and then run **zipalign**.
<a name="Prerequisites" />
## Prerequisites
@ -44,7 +42,6 @@ Build Tools must use **jarsigner** as described in
[Sign the APK with jarsigner](#Sign_the_APK_with_jarsigner) below.
<a name="Creating_a_Private_Keystore" />
## Create a Private Keystore
@ -76,7 +73,6 @@ or publically distributed, then it is possible for unofficial or
malicious versions of an application to be distributed.
<a name="Create_a_New_Keystore" />
### Create a New Keystore
@ -131,7 +127,6 @@ the &ndash; `list` option:
$ keytool -list -keystore xample.keystore
```
<a name="Zipalign_the_APK" />
## Zipalign the APK
@ -143,7 +138,6 @@ The follow command will use the signed APK and produce a signed, zipaligned APK
$ zipalign -f -v 4 mono.samples.helloworld-unsigned.apk helloworld.apk
```
<a name="Manually_Signing_the_APK" />
## Sign the APK

Просмотреть файл

@ -41,7 +41,6 @@ into Android architecture expands your understanding of how Android
applications are constructed by introducing the Android Application
Building Blocks and their functions.
<a name="AndroidApplicationBlocks" />
### Android Application Blocks
@ -101,7 +100,6 @@ sending Intents back and forth, you can get Blocks to coordinate complex
actions such as launching the camera app to take and save, gathering
location information, or navigating from one screen to the next.
<a name="AndroidManifestXML" />
### AndroidManifest.XML

Просмотреть файл

@ -552,7 +552,6 @@ This launches the application on the device:
[![Enter Phoneword](hello-android-deepdive-images/05-enter-phoneword-sml.png)](hello-android-deepdive-images/05-enter-phoneword.png)
<a name="densities" />
### Set Icons for Different Screen Densities

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: 0C0BBEC0-C84A-4558-B905-4EF81FCD62F9
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 12/22/2017
ms.date: 03/01/2018
---
# Google Emulator Manager
@ -23,7 +23,6 @@ devices for use by the Android SDK Emulator.
> [!NOTE]
> **Note:** If you are targeting Android 8.0 Oreo, you must use the [Xamarin Android Device Manager](~/android/get-started/installation/android-emulator/xamarin-device-manager.md) to create and configure virtual devices.
<a name="sysimg" />
## Installing System Images
@ -90,8 +89,6 @@ CPU/ABI choices during virtual device configuration (this is described
next).
<a name="virtualdevice" />
## Configuring Virtual Devices
# [Visual Studio](#tab/vswin)
@ -135,7 +132,6 @@ You can create new virtual device images with different device
characteristics and API levels &ndash; the next section explains how to
create custom device definitions and virtual devices.
<a name="custom-def" />
### Creating a Custom Device Definition
@ -235,7 +231,6 @@ menu:
-----
<a name="cloning" />
### Cloning a Device Definition

Просмотреть файл

@ -17,7 +17,6 @@ acceleration, Intel's HAXM (Hardware Accelerated Execution Manager) is
the recommended way to drastically improve the performance of the
Android SDK Emulator.
<a name="haxm-overview" />
## HAXM Overview
@ -43,7 +42,6 @@ Emulator.
> [!NOTE]
> **Note:** You cannot run HAXM on a virtual machine.
<a name="verify-haxm" />
## Verifying HAXM Installation

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: ECB327F3-FF1C-45CC-9FA6-9C11032BD5EF
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 01/25/2018
ms.date: 03/01/2018
---
# Xamarin Android Device Manager
@ -16,7 +16,6 @@ _The Xamarin Android Device Manager, currently in preview, replaces Google's leg
![Currently in preview](~/media/shared/preview.png)
<a name="overview" />
## Overview
@ -74,9 +73,6 @@ resolution), to enable/disable simulated sensors such as accelerometer,
GPS, orientation, and light sensor, and to configure the type of
hardware acceleration used by that virtual device.
<a name="requirements" />
## Requirements
# [Visual Studio](#tab/vswin)
@ -133,7 +129,6 @@ Use the following steps to install the Xamarin Android Device Manager:
-----
<a name="dev-manager" />
## Launching the Device Manager
@ -212,7 +207,6 @@ and re-launch the Android Device Manager.
-----
<a name="devices" />
## Main Screen
@ -271,7 +265,6 @@ the emulator:
-----
<a name="device-new" />
### New Device
@ -472,7 +465,6 @@ For more information about changing virtual device properties, see
[Profile Properties](#properties) later in this guide.
<a name="addopt" />
### Additional Options
@ -696,7 +688,6 @@ please file a bug report by clicking **Help > Generate Bug Report**:
-----
<a name="summary" />
## Summary

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: 9A857F52-2EC1-414F-8010-CEE67B60A4B4
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 01/24/2018
ms.date: 03/01/2018
---
# Android SDK Setup
@ -49,8 +49,6 @@ the Android SDK. Therefore, if you update to SDK Tools version 26.0.1
to manage the Android SDK via a UI interface, you must use the Xamarin
Android SDK Manager.
<a name="requirements" />
## Requirements
# [Visual Studio](#tab/vswin)
@ -86,8 +84,6 @@ if you are developing specifically for API level 23 or earlier.
> **Note:** Xamarin.Android does not support JDK 9.
<a name="installation" />
# [Visual Studio](#tab/vswin)
## Installation
@ -118,7 +114,6 @@ outside of Visual Studio to manage the Android SDK.
-----
<a name="sdk-manager" />
## SDK Manager
@ -155,7 +150,6 @@ following sections.
-----
<a name="sdkmanager-locations" />
# [Visual Studio](#tab/vswin)
@ -208,7 +202,6 @@ C++.
-----
<a name="sdkmanager-tools" />
### Tools Tab
@ -256,7 +249,6 @@ progress. After the installation completes, the **Tools** tab will show
that the selected tools and extras were installed.
<a name="xvs-platforms" />
### Platforms Tab
@ -363,7 +355,6 @@ Now you're ready to develop your app for the latest, greatest Android
API level!
<a name="summary" />
## Summary

Просмотреть файл

@ -32,7 +32,6 @@ computer for debugging:
Each of these steps will be covered in more detail in the sections
below.
<a name="EnableDebugging" />
## Enable Debugging on the Device
@ -41,7 +40,6 @@ application. However the device must be properly configured before
debugging can occur. The steps involved are slightly different,
depending on the version of Android running on the device.
<a name="EnableDebuggingAndroid4" />
### Android 4.0 to Android 4.1
@ -57,7 +55,6 @@ running Android 4.0.3:
[![Developer options](set-up-device-for-development-images/developer-options-sml.png)](set-up-device-for-development-images/developer-options.png)
<a name="EnableDebuggingAndroid42" />
### Android 4.2 and higher
@ -76,7 +73,6 @@ System**, open it to reveal developer settings:
This is the place to enable developer options such as USB debugging and
stay awake mode.
<a name="USB_Debugging" />
## Install USB Drivers
@ -98,7 +94,6 @@ Android SDK in following location on a Windows computer:
C:\Users\[username]\AppData\Local\Android\android-sdk
<a name="Download_the_USB_Drivers" />
### Download the USB Drivers
@ -124,7 +119,6 @@ The default path for a Xamarin.Android installation is:
C:\Users\[username]\AppData\Local\Android\android-sdk\extras\google\usb_driver
<a name="Installing_the_USB_Driver" />
### Installing the USB Driver
@ -151,7 +145,6 @@ To install the drivers on Windows 7:
8. Click **Next** to install the driver.
<a name="Windows_8" />
### Installing Unverified Drivers in Windows 8
@ -175,7 +168,6 @@ Nexus:
described above.
<a name="ConnectDevice" />
## Connect the Device to the Computer
@ -191,7 +183,6 @@ ways to do so:
cable or the device is to far away for a USB cable. Connecting via
WiFi will be covered in the next section.
<a name="Debug_over_WiFi" />
### Connecting over WiFi
@ -242,7 +233,6 @@ the following command at the command prompt to see what is connected:
adb devices
<a name="Summary" />
## Summary

Просмотреть файл

@ -7,14 +7,13 @@ ms.assetid: 2BE4D5AD-D468-B177-8F96-837D084E7DE1
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/06/2018
ms.date: 03/01/2018
---
# Windows Installation
_This guide describes the steps for installing Xamarin.Android for Visual Studio on Windows, and it explains how to configure Xamarin.Android for building your first Xamarin.Android application._
<a name="overview" />
## Overview
@ -47,7 +46,6 @@ Studio on Windows, see the
[Windows Install](~/cross-platform/get-started/installation/windows.md)
guide.
<a name="configuration" />
## Configuration
@ -78,7 +76,6 @@ if you are developing specifically for API level 23 or earlier.
> [!IMPORTANT]
> **Note:** Xamarin.Android does not support JDK 9.
<a name="sdk_manager" />
### Android SDK Manager
@ -110,7 +107,6 @@ SDK Tools package.
For more information about using the Xamarin Android SDK Manager, see
[Android SDK Setup](~/android/get-started/installation/android-sdk.md).
<a name="emulator" />
### Android Emulator
@ -146,8 +142,6 @@ to configure your Android device for development, then connect it to
your computer for running and debugging Xamarin.Android applications.
<a name="create_app" />
## Create an Application
Now that you have installed Xamarin.Android, you can launch Visual
@ -167,8 +161,6 @@ That's it! Now you are ready to use Xamarin.Android to create
Android applications!
<a name="summary" />
## Summary
In this article, you learned how to set up and install the

Просмотреть файл

@ -13,7 +13,6 @@ ms.author: mamcle
_If you are a Java developer, you are well on your way to leveraging your skills and existing code on the Xamarin platform while reaping the code reuse benefits of C#. You will find that C# syntax is very similar to Java syntax, and that both languages provide very similar features. In addition, you'll discover features unique to C# that will make your development life easier._
<a name="overview" />
## Overview
@ -150,7 +149,6 @@ between C# and Java; a later section describes the object-oriented
differences between these languages.
<a name="assemblies" />
### Libraries vs. Assemblies
@ -165,7 +163,6 @@ For more information about assemblies, see the MSDN
[Assemblies and the Global Assembly Cache](https://msdn.microsoft.com/en-us/library/ms173099.aspx)
topic.
<a name="namespaces" />
### Packages vs. Namespaces
@ -181,7 +178,6 @@ namespace WeatherApp
...
```
<a name="imports" />
### Importing Types
@ -223,7 +219,6 @@ These statements import functionality from the `System`, `Android.App`,
`Android.Content`, etc. namespaces.
<a name="generics" />
### Generics
@ -308,7 +303,6 @@ However, there are also some important differences:
Java where an explicit call to `super.finalize` is used.)
<a name="inheritance" />
### Class Inheritance
@ -405,7 +399,6 @@ For more information about C# properties, see the MSDN
topic.
<a name="basemethods" />
### Calling Base Class Methods
@ -454,7 +447,6 @@ In this case, the `OnCreate` method defined by the derived class
(`Activity`).
<a name="accessmodifiers" />
### Access Modifiers
@ -474,7 +466,6 @@ For more information about C# access modifiers, see the MSDN
topic.
<a name="virtualoverride" />
### Virtual and Override Methods
@ -1099,7 +1090,6 @@ For more information about these techniques, see
[Java Integration Overview](~/android/platform/java-integration/index.md).
<a name="further" />
## For Further Reading
@ -1124,7 +1114,6 @@ advance your understanding of the fundamentals of Android application
development with Xamarin.
<a name="summary" />
## Summary

Просмотреть файл

@ -11,7 +11,6 @@ ms.date: 02/16/2018
# API Design
<a name="Overview" />
## Overview
@ -23,7 +22,6 @@ At the core of Xamarin.Android there is an interop engine that bridges
the C# world with the Java world and provides developers with access to
the Java APIs from C# or other .NET languages.
<a name="Design_Principles" />
## Design Principles
@ -66,7 +64,6 @@ instead of single-method interfaces when appropriate and applicable.
[Android.Runtime.JNIEnv](https://developer.xamarin.com/api/type/Android.Runtime.JNIEnv/)).
<a name="Assemblies" />
## Assemblies
@ -80,11 +77,9 @@ The bindings to the Android platform are contained in the
for consuming Android APIs and communicating with the Android runtime
VM.
<a name="Binding_Design" />
## Binding Design
<a name="Collections" />
### Collections
@ -150,7 +145,6 @@ if (goodSource.Count != 4) // false
throw new InvalidOperationException ("should not be reached.");
```
<a name="Properties" />
### Properties
@ -170,7 +164,6 @@ Java methods are transformed into properties, when appropriate:
array.
<a name="Events_and_Listeners" />
### Events and Listeners
@ -272,7 +265,6 @@ implementing the listener interface on a subclass of
[Java.Lang.Object](https://developer.xamarin.com/api/type/Java.Lang.Object/) or any other wrapped
Java object, such as an Android activity.
<a name="Runnables" />
### Runnables
@ -303,7 +295,6 @@ We left the
of replacing them since several types implement the interface and can
therefore be passed as runnables directly.
<a name="Inner_Classes" />
### Inner Classes
@ -365,7 +356,6 @@ Note how `CubeWallpaper.CubeEngine` is nested within `CubeWallpaper`,
constructor which takes the declaring type -- `CubeWallpaper` in this
case -- all as specified above.
<a name="Interfaces" />
### Interfaces
@ -481,7 +471,6 @@ Finally, types with a *Consts* suffix such as
introduced InterfaceConsts nested types. They will be removed in
Xamarin.Android 3.0.
<a name="Resources" />
## Resources
@ -543,7 +532,6 @@ You would then use `Resource.Drawable.icon` to reference the
`layout/main.xml` file, or `Resource.String.first_string` to reference
the first string in the dictionary file `values/strings.xml`.
<a name="Constants_and_Enumerations" />
## Constants and Enumerations

Просмотреть файл

@ -45,7 +45,6 @@ For more information on how the Android classes communicate with the
Android Runtime classes see the
[API Design](~/android/internals/api-design.md) document.
<a name="Application_Packages" />
## Application Packages
@ -78,7 +77,6 @@ Xamarin.Android applications also contain *Android Callable Wrappers*
to allow Android to call into managed code.
<a name="Android_Callable_Wrappers" />
## Android Callable Wrappers
@ -136,7 +134,6 @@ and not cached instances which may cause accidental instance sharing
between threads.
<a name="Managed_Callable_Wrapper_Subclasses" />
## Managed Callable Wrapper Subclasses
@ -163,7 +160,6 @@ disposing of such instances, as *Dispose()*ing of the instance will
break the mapping between the Java instance (an instance of an Android
Callable Wrapper) and the managed instance.
<a name="Java_Activation" />
### Java Activation
@ -340,7 +336,6 @@ no instance data and a *(IntPtr, JniHandleOwnership)* constructor has
been provided.
<a name="Application_Startup" />
## Application Startup

Просмотреть файл

@ -46,7 +46,6 @@ with the argument
[GC.MaxGeneration](https://developer.xamarin.com/api/property/System.GC.MaxGeneration/).
<a name="Cross-VM_Object_Collections" />
## Cross-VM Object Collections
@ -124,7 +123,6 @@ lifetime of Native peers will be extended beyond what they would
otherwise live, as the Native peer won't be collectible until both the
Native peer and the Managed peer are collectible.
<a name="Object_Cycles" />
## Object Cycles
@ -153,7 +151,6 @@ should be invoked. This will manually "sever" the connection on the
object between the two VMs by freeing the global reference, thus
allowing the objects to be collected faster.
<a name="Automatic_Collections" />
## Automatic Collections
@ -264,7 +261,6 @@ There are multiple ways to help the GC to reduce memory use and collection
times.
<a name="Disposing_of_Peer_instances" />
### Disposing of Peer instances
@ -448,7 +444,6 @@ class MyClass : Java.Lang.Object, ISomeInterface
}
```
<a name="Reduce_Referenced_Instances" />
### Reduce Referenced Instances
@ -532,7 +527,6 @@ class BetterActivity : Activity {
}
```
<a name="Minor_Collections" />
## Minor Collections
@ -551,7 +545,6 @@ collection once the duty cycle has ended. Example duty cycles include:
- A group of network requests to refresh/sync app data.
<a name="Major_Collections" />
## Major Collections
@ -572,7 +565,6 @@ Major collections should only be manually invoked, if ever:
method.
<a name="Diagnostics" />
## Diagnostics
@ -584,7 +576,6 @@ and/or
[ *gc*](~/android/troubleshooting/index.md).
<a name="Configuration" />
## Configuration

Просмотреть файл

@ -15,13 +15,11 @@ Since applications on Android require generating Java proxy types during the bui
These are the Xamarin.Android limitations compared to desktop Mono:
<a name="Limited_Dynamic_Language_Support" />
## Limited Dynamic Language Support
[Android callable wrappers](~/android/platform/java-integration/android-callable-wrappers.md) are needed any time the Android runtime needs to invoke managed code. Android callable wrappers are generated at compile time, based on static analysis of IL. The net result of this: you *cannot* use dynamic languages (IronPython, IronRuby, etc.) in any scenario where subclassing of Java types is required (including indirect subclassing), as there's no way of extracting these dynamic types at compile time to generate the necessary Android callable wrappers.
<a name="Limited_Java_Generation_Support" />
## Limited Java Generation Support
@ -85,7 +83,6 @@ class MyIntentService : IntentService {
}
```
<a name="Generic_Csharp_classes" />
### Generic C# classes
@ -148,7 +145,6 @@ Generic C# classes are only partially supported. The following limitations exist
}
```
<a name="Partial_Java_Generics_Support" />
## Partial Java Generics Support

Просмотреть файл

@ -46,7 +46,6 @@ take a look at the key points that must be addressed before we can
trigger Android Beam. First, well work with the callback style of
creating an `NdefMessage`.
<a name="Creating_a_Message" />
## Creating a Message
@ -89,7 +88,6 @@ public NdefRecord CreateMimeRecord (String mimeType, byte [] payload)
}
```
<a name="Receiving_a_Message" />
## Receiving a Message

Просмотреть файл

@ -11,7 +11,6 @@ ms.date: 02/05/2018
# Working with the Android Manifest
<a name="Overview" />
## Overview
@ -33,7 +32,6 @@ code to generate XML elements, and *inserts* those elements into
**AndroidManifest.xml**.
<a name="The_Basics" />
## The Basics
@ -77,7 +75,6 @@ The `[Activity]` attribute has no effect on `abstract`
types; `abstract` types are ignored.
<a name="Activity_Name" />
### Activity Name
@ -112,7 +109,6 @@ the class name, see
[Android Callable Wrapper Naming](https://developer.xamarin.com/releases/android/xamarin.android_5/xamarin.android_5.1/#Android_Callable_Wrapper_Naming)
for tips on maintaining compatibility.
<a name="Activity_Title_Bar" />
### Activity Title Bar
@ -137,7 +133,6 @@ This example produces the following xml fragment:
android:name="md5a7a3c803e481ad8926683588c7e9031b.MainActivity" />
```
<a name="Launchable_from_Application_Chooser" />
### Launchable from Application Chooser
@ -168,7 +163,6 @@ This example produces the following xml fragment:
```
<a name="Activity_Icon" />
### Activity Icon
@ -197,7 +191,6 @@ This example produces the following xml fragment:
</activity>
```
<a name="Permissions" />
### Permissions
@ -236,11 +229,9 @@ in Visual Studio).
<a name="Advanced_Features" />
## Advanced Features
<a name="Intent_Actions_and_Features" />
### Intent Actions and Features
@ -285,7 +276,6 @@ This example produces the following xml fragment:
</activity>
```
<a name="Application_Element" />
### Application Element
@ -341,7 +331,6 @@ section of
[ApplicationAttribute](https://developer.xamarin.com/api/type/Android.App.ApplicationAttribute/).
<a name="List_of_Custom_Attributes" />
## List of Custom Attributes

Просмотреть файл

@ -100,7 +100,6 @@ Picasso.With (this)
```
<a name="creating" />
### Creating the Bindings Library
@ -174,7 +173,6 @@ the Bindings Library project should build successfully and produce an output .DL
at the following location: **JarBinding/bin/Debug/JarBinding.dll**
<a name="using" />
### Using the Bindings Library
@ -265,7 +263,6 @@ the following screenshot:
Congratulations! You've successfully bound a Java library .JAR and used it in your
Xamarin.Android app.
<a name="summary" />
## Summary

Просмотреть файл

@ -7,14 +7,13 @@ ms.assetid: CEE90F8A-164B-4155-813A-7537A665A7E7
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 03/14/2017
ms.date: 03/01/2018
---
# Binding an Eclipse Library Project
_This walkthrough explains how to use Xamarin.Android project templates to bind an Eclipse Android library project._
<a name=overview />
## Overview
@ -40,7 +39,6 @@ binding for an Android library project is slightly different than
creating a binding for a Java .JAR or .AAR file.
<a name="Walkthrough" />
## Walkthrough
@ -88,7 +86,6 @@ be used as described earlier on in this document.
> [!NOTE]
> **Note**: Compiling the Android library projects in other IDEs is not supported at this time. Other IDEs may not create the same directory structure or files in the **bin** folder as Eclipse.
<a name="Summary" />
## Summary

Просмотреть файл

@ -34,7 +34,6 @@ in general (with a basic code example), see
> [!IMPORTANT]
> A binding project can only include one .AAR file. If the .AAR dependencies on other .AAR, then those dependencies should be contained in their own binding project and then referenced. See [Bug 44573](https://bugzilla.xamarin.com/show_bug.cgi?id=44573).
<a name="walkthrough" />
## Walkthrough
@ -88,7 +87,6 @@ This image resource resides at **res/drawable/monkey.png**
in **textanalyzer.aar**.
<a name="creating" />
### Creating the Bindings Library
@ -145,7 +143,6 @@ Before commencing with the steps below, please download the example
location: **AarBinding/bin/Debug/AarBinding.dll**
<a name="using" />
### Using the Bindings Library
@ -191,7 +188,6 @@ example app will call: `NumConsonants` (which wraps the underlying Java
Java `numVowels` method).
<a name="accessing_types" />
### Accessing .AAR Types
@ -336,7 +332,6 @@ line of text and tap these buttons again to test for different vowel
and consonant counts.
<a name="accessing_resources" />
### Accessing .AAR Resources
@ -393,7 +388,6 @@ results are displayed as shown on the right:
Congratulations! You've successfully bound a Java library .AAR!
<a name="summary" />
## Summary

Просмотреть файл

@ -14,7 +14,6 @@ ms.date: 09/25/2017
_You can customize an Xamarin.Android binding by editing the metadata that controls the binding process. These manual modifications are often necessary for resolving build errors and for shaping the resulting API so that it is more consistent with C#/.NET. These guides explain the structure of this metadata, how to modify the metadata, and how to use JavaDoc to recover the names of method parameters._
<a name="overview" />
## Overview
@ -36,7 +35,6 @@ cases manual modification is required to address the following issues:
You can make some or all of these changes by modifying the metadata
that controls the binding process.
<a name="guides" />
## Guides

Просмотреть файл

@ -14,7 +14,6 @@ ms.date: 02/15/2018
_C# code in Xamarin.Android calls Java libraries through bindings, which are a mechanism that abstracts the low-level details that are specified in Java Native Interface (JNI). Xamarin.Android provides a tool that generates these bindings. This tooling lets the developer control how a binding is created by using metadata, which allows procedures such as modifying namespaces and renaming members. This document discusses how metadata works, summarizes the attributes that metadata supports, and explains how to resolve binding problems by modifying this metadata._
<a name="Overview" />
## Overview
@ -96,7 +95,6 @@ allows general-purpose changes to the binding such as:
Lets move on to discuss **Metadata.xml** in more detail.
<a name="Metadata.xml_Transform_File" />
## Metadata.xml Transform File
@ -148,7 +146,6 @@ the Java API's:
- `parameter` &ndash; Identify a parameter for a method. e.g. `/parameter[@name='p0']`
<a name="ADDING_TYPES" />
### Adding Types
@ -166,7 +163,6 @@ constructor and a single field:
</add-node>
```
<a name="REMOVING_TYPES" />
### Removing Types
@ -178,7 +174,6 @@ ignore a Java type and not bind it. This is done by adding a
<remove-node path="/api/package[@name='{package_name}']/class[@name='{name}']" />
```
<a name="Renaming_Members" />
### Renaming Members
@ -251,7 +246,6 @@ for the `EventArgs` subclass:
```
<a name="Supported_Attributes" />
## Supported Attributes
@ -456,7 +450,6 @@ Xamarin.Android to set the `MeasurementUnit`:
realReachSettings.MeasurementUnit = SKMeasurementUnit.Second;
```
<a name="Summary" />
## Summary

Просмотреть файл

@ -14,7 +14,6 @@ ms.date: 06/20/2017
_This article explains how to recover parameter names in an Java Binding Project by using Javadoc generated from the Java project._
<a name="Overview" />
## Overview
@ -46,7 +45,6 @@ output. The .JAR binding toolchain does not support every single
possible permutation and consequently some parameter may not be
properly named.
<a name="Summary" />
## Summary

Просмотреть файл

@ -71,7 +71,6 @@ When binding an existing Android library, it is necessary to keep the following
* **What version of the JDK was used to compile the library?** &ndash; Binding errors may occur if the Android library was built with a different version of JDK than in use by Xamarin.Android. If possible, recompile the Android library using the same version of the JDK that is used by your installation of Xamarin.Android.
<a name="BUILD_ACTIONS" />
## Build Actions
@ -125,7 +124,6 @@ The Xamarin.Android Binding Generator will change some Java idioms and patterns
- An _Inner class_ in Java is a _Nested class_ with an instance constructor in C#.
<a name="BINDING_SCENARIOS" />
## Binding Scenarios

Просмотреть файл

@ -7,14 +7,13 @@ ms.assetid: BB81FCCF-F7BF-4C78-884E-F02C49AA819A
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/05/2018
ms.date: 03/01/2018
---
# Troubleshooting Bindings
_This article summarizes serveral common errors that may occur when generating bindings, along with possible causes and suggested ways to resolve them._
<a name="OVERVIEW" />
## Overview
@ -57,7 +56,6 @@ It can also prove helpful to decompile the Android library and examine
the types and methods that Xamarin.Android is trying to bind. This is
covered in more detail later on in this guide.
<a name="DECOMPILING_AN_ANDROID_LIBRARY" />
## Decompiling an Android Library
@ -96,7 +94,6 @@ which the Java library was published. If necessary, enlist the services
of a legal professional before attempting to decompile a Java library
and inspect the source code.
<a name="INSPECTING_API_XML" />
## Inspect API.XML
@ -113,14 +110,12 @@ be causing any binding problems. For example, **api.xml** might reveal
that a property is returning an inappropriate type, or that there are
two types that share the same managed name.
<a name="KNOWN_ISSUES" />
## Known Issues
This section will list some of the common error messages or symptoms
that my occur when trying to bind an Android library.
<a name="PROBLEM_JAVA_VERSION_MISMATCH" />
### Problem: Java Version Mismatch
@ -130,7 +125,6 @@ to what the library was compiled with. Recompile the Android library
with the same version of the JDK that your Xamarin.Android project
is using.
<a name="PROBLEM_AT_LEAST_ONE_JAVA_LIBRARY_IS_REQUIRED" />
### Problem: At least one Java library is required
@ -146,7 +140,6 @@ generator cannot automatically guess which one to use by default. For
more information about build actions, see
[Build Actions](~/android/platform/binding-java-library/index.md).
<a name="PROBLEM_BINDING_TOOLS_CANNOT_LOAD_THE_JAR_LIBRARY" />
### Problem: Binding tools cannot load the .JAR library
@ -162,7 +155,6 @@ runtime tools may pass. The workaround for this is to hand-bind these
libraries instead of using the binding generator.
<a name="PROBLEM_MISSING_C_TYPES_IN_GENERATED_OUTPUT_" />
### Problem: Missing C# types in generated output.
@ -387,8 +379,6 @@ before using the shared library) will load the **.so** library:
Java.Lang.JavaSystem.LoadLibrary("pocketsphinx_jni");
```
<a name=summary />
## Summary
In this article, we listed common troubleshooting issues associated

Просмотреть файл

@ -56,7 +56,6 @@ Each of these methods has the same basic set of inputs:
- **SortOrder** &ndash; Columns to sort by.
<a name="Creating_Inputs_for_a_Query" />
## Creating Inputs for a Query
@ -82,7 +81,6 @@ For this example, the `selection`, `selectionArgs` and `sortOrder` will be ignor
by setting them to `null`.
<a name="Creating_a_Cursor_from_a_Content_Provider_Uri" />
## Creating a Cursor from a Content Provider Uri
@ -90,7 +88,6 @@ Once the parameter objects have been created, they can be used in one
of the following three ways:
<a name="Using_a_Managed_Query" />
### Using a Managed Query
@ -104,7 +101,6 @@ var cursor = activity.ManagedQuery(uri, projection, null, null, null);
This cursor will be managed by Android so you do not need to close it.
<a name="Using_ContentResolver" />
### Using ContentResolver
@ -129,7 +125,6 @@ automatically deactivated and re-queried when Activities are stopped
and restarted.
<a name="Using_CursorLoader" />
### Using CursorLoader
@ -150,7 +145,6 @@ Earlier Android versions can also use the `CursorLoader` class by using the
[v4 support libraries](http://developer.android.com/tools/support-library/index.html).
<a name="Displaying_the_Cursor_Data_with_a_Custom_Adapter" />
## Displaying the Cursor Data with a Custom Adapter
@ -239,7 +233,6 @@ Some data types require special permissions to be requested in the
project's **AndroidManifest.xml**.
<a name="Displaying_the_Cursor_Data_with_a_SimpleCursorAdapter" />
## Displaying the Cursor Data with a SimpleCursorAdapter

Просмотреть файл

@ -32,7 +32,6 @@ In Mono for Android, the content provider class should have a
`[ContentProvider]` attribute to specify the Uri (or Uris) that should
be added to **AndroidManifest.xml**.
<a name="Mime_Type" />
### Mime Type
@ -50,7 +49,6 @@ The second part of the MIME Type is specific to your application, and
should use a reverse-DNS standard with a `vnd.` prefix. The sample code
uses `vnd.com.xamarin.sample.Vegetables`.
<a name="Data_Model_Metadata" />
### Data Model Metadata
@ -70,7 +68,6 @@ exposed the metadata for the Contacts data. For our custom
`ContentProvider` we will just expose the constants on the class
itself.
<a name="Implementation" />
## Implementation
@ -92,7 +89,6 @@ applications can also access it as long as they know the Uri and
information about the schema (which is usually exposed as constant
values).
<a name="Create_a_database" />
## Create a Database
@ -135,14 +131,12 @@ set. See the
[ListViews and Adapters](~/android/user-interface/layouts/list-view/index.md)
document for more details on using the `ListView` control.
<a name="Create_the_ContentProvider" />
## Create the ContentProvider
The rest of this section gives step-by-step instructions on how the
**SimpleContentProvider/VegetableProvider.cs** example class was built.
<a name="Initialize_the_Database" />
### Initialize the Database
@ -164,7 +158,6 @@ public class VegetableProvider : ContentProvider
The rest of the code will form the actual content provider
implementation that allows the data to be discovered and queried.
<a name="Add_Metadata_for_Consumers" />
## Add Metadata for Consumers
@ -216,7 +209,6 @@ public class VegetableProvider : ContentProvider
}
```
<a name="Implement_the_URI_Parsing_Helper" />
## Implement the URI Parsing Helper
@ -258,7 +250,6 @@ This code is all private to the `ContentProvider` class. Refer to
[Google's UriMatcher documentation](https://developer.xamarin.com/api/type/Android.Content.UriMatcher/)
for further information.
<a name="Implement_the_QueryMethod" />
## Implement the QueryMethod
@ -309,7 +300,6 @@ public override String GetType(Android.Net.Uri uri)
}
```
<a name="Implement_the_Other_Overrides" />
## Implement the Other Overrides
@ -337,7 +327,6 @@ application has been installed, the data it exposes will be available
both inside the application but also to any other application that
knows the Uri to reference it.
<a name="Access_the_ContentProvider" />
## Access the ContentProvider
@ -346,7 +335,6 @@ the same way as the Contacts provider at the start of this document:
obtain a cursor using the specified Uri and then use an adapter to
access the data.
<a name="Bind_a_ListView_to_a_ContentProvider" />
## Bind a ListView to a ContentProvider
@ -381,7 +369,6 @@ The resulting application looks like this:
[![Screenshot of app listing Vegetables, Fruits, Flower Buds, Legumes, Bulbs, Tubers](custom-contentprovider-images/api11-contentprovider2.png)](custom-contentprovider-images/api11-contentprovider2.png)
<a name="Retrieve_a_Single_Item_from_a_ContentProvider" />
## Retrieve a Single Item from a ContentProvider

Просмотреть файл

@ -27,7 +27,6 @@ underlying SQL. Queries are done via a Uri using constants to reference
column names (to reduce dependencies on the underlying data structure),
and an `ICursor` is returned for the consuming code to iterate over.
<a name="Consuming_a_ContentProvider" />
## Consuming a ContentProvider
@ -41,7 +40,6 @@ structure in the
[`Android.Providers`](https://developer.xamarin.com/api/namespace/Android.Provider/) namespace.
<a name="Built-In_Providers" />
### Built-In Providers
@ -66,7 +64,6 @@ Android offers access to a wide range of system and user data using `ContentProv
- *Voicemail* &ndash; history of voicemail messages.
<a name="Classes_Overview" />
## Classes Overview

Просмотреть файл

@ -14,7 +14,6 @@ ms.date: 02/06/2018
_Android 3.0 introduced Fragments. Fragments are self-contained, modular components that are used to help address the complexity of writing applications that may run on screens of different sizes. This article walks through how to use fragments to develop Xamarin.Android applications, and how to support fragments on pre-Android 3.0 devices._
<a name="Overview" />
## Overview
@ -39,7 +38,6 @@ the application to take advantage of larger screen sizes.
Support Package, then makes some minor changes to the Activities in the
application, allowing it to run on older versions of Android.
<a name="Requirements" />
## Requirements
@ -47,7 +45,6 @@ This walkthrough requires Xamarin.Android 4.0 or higher. It will also be
necessary to install the Android Support Package, as outlined in the Fragments
documentation.
<a name="Introduction" />
## Introduction

Просмотреть файл

@ -20,7 +20,6 @@ application on Android 2.3 devices, as shown by the following screens:
![Details Activity screenshot](supporting-pre-honeycomb-images/01.png)
<a name="Adding_the_Support_Package" />
## Adding the Support Package
@ -45,7 +44,6 @@ Also, ensure that the minimum Android version targets the same API level:
![Screenshot of setting the Minimum Android version](supporting-pre-honeycomb-images/04.png)
<a name="Change_MainActivity_to_derive_from_FragmentActivity" />
### Change MainActivity to derive from FragmentActivity
@ -68,7 +66,6 @@ public class MainActivity : Android.Support.V4.App.FragmentActivity
}
```
<a name="Change_DetailsActivity_to_derive_from_FragmentActivity" />
### Change DetailsActivity to derive from FragmentActivity

Просмотреть файл

@ -207,7 +207,6 @@ into the `FrameLayout` on the Activity. For other devices that do not
have a large display &ndash; phones, for example &ndash; `isDualPane`
will be set to `false` so a new `DetailsActivity` will be started.
<a name="5. Create_the_DetailsActivity" />
## 5. Create the DetailsActivity
@ -241,7 +240,6 @@ root view has the special ID `Android.Resource.Id.Content`. A new
of a `FragmentTransaction` that is created by the Activity's
`FragmentManager`.
<a name="6. Create_the_DetailsFragment" />
## 6. Create the DetailsFragment

Просмотреть файл

@ -79,7 +79,6 @@ fragmentTx.AddToBackStack(null);
fragmentTx.Commit();
```
<a name="Communicating_with_Fragments" />
## Communicating with Fragments
@ -110,7 +109,6 @@ var emailList = FragmentManager.FindFragmentById<EmailListFragment>(Resource.Id.
emailList.SomeCustomMethod(parameter1, parameter2);
```
<a name="Communicating_with_the_Activity" />
### Communicating with the Activity

Просмотреть файл

@ -28,7 +28,6 @@ that enables devices running Android 1.6 (API level 4) to Android
> the `PreferenceFragment,` are supported in the Android Support Package.
> They will not work in pre-Android 3.0 applications.
<a name="Adding_the_Support_Package" />
## Adding the Support Package

Просмотреть файл

@ -26,7 +26,6 @@ are:
Preference objects as lists.
<a name="The_ListFragment" />
## The ListFragment
@ -37,7 +36,6 @@ and a phone:
[![Screenshots of ListFragment on a tablet and on a phone](specialized-fragment-classes-images/intro-screenshot-sml.png)](specialized-fragment-classes-images/intro-screenshot.png)
<a name="Binding_Data_With_The_ListAdapter" />
### Binding Data With The ListAdapter
@ -63,7 +61,6 @@ When setting the `ListAdapter`, it is important to use the
property. Using `ListView.ListAdapter` will cause important
initialization code to be skipped.
<a name="Responding_to_User_Selection" />
### Responding to User Selection
@ -100,7 +97,6 @@ In the code above, when the user selects an item in the `ListFragment`,
a new Fragment is displayed in the hosting Activity, showing more
details about the item that was selected.
<a name="DialogFragment" />
## DialogFragment
@ -135,7 +131,6 @@ two methods:
method, it is not necessary to override `OnCreateView` .
<a name="A_Simple_DialogFragment" />
### A Simple DialogFragment
@ -177,7 +172,6 @@ public class MyDialogFragment : DialogFragment
}
```
<a name="Displaying_a_Fragment" />
### Displaying a Fragment
@ -200,7 +194,6 @@ public void ShowDialog()
}
```
<a name="Dismissing_a_Fragment" />
### Dismissing a Fragment
@ -209,7 +202,6 @@ Fragment to be removed from the Activity and commits that transaction.
The standard Fragment lifecycle methods that are involved with the
destruction of a Fragment will be called.
<a name="Alert_Dialog" />
### Alert Dialog
@ -237,7 +229,6 @@ public class AlertDialogFragment : DialogFragment
}
```
<a name="PreferenceFragment" />
## PreferenceFragment
@ -256,7 +247,6 @@ example of a `PreferenceFragment`:
[![Example PreferencesFragment with inline, dialog, and launch preferences](specialized-fragment-classes-images/preferences-dialog.png)](specialized-fragment-classes-images/preferences-dialog.png)
<a name="Create_A_Preference_Fragment_from_a_Resource" />
### Create A Preference Fragment from a Resource
@ -332,7 +322,6 @@ public class PrefFragment : PreferenceFragment
}
```
<a name="Querying_Activities_to_Create_a_Preference_Fragment" />
### Querying Activities to Create a Preference Fragment

Просмотреть файл

@ -35,7 +35,6 @@ are generated for all types that (directly or indirectly) inherit
[Java.Lang.Object](https://developer.xamarin.com/api/type/Java.Lang.Object/).
<a name="ACW_Naming" />
## Android Callable Wrapper Naming
@ -102,7 +101,6 @@ information about attribute naming, see
[RegisterAttribute](https://developer.xamarin.com/api/type/Android.Runtime.RegisterAttribute/).
<a name="Implementing_Interfaces" />
## Implementing Interfaces
@ -134,7 +132,6 @@ class MyComponentCallbacks : Java.Lang.Object, Android.Content.IComponentCallbac
}
```
<a name="Implementation_Details" />
## Implementation Details

Просмотреть файл

@ -14,7 +14,6 @@ ms.date: 01/18/2017
_The Java ecosystem includes a diverse and immense collection of components. Many of these components can be used to reduce the time it takes to develop an Android application. This document will introduce and provide a high-level overview of some of the ways that developers can use these existing Java components to improve their Xamarin.Android application development experience._
<a name="Overview" />
## Overview
@ -65,7 +64,6 @@ that effort with the help of a tool called *Sharpen*. Sharpen is an
open source tool that is a Java-to-C# converter.
<a name="Summary" />
## Summary

Просмотреть файл

@ -7,14 +7,13 @@ ms.assetid: A417DEE9-7B7B-4E35-A79C-284739E3838E
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/15/2018
ms.date: 03/01/2018
---
# Working With JNI
_Xamarin.Android permits writing Android apps within C# instead of Java. Several assemblies are provided with Xamarin.Android which provide bindings for Java libraries, including Mono.Android.dll and Mono.Android.GoogleMaps.dll. However, bindings are not provided for every possible Java library, and the bindings that are provided may not bind every Java type and member. To use unbound Java types and members, the Java Native Interface (JNI) may be used. This article illustrates how to use JNI to interact with Java types and members from Xamarin.Android applications._
<a name="_Overview" />
## Overview
@ -48,7 +47,6 @@ This document explains:
- How to expose interfaces.
<a name="_Requirements" />
## Requirements
@ -57,7 +55,6 @@ JNI, as exposed through the
is available in every version of Xamarin.Android.
To bind Java types and interfaces, you must use Xamarin.Android 4.0 or later.
<a name="_Managed_Callable_Wrappers" />
## Managed Callable Wrappers
@ -82,7 +79,6 @@ members. Sub-classing and interface implementation requires the use of
managed callable wrappers.
<a name="_Android_Callable_Wrappers" />
## Android Callable Wrappers
@ -110,7 +106,6 @@ generated for all types that (directly or indirectly) inherit
[Java.Lang.Object](https://developer.xamarin.com/api/type/Java.Lang.Object/).
<a name="_Implementing_Interfaces" />
### Implementing Interfaces
@ -138,7 +133,6 @@ class MyComponentCallbacks : Java.Lang.Object, Android.Content.IComponentCallbac
}
```
<a name="_Implementation_Details" />
### Implementation Details
@ -207,7 +201,6 @@ Notice that the base class is preserved, and native method declarations are
provided for each method that is overridden within managed code.
<a name="_ExportAttribute_and_ExportFieldAttribute" />
### ExportAttribute and ExportFieldAttribute
@ -256,7 +249,6 @@ attributes reside in the `Java.Interop` namespace:
The [ExportAttribute](https://developer.xamarin.com/samples/monodroid/ExportAttribute/) sample
project illustrates how to use these attributes.
<a name="_Troubleshooting_ExportAttribute_and_ExportFieldAttribute" />
#### Troubleshooting ExportAttribute and ExportFieldAttribute
@ -272,7 +264,6 @@ project illustrates how to use these attributes.
Export methods. (This issue is fixed in the latest version of Xamarin.Android.)
<a name="_ExportParameterAttribute" />
### ExportParameterAttribute
@ -294,7 +285,6 @@ When types such as these are needed for exported methods, the
`ExportParameterAttribute` must be used to explicitly give the corresponding
parameter or return value a type.
<a name="_Annotation_Attribute" />
### Annotation Attribute
@ -342,7 +332,6 @@ Additionally the following limitations apply:
property getter or setter instead.
<a name="_Class_Binding" />
## Class Binding
@ -368,7 +357,6 @@ A binding typically contains the following items:
[RegisterAttribute.DoNotGenerateAcw](https://developer.xamarin.com/api/property/Android.Runtime.RegisterAttribute.DoNotGenerateAcw/) set to `true`.
<a name="_Declaring_Type_Handle" />
### Declaring Type Handle
@ -383,7 +371,6 @@ static IntPtr class_ref = JNIEnv.FindClass(CLASS);
See the [JNI Type References](#_JNI_Type_References) section for details about
the `CLASS` token.
<a name="_Binding_Fields" />
### Binding Fields
@ -437,7 +424,6 @@ reference into a `System.IO.Stream` instance, and we're using `JniHandleOwnershi
Many of the [Android.Runtime](https://developer.xamarin.com/api/namespace/Android.Runtime/) types have `FromJniHandle`
methods which will convert a JNI reference into the desired type.
<a name="_Method_Binding" />
### Method Binding
@ -478,8 +464,7 @@ and non-final methods) or implemented (for interface methods). The
[Supporting Inheritance, Interfaces](#_Supporting_Inheritance,_Interfaces_1) section covers the
complexities of supporting virtual methods and interface methods.
<a name="_Static_Methods" />
<a name="_Static_Methods" />
#### Static Methods
@ -518,7 +503,6 @@ an `IntPtr` which contains the handle of the returned Java instance.
is used to convert the Java handle into a strongly typed object
instance.
<a name="_Non-virtual_Instance_Method_Binding" />
#### Non-virtual Instance Method Binding
@ -553,7 +537,6 @@ an `IntPtr` which contains the handle of the returned Java instance.
is used to convert the Java handle into a strongly typed object
instance.
<a name="_Binding_Constructors" />
### Binding Constructors
@ -679,8 +662,7 @@ methods are helpers to perform a `JNIEnv.FindClass`,
`JNIEnv.DeleteGlobalReference` on the value returned from
`JNIEnv.FindClass`. See the next section for details.
<a name="_Supporting_Inheritance,_Interfaces" />
<a name="_Supporting_Inheritance,_Interfaces" />
### Supporting Inheritance, Interfaces
@ -751,7 +733,6 @@ the Xamarin.Android build process would have generated a new
errors, as the `mono.android.test.Adder` type would be present twice,
in two separate files.
<a name="_Binding_Virtual_Methods" />
### Binding Virtual Methods
@ -768,7 +749,6 @@ categories:
1. **Method Registration**
<a name="_Method_Binding" />
#### Method Binding
@ -850,7 +830,6 @@ implementation will only be invoked if the subclass invoked
`ThresholdClass` comes in. `ThresholdClass` specifies which Java class
will provide the implementation of the method to invoke.
<a name="_Method_Registration" />
#### Method Registration
@ -983,7 +962,6 @@ a Java instance. Treating them as a local reference (and thus calling
`JNIEnv.DeleteLocalRef`) will break managed -&gt; Java -&gt; managed stack
transitions.
<a name="_Complete_Adder_Binding" />
### Complete Adder Binding
@ -1046,7 +1024,6 @@ public class Adder : Java.Lang.Object {
}
```
<a name="_Restrictions" />
### Restrictions
@ -1072,7 +1049,6 @@ If the type must contain an instance field that can refer to a
`System.WeakReference` or `GCHandle`.
<a name="_Binding_Abstract_Methods" />
## Binding Abstract Methods
@ -1123,7 +1099,6 @@ partial class AdderInvoker : Adder {
The `Invoker` type is only necessary when obtaining JNI references to
Java-created instances.
<a name="_Binding_Interfaces" />
## Binding Interfaces
@ -1142,7 +1117,6 @@ Interface bindings have two parts: the C# interface definition, and an
Invoker definition for the interface.
<a name="_Interface_Definition" />
### Interface Definition
@ -1198,7 +1172,6 @@ This isn't necessary: we could have bound it to a C# `int[]`, or an
`Invoker` needs to be able to translate it into a Java `int[]` type for
invocation.
<a name="_Invoker_Definition" />
### Invoker Definition
@ -1251,7 +1224,6 @@ method, the `ThresholdType` and `ThresholdClass` members, the
`GetObject` method, interface method implementation, and the connector
method implementation.
<a name="_Constructor" />
#### Constructor
@ -1276,7 +1248,6 @@ Note: The `Handle` property must be used within the constructor body,
and not the `handle` parameter, as on Android v4.0 the `handle`
parameter may be invalid after the base constructor finishes executing.
<a name="_Dispose_Method" />
#### Dispose Method
@ -1295,7 +1266,6 @@ partial class IAdderProgressInvoker {
}
```
<a name="_ThresholdType_and_ThresholdClass" />
#### ThresholdType and ThresholdClass
@ -1317,7 +1287,6 @@ partial class IAdderProgressInvoker {
}
```
<a name="_GetObject_Method" />
#### GetObject Method
@ -1333,7 +1302,6 @@ partial class IAdderProgressInvoker {
}
```
<a name="_Interface_Methods" />
#### Interface Methods
@ -1352,7 +1320,6 @@ partial class IAdderProgressInvoker {
}
```
<a name="_Connector_Methods" />
#### Connector Methods
@ -1395,7 +1362,6 @@ Note, however, that `JNIEnv.GetArray` copies the entire array between
VMs, so for large arrays this could result in lots of added GC
pressure.
<a name="_Complete_Invoker_Definition" />
### Complete Invoker Definition
@ -1469,7 +1435,6 @@ new JValue (currentSum));
}
```
<a name="_JNI_Object_References" />
## JNI Object References
@ -1515,7 +1480,6 @@ Weak global references are only available on Android v2.2 (Froyo) and
later. Weak global references can be deleted with
[JNIEnv.DeleteWeakGlobalRef](https://developer.xamarin.com/api/member/Android.Runtime.JNIEnv.DeleteWeakGlobalRef/(System.IntPtr)).
<a name="_Dealing_With_JNI_Local_References" />
### Dealing With JNI Local References
@ -1535,7 +1499,6 @@ dealt with: explicitly deleting them, creating a `Java.Lang.Object`
instance to hold them, and using `Java.Lang.Object.GetObject<T>()` to
create a managed callable wrapper around them.
<a name="_Explicitly_Deleting_Local_References" />
### Explicitly Deleting Local References
@ -1556,7 +1519,6 @@ finally {
}
```
<a name="_Wrapping_with_Java.Lang.Object" />
### Wrapping with Java.Lang.Object
@ -1604,7 +1566,6 @@ using (var value = new Java.Lang.Object (lref, JniHandleOwnership.TransferLocalR
}
```
<a name="_Using_Java.Lang.Object.GetObject&lt;T&gt;()" />
### Using Java.Lang.Object.GetObject&lt;T&gt;()
@ -1674,7 +1635,6 @@ There are two sets of methods for manipulating instance fields: one for
reading instance fields and one for writing instance fields. All sets
of methods require a field ID to read or write the field value.
<a name="_Reading_Instance_Field_Values" />
### Reading Instance Field Values
@ -1717,7 +1677,6 @@ where `*` is the type of the field:
<a name="_Writing_Instance_Field_Values" />
### Writing Instance Field Values
@ -1780,7 +1739,6 @@ There are two sets of methods for manipulating static fields: one for
reading instance fields and one for writing instance fields. All sets
of methods require a field ID to read or write the field value.
<a name="_Reading_Static_Field_Values" />
### Reading Static Field Values
@ -1820,7 +1778,6 @@ where `*` is the type of the field:
&ndash; Read the value of `double` static fields.
<a name="_Writing_Static_Field_Values" />
### Writing Static Field Values
@ -1892,7 +1849,6 @@ for more details.
Any method declared in the class or any base class or implemented interface
can be looked up.
<a name="_Virtual_Method_Invocation" />
### Virtual Method Invocation
@ -1932,7 +1888,6 @@ where `*` is the return type of the method.
&ndash; Invoke a method which returns a `double` value.
<a name="_Non-virtual_Method_Invocation" />
### Non-virtual Method Invocation
@ -1973,7 +1928,7 @@ invocation is usually used to invoke the base method of a virtual method.
&ndash; Non-virtually invoke a method which returns a `double` value.
<a name="_Static_Methods" />
<a name="_Static_Methods" />
## Static Methods
@ -1987,7 +1942,6 @@ Method IDs do not need to be freed, and are valid as long as the
corresponding Java type is loaded. (Android does not currently support class
unloading.)
<a name="_Static_Method_Invocation" />
### Static Method Invocation
@ -2028,8 +1982,7 @@ where `*` is the return type of the method.
&ndash; Invoke a static method which returns a `double` value.
<a name="_JNI_Type_Signatures" />
<a name="_JNI_Type_Signatures" />
## JNI Type Signatures
@ -2077,9 +2030,6 @@ There are four types of JNI type references:
- **array**
<a name="_Built-in_Type_References" />
### Built-in Type References
Built-in type references are a single character, used to reference built-in
@ -2096,8 +2046,7 @@ value types. The mapping is as follows:
- `"V"` for `void` method return types.
<a name="_Simplified_Type_References" />
<a name="_Simplified_Type_References" />
### Simplified Type References
@ -2116,7 +2065,6 @@ Either of the two will result in the Java type
[java.lang.Thread.State](http://developer.android.com/reference/java/lang/Thread.State.html)
being mapped to the simplified type reference `java/lang/Thread$State`.
<a name="_Type_References" />
### Type References
@ -2167,7 +2115,6 @@ static {};
Ljava/lang/Thread$State;.
<a name="_Array_Type_References" />
### Array Type References
@ -2176,7 +2123,6 @@ Simplified type references cannot be used when specifying arrays.
For example, `int[]` is `"[I"`, `int[][]` is `"[[I"`, and `java.lang.Object[]` is `"[Ljava/lang/Object;"`.
<a name="_Java_Generics_and_Type_Erasure" />
## Java Generics and Type Erasure
@ -2192,7 +2138,6 @@ the generic type
is also the "raw" generic type `java.lang.Class`, both of which have
the same simplified type reference, `"java/lang/Class"`.
<a name="Java_Native_Interface_Support" />
## Java Native Interface Support
@ -2273,7 +2218,6 @@ Activity mapActivity = Java.Lang.Object.GetObject<Activity>(lrefActivity, JniHan
Furthermore, all of the JNI functions have been modified by removing
the `JNIEnv*` parameter present in every JNI function.
<a name="_Summary" />
## Summary

Просмотреть файл

@ -7,14 +7,13 @@ ms.assetid: 23F57634-2EF9-5C15-C710-B3E19A5AF7E1
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 06/14/2017
ms.date: 03/01/2018
---
# Jelly Bean Features
_This document will provide a high level overview of the new features for developers that were introduced in Android 4.1. These features include: enhanced notifications, updates to Android Beam to share large files, updates to multimedia, peer-to-peer network discovery, animations, new permissions._
<a name="Overview" />
## Overview
@ -36,7 +35,6 @@ have formatted text, action buttons and large images.
Finally several new permissions have been added in Android 4.1.
<a name="Requirements" />
## Requirements
@ -47,12 +45,10 @@ Android SDK Manager as shown in the following screen shot:
[![Selecting Android 4.1 in the Android SDK Manager](jelly-bean-images/image1.png)](jelly-bean-images/image1.png)
<a name="What's_New" />
## What's New
<a name="Animations" />
### Animations
@ -93,7 +89,6 @@ As the `TimeAnimator` instance is running, it will invoke `ITimeAnimator.ITimeLi
animator has been running and how long it as been since the last time the method
has been invoked.
<a name="Application_Stack_Navigation" />
### Application Stack Navigation
@ -127,7 +122,6 @@ stack:
- `OnCreateNavigateUpTaskStack` – This method is overridden when it is necessary to have complete control over how the synthetic stack is created.
<a name="Camera" />
### Camera
@ -183,12 +177,10 @@ button.Click += (sender, args) => mediaActionPlayer.Play(MediaActionSoundType.Sh
mediaActionPlayer.Release();
```
<a name="Connectivity" />
### Connectivity
<a name="Android_Beam" />
#### Android Beam
@ -198,7 +190,6 @@ communicate with each other. Android 4.1 provides better support for the
transfer of large files. When using the new method `NfcAdapter.SetBeamPushUris()` Android will switch between alternate
transport mechanisms (such as Bluetooth) to achieve a fast transfer speed.
<a name="Network_Services_Discovery" />
#### Network Services Discovery
@ -213,7 +204,6 @@ registration and to unregister the service.
To discover services on the network, and implementation of `Nsd.DiscoveryListener` passed to `NsdManager.discoverServices()`.
<a name="Network_Usage" />
#### Network Usage
@ -223,7 +213,6 @@ a device to check if it is connected to a metered network. This method can be
used to help manage data usage by accurately informing users that there might be
expensive charges for data operations.
<a name="WiFi_Direct_Service_Discovery" />
#### WiFi Direct Service Discovery
@ -246,7 +235,6 @@ service discovery:
- `SetUpnpServiceResponseListener()` – This method is used to register callbacks to be invoked on receiving a response to discovery requests Upnp.
<a name="Content_Providers" />
### Content Providers
@ -262,7 +250,6 @@ when interacting with content providers from other applications – it is less
likely that buggy code from another application will affect another
application.
<a name="Copy_and_Paste_With_Intents" />
### Copy and Paste With Intents
@ -278,7 +265,6 @@ following types:
- **Uri** – This can be any URI, such as an HTTP bookmark or the URI to a content provider.
<a name="Isolated_Services" />
### Isolated Services
@ -289,8 +275,6 @@ starting up the service and binding to it via the Service API. It is possible to
declare a service as isolated by setting the property `IsolatedProcess="true"` in the `ServiceAttribute` that
adorns a service class.
<a name="Media" />
### Media
@ -320,7 +304,6 @@ where media will be played:
- `MediaRouterActionProvider` and `MediaRouteButton` – These classes help provide a consistent UI for selecting and playing media.
<a name="Notifications" />
### Notifications
@ -356,7 +339,6 @@ The `Notification` class has received new constants that allow a
developer to specify one of five priority levels for a notification. These can
be set on a notification using the `Priority` property.
<a name="Permissions" />
### Permissions
@ -375,7 +357,6 @@ this permission is automatically granted by Android. Future versions of Android
will require an application to request this permission before granted the
permission.
<a name="Summary" />
## Summary

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: D3FDEA1C-F076-406F-BCC3-2A55D2C6ADEE
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/07/2018
ms.date: 03/01/2018
---
# KitKat Features
@ -914,8 +914,7 @@ or check to ensure the returned value of `GetDefaultSensor` isn't
`null`.
<a name="developer_tools" />
<a name="developer_tools" />
## Developer Tools
@ -947,7 +946,6 @@ adb shell screenrecord --bit-rate 8000000 --time-limit 60 /sdcard/screencast.mp4
You can find your video on your device - it will appear in your Gallery
when the recording is complete.
<a name="other_kitkat_additions" />
## Other KitKat Additions

Просмотреть файл

@ -87,8 +87,6 @@ You can continue to use
if you are developing specifically for API level 23 or earlier.
<a name="settingup" />
## Setting Up an Android 5.0 Project
To create an Android 5.0 project, you must install the latest tools and
@ -147,17 +145,12 @@ the Android L Preview, you must update the **Target
Framework** and **Android version** to the
values described above.
<a name="changes" />
## Important Changes
Previously published Android apps could be affected by changes
in Android 5.0. In particular, Android 5.0 uses a new runtime and a
significantly changed notification format.
<a name="runtime" />
### Android Runtime
Android 5.0 uses the new Android Runtime (ART) as the default runtime
@ -181,7 +174,6 @@ that exploit techniques unique to the previous Dalvik runtime, which may not
work under ART. For more information about these changes,
see [Verifying App Behavior on the Android Runtime (ART)](http://developer.android.com/guide/practices/verifying-apps-art.html).
<a name="notifchanges" />
### Notification Changes
@ -230,7 +222,6 @@ The [Compatibility](~/android/app-fundamentals/notifications/local-notifications
section of this article explains how to create notifications that are
downward-compatible with earlier versions of Android.
<a name="materialtheme" />
## Material Theme
@ -258,7 +249,6 @@ app: the `Theme.Material` dark theme (the default), the
For more about using Material Theme features in Xamarin.Android apps, see
[Material Theme](~/android/user-interface/material-theme.md).
<a name="animations" />
## Animations
@ -268,7 +258,6 @@ more intuitive to use. Also, Android 5.0 apps can use *reveal effect*
animations to hide or reveal views. You can use *curved motion* settings
to configure how quickly or slowly animations are rendered.
<a name="touchanim" />
### Touch Feedback Animations
@ -294,7 +283,6 @@ time.
For more on touch feedback animations in Android 5.0,
see [Customize Touch Feedback](http://developer.android.com/training/material/animations.html#Touch).
<a name="activityanim" />
### Activity Transition Animations
@ -352,7 +340,6 @@ Shared element transitions support multiple types of animations, such as:
For more about activity transition animations in Android 5.0, see
[Customize Activity Transitions](http://developer.android.com/training/material/animations.html#Transitions).
<a name="viewstate" />
### View State Transition Animations
@ -371,7 +358,6 @@ following techniques:
For more about view state transition animations in
Android 5.0, see [Animate View State Changes](http://developer.android.com/training/material/animations.html#ViewState).
<a name="reveal" />
### Reveal Effect
@ -394,7 +380,6 @@ shrink to hide the view rather than enlarge to reveal the view.
For more information on the Android 5.0 reveal effect in,
see [Use the Reveal Effect](http://developer.android.com/training/material/animations.html#Reveal).
<a name="curvedmotion" />
### Curved Motion
@ -419,7 +404,6 @@ according to specified control points and motion curves. For more information ab
how to specify curved motion settings in Android 5.0,
see [Use Curved Motion](http://developer.android.com/training/material/animations.html#CurvedMotion).
<a name="viewshadows" />
## View Shadows & Elevation
@ -445,7 +429,6 @@ can set through a `ViewPropertyAnimator` method call.
For more about view shadows in Android 5.0,
see [Defining Shadows and Clipping Views](http://developer.android.com/training/material/shadows-clipping.html).
<a name="colorfeatures" />
## Color Features
@ -458,7 +441,6 @@ Android 5.0 provides two new features for managing color in apps:
customize your app's color theme to coordinate with the color palette of
a displayed image.
<a name="tinting" />
### Drawable Tinting
@ -485,7 +467,6 @@ set to a light gray:
For more about drawable tinting in Android 5.0,
see [Drawable Tinting](http://developer.android.com/training/material/drawables.html#DrawableTint).
<a name="colorextract" />
### Prominent Color Extraction
@ -522,7 +503,6 @@ extracted from the image.
For more about color extraction in Android 5.0,
see [Extracting Prominent Colors from an Image](http://developer.android.com/training/material/drawables.html#ColorExtract).
<a name="newuiwidgets" />
## New UI Widgets
@ -544,7 +524,6 @@ The screenshot on the left is an example of `RecyclerView` as used in an
email app, and the screenshot on the right is an example of `CardView`
as used in a travel reservation app.
<a name="recyclerview" />
### RecyclerView
@ -579,7 +558,6 @@ in this sequence of screenshots:
For more about `RecyclerView`,
see [RecyclerView](~/android/user-interface/layouts/recycler-view/index.md).
<a name="cardview" />
### CardView
@ -596,7 +574,6 @@ background color is set via the `cardBackgroundColor` attribute.
For more about `CardView`,
see [CardView](~/android/user-interface/controls/card-view.md).
<a name="enhanced" />
## Enhanced Notifications
@ -658,7 +635,6 @@ For detailed information about creating and launching notifications
with the latest Android 5.0 features, see
[Local Notifications](~/android/app-fundamentals/notifications/local-notifications.md).
<a name="newapis" />
## New APIs

Просмотреть файл

@ -12,13 +12,11 @@ ms.date: 08/03/2016
# Maps and Location
<a name="location" />
## [Location Services](~/android/platform/maps-and-location/location.md)
This guide introduces location-awareness in Android applications, and illustrates how to get the user's location using the Android Location Service API, as well as the Fused Location Provider available with the Google Location Services API.
<a name="maps" />
## [Maps](~/android/platform/maps-and-location/maps/index.md)

Просмотреть файл

@ -30,7 +30,6 @@ Therefore, it is necessary to meet some mandatory prerequisites before
it is possible to use the Google Maps Android API in a Xamarin.Android
application.
<a name="Configuring_Maps_API_Prerequisites" />
## Google Maps API Prerequisites
@ -42,7 +41,6 @@ Several items need to be configured before you can use the Maps API, including:
- Specify the required permissions
<a name="Google_APIs_Add-On" />
### Install the Google Play Services SDK
@ -74,7 +72,6 @@ services client can be found:
> that may not be present on all devices. If it is not installed, then
> Google Maps will not work on the device.
<a name="Binding_Google_Play_Services" />
#### Binding Google Play Services
@ -98,7 +95,6 @@ accomplish this:
[Maps and Location Demo v3 sample](https://github.com/xamarin/monodroid-samples/tree/master/MapsAndLocationDemo_v3)
on Github.
<a name="Adding_the_Google_Play_Services_Component" />
#### Adding the Google Play Services Map Package
@ -122,7 +118,6 @@ Notice that the following dependency packages are also installed:
- **Xamarin.GooglePlayServices.Tasks**
<a name="Creating_an_Emulator_with_Google_APIs" />
### Create an Emulator with Google APIs
@ -134,7 +129,6 @@ screenshot, an emulator image is configured for API Level 19:
![Android Emulator Manager with an AVD configured for API Level 19](maps-api-images/image04.png)
<a name="apikey" />
### Obtain a Google Maps API Key
@ -144,7 +138,6 @@ how to obtain and use the API key with Xamarin.Android, see
[Obtaining A Google Maps API Key](~/android/platform/maps-and-location/maps/obtaining-a-google-maps-api-key.md).
<a name="Specify_Permissions" />
### Specify the Required Permissions
@ -224,7 +217,6 @@ to **AndroidManifest.XML**:
</manifest>
```
<a name="The_GoogleMap" />
## The GoogleMap Class
@ -265,7 +257,6 @@ instance of `GoogleMap`. Preference should be given to the
class as it is a simpler API that reduces the amount boilerplate code
that a developer must manually implement.
<a name="Adding_GoogleMap_To_An_Activity" />
### Adding a MapFragment to an Activity
@ -352,7 +343,6 @@ complete code example, see
[SimpleMapDemo](https://github.com/xamarin/monodroid-samples/tree/master/MapsAndLocationDemo_v3/SimpleMapDemo).
<a name="Map_Types" />
### Map Types
@ -392,7 +382,6 @@ if (_map != null) {
}
```
<a name="GoogleMap_Properties" />
### GoogleMap Properties
@ -430,7 +419,6 @@ if (_map != null) {
}
```
<a name="Interacting_with_the_Map" />
## Interacting with the Map
@ -514,7 +502,6 @@ the preceding code:
[![Example Google Map showing a specified location with a tilted viewing angle](maps-api-images/image06-sml.png)](maps-api-images/image06.png)
<a name="Adding_Overlays_to_a_Map" />
### Drawing on the Map
@ -526,7 +513,6 @@ The Android Maps API provides API's for drawing the following items on a map:
- **Lines, Polygons, and Circles** - These are APIs that allow Activities to add shapes to a map.
<a name="markers" />
#### Markers
@ -537,7 +523,6 @@ map. By default they use a standard icon provided by Google Maps. It is
possible to customize the appearance of a marker and to respond to user
clicks.
<a name="AddingAMarker" />
##### Adding a Marker
@ -566,7 +551,6 @@ marker looks like:
[![Example Google Map with a marker and an info window for Vimy Ridge](maps-api-images/image07-sml.png)](maps-api-images/image07.png)
<a name="Customizing_A_Marker" />
##### Customizing A Marker
@ -610,7 +594,6 @@ if (_map != null)
}
```
<a name="Info_Windows" />
#### Info Windows
@ -650,7 +633,6 @@ image on the right has it's window and contents customized:
![Example marker windows for Melbourne, including icon and population. The right window has rounded corners.](maps-api-images/marker-infowindows.png)
<a name="Adding_an_overlay" />
#### Ground Overlays
@ -659,7 +641,6 @@ Unlike markers, which identify a specific location on a map, a
is an image that used to identify a collection of locations or an area
on the map.
<a name="AddingAGroundOverlay" />
##### Adding a GroundOverlay
@ -683,7 +664,6 @@ The following screenshot shows this overlay on a map:
[![Example map with an overlayed image of a polar bear](maps-api-images/image09-sml.png)](maps-api-images/image09.png)
<a name="Lines_Circles_and_Polygons" />
#### Lines, Circles, and Polygons
@ -697,7 +677,6 @@ There are three simple types of geometric figures that can be added to a map:
- **Circle** - This will draw a circle on the map.
<a name="Polylines" />
##### Polylines
@ -718,7 +697,6 @@ rectOptions.Add(new LatLng(37.35, -122.0)); // close the polyline - this makes a
myMap.AddPolyline(rectOptions);
```
<a name="Polygons" />
##### Polygons
@ -744,7 +722,6 @@ rectOptions.Add(new LatLng(37.35, -122.2));
myMap.AddPolygon(rectOptions);
```
<a name="Circles" />
##### Circles
@ -762,7 +739,6 @@ circleOptions.InvokeRadius (1000);
_map.AddCircle (CircleOptions);
```
<a name="RespondingToClicks" />
## Responding To Events
@ -776,7 +752,6 @@ There are three types of interactions a user may have with a map:
Each of these events will be discussed in more detail below.
<a name="Marker_Click_Events" />
### Marker Click Events
@ -812,7 +787,6 @@ private void MapOnMarkerClick(object sender, GoogleMap.MarkerClickEventArgs mark
}
```
<a name="Marker_Drag_Events" />
### Marker Drag Events
@ -841,7 +815,6 @@ for a draggable marker:
Each of the `EventArgs` contains a single property called `P0` that is a
reference to the `Marker` object being dragged.
<a name="Info_Window_Click_Events" />
### Info Window Click Events

Просмотреть файл

@ -21,7 +21,6 @@ application. Instead, your application will launch the maps application
and load the map externally. The next section examines how to use
Xamarin.Android to launch maps like the one above.
<a name="Creating_the_Intent" />
## Creating the Intent
@ -40,7 +39,6 @@ This code is all that is needed to launch the map shown in the previous
screenshot. In addition to specifying latitude and longitude, the URI
scheme for maps supports several other options.
<a name="Geo_Uri_Scheme" />
## Geo URI Scheme
@ -70,7 +68,6 @@ that is then displayed on the map. For example, the URI
[![Example screenshot showing Google Maps with a search term](maps-application-images/02-mapsearch.png)](maps-application-images/02-mapsearch.png)
<a name="Street_View" />
For more information about geo URI schemes, see
[Show a location on a map](http://developer.android.com/guide/components/intents-common.html#Maps).

Просмотреть файл

@ -23,7 +23,6 @@ Obtaining a Maps API v2 key involves the following steps:
2. Create a project in the Google APIs console.
3. Obtaining the API key.
<a name="Step_1_-_Obtaining_your_Signing_Key_Fingerprint" />
## Obtaining your Signing Key Fingerprint
@ -123,7 +122,6 @@ Certificate fingerprints:
You will use the SHA-1 fingerprint (listed after **SHA1**) later in
this guide.
<a name="Step_2_-Create_an_API_project" />
## Creating an API project
@ -161,7 +159,6 @@ in your project until you create credentials for it. Next we will look
at how to create an API key and white-list a Xamarin.Android
application so that it is authorized to use this key.
<a name="Obtaining_the_API_Key" />
## Obtaining the API Key
@ -228,7 +225,6 @@ v2.
[![XamarinMapsDemoKey is shown in the API keys list](obtaining-a-google-maps-api-key-images/12-list-of-apis-vs-sml.png)](obtaining-a-google-maps-api-key-images/12-list-of-apis-vs.png)
<a name="Adding_the_Key" />
## Adding the Key to Your Project

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: E4D6F183-98D2-460A-9D65-937639A899E0
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Marshmallow Features
@ -20,7 +20,6 @@ Marshmallow development, and provides links to sample applications that
illustrate how to make use of new Android Marshmallow features in
Xamarin.Android apps.
<a name="overview" />
## Overview
@ -93,9 +92,6 @@ Android Marshmallow and earlier versions of Android. This article
explains how to get started building apps with Android Marshmallow, and
it provides an overview of the new feature highlights in Android 6.0.
<a name="requirements" />
## Requirements
The following is required to use the new Android Marshmallow features
@ -123,7 +119,6 @@ You can continue to use
[JDK 1.7](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html)
if you are developing specifically for API level 23 or earlier.
<a name="gettingstarted" />
## Getting Started
@ -142,7 +137,6 @@ create an Android Marshmallow project:
Each of these steps is explained in the following sections:
<a name="updates" />
### Install Xamarin Updates
@ -151,7 +145,6 @@ Marshmallow, change the update channel to **Stable** and install
all updates. For more information about installing updates from the updates
channel, see [Change the Updates Channel](https://developer.xamarin.com/recipes/cross-platform/ide/change_updates_channel/).
<a name="sdkpreview" />
### Install the Android 6.0 SDK
@ -175,7 +168,6 @@ Android 6.0 SDK, see
[SDK Manager](http://developer.android.com/tools/help/sdk-manager.html).
<a name="xaproject" />
### Start a Xamarin.Android Project
@ -191,7 +183,6 @@ For more about configuring Android API level levels, see
[Understanding Android API Levels](~/android/app-fundamentals/android-api-levels.md).
<a name="emudev" />
### Configure an Emulator or Device
@ -212,7 +203,6 @@ updating your device to Android Marshmallow, see
[Hardware System Images](http://developer.android.com/preview/download.html#images).
<a name="newfeatures" />
## New Features
@ -224,7 +214,6 @@ sections highlight these enhancements and provide links to help you get
started in using the new Android Marshmallow features in your app.
<a name="permissions" />
### Runtime Permissions
@ -258,7 +247,6 @@ in Android Marshmallow, see
[Working with System Permissions](https://developer.android.com/preview/features/runtime-permissions.html).
<a name="authentication" />
### Authentication Enhancements
@ -274,8 +262,6 @@ The links and sample apps described next can help you become familiar
with these new features.
<a name="fingerprint" />
#### Fingerprint Authentication
On devices that support fingerprint scanning hardware, you can use the
@ -297,7 +283,6 @@ Note that this sample app requires a device with a fingerprint reader.
This app does not store your fingerprint (or your password).
<a name="voice" />
#### Voice Interactions
@ -313,7 +298,6 @@ in a Xamarin.Android app:
[Voice Interactions](https://github.com/jamesmontemagno/MarshmallowSamples/tree/master/VoiceInteractions).
<a name="confirmcred" />
#### Confirm Credential
@ -337,7 +321,6 @@ To use this sample app:
2. Tap the **Purchase** button and confirm the secure lock screen credentials.
<a name="chrometabs" />
### Chrome Custom Tabs
@ -370,7 +353,6 @@ For more information about this feature, see
[Chrome Custom Tabs](https://developer.chrome.com/multidevice/android/customtabs).
<a name="designlib" />
### Material Design Support Library
@ -436,8 +418,6 @@ For more information about the Design library, see
in the Android Developer's blog.
<a name="libraries" />
### Additional Library Updates
In addition to Android Marshmallow, Google has announced related

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: E4D6F183-98D2-460A-9D65-937639A899E0
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Nougat Features
@ -19,7 +19,6 @@ Nougat, explains how to prepare Xamarin.Android for Android Nougat
development, and provides links to sample applications that illustrate
how to use Android Nougat features in Xamarin.Android apps.
<a name="overview" />
## Overview
@ -67,8 +66,6 @@ Nougat to try out the new features and plan migration or feature work
to target the new Android Nougat platform.
<a name="requirements" />
## Requirements
The following is required to use the new Android Nougat features in
@ -102,7 +99,6 @@ existing apps using libraries such as **Mono.Data.Sqlite.dll** may
crash when running on Android Nougat if they are not properly rebuilt.
<a name="gettingstarted" />
## Getting Started
@ -120,7 +116,6 @@ create an Android Nougat project:
Each of these steps is explained in the following sections:
<a name="updates" />
### Install Xamarin Updates
@ -134,7 +129,6 @@ updates (releases) channel, see
[Changing the Updates Channel](https://developer.xamarin.com/recipes/cross-platform/ide/change_updates_channel/).
<a name="sdk" />
### Install the Android SDK
@ -168,7 +162,6 @@ later. You must also install the latest **Android SDK Tools**:
click **Preferences > Projects > SDK Locations > Android**.
<a name="xaproject" />
### Start a Xamarin.Android Project
@ -192,7 +185,6 @@ version** to **Android 7.0 (API 24 - Nougat)** to deploy your
app to Android Nougat devices or emulators.
<a name="emudev" />
### Configure an Emulator or Device
@ -216,7 +208,6 @@ see [OTA Images for Nexus Devices](https://developers.google.com/android/nexus/o
Note that Nexus 5 devices are not supported by Android Nougat.
<a name="newfeatures" />
## New Features
@ -226,7 +217,6 @@ Saver. The following sections highlight these features and provide
links to help you get started using them in your app.
<a name="multiwindow" />
### Multi-Window Mode
@ -264,7 +254,6 @@ For more information about multi-window mode, see the
[Multi-Window Support](https://developer.android.com/guide/topics/ui/multi-window.html).
<a name="enhanced_notifications" />
### Enhanced Notifications
@ -277,7 +266,6 @@ received. Also, developers can customize notification views, leverage
system decorations in notifications, and take advantage of new
notification templates when generating notifications.
<a name="direct_reply" />
#### Direct Reply
@ -335,7 +323,6 @@ the Android
[Replying to Notifications](https://developer.android.com/guide/topics/ui/notifiers/notifications.html#direct)
topic.
<a name="bundled_notifications" />
#### Bundled Notifications
@ -355,7 +342,6 @@ bundled notification groups in Android N, see the Android
[Bundling Notifications](https://developer.android.com/guide/topics/ui/notifiers/notifications.html#bundle)
topic.
<a name="custom_views" />
#### Custom Views
@ -367,7 +353,6 @@ views in Android Nougat, see the Android
topic.
<a name="datasaver" />
### Data Saver
@ -385,7 +370,6 @@ see the Android
topic.
<a name="app_shortcuts" />
### App Shortcuts
@ -402,7 +386,6 @@ For more information about the new App Shortcuts feature in Android 7.1,
see the Android [App Shortcuts](https://developer.android.com/guide/topics/ui/shortcuts.html)
topic.
<a name="sample_code" />
### Sample Code
@ -434,7 +417,6 @@ advantage of Android Nougat features:
while the device is booted both before and after any user credentials(PIN/Pattern/Password)
are entered.
<a name="summary" />
## Summary

Просмотреть файл

@ -8,7 +8,7 @@ ms.technology: xamarin-android
ms.custom: video
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Oreo Features
@ -34,8 +34,6 @@ Android 8.0 Oreo, with links to sample apps that illustrate how to use
Android Oreo features in Xamarin.Android apps.
<a name="requirements" />
## Requirements
The following is required to use Android Oreo features in Xamarin-based
@ -53,7 +51,6 @@ apps:
installed via the Android SDK Manager.
<a name="gettingstarted" />
## Getting Started
@ -73,7 +70,6 @@ Android Oreo project:
Each of these steps is explained in the following sections:
<a name="updates" />
### Update Visual Studio and Xamarin.Android
@ -108,7 +104,6 @@ For more information about Xamarin support for Android Oreo, see the
[Xamarin.Android 8.0 release notes](https://developer.xamarin.com/releases/android/xamarin.android_8/xamarin.android_8.0/).
<a name="sdk" />
### Install the Android SDK
@ -153,7 +148,6 @@ later.
-----
<a name="xaproject" />
### Start a Xamarin.Android Project
@ -170,7 +164,6 @@ recommended that you also set your target framework level to API 26 or
later. For more about configuring Android API level levels, see
[Understanding Android API Levels](~/android/app-fundamentals/android-api-levels.md).
<a name="emudev" />
### Configure an Emulator or Device
@ -289,7 +282,6 @@ more information about manually updating your device to Android Oreo,
see [Factory Images for Nexus and Pixel Devices](https://developers.google.com/android/images).
<a name="newfeatures" />
## New Features
@ -300,7 +292,6 @@ following sections highlight these features and provide links to help
you get started using them in your app.
<a name="notifchan" />
### Notification Channels
@ -321,7 +312,6 @@ sample; this sample app manages two channels and sets additional
notification options.
<a name="notifbadge" />
### Notification Badges
@ -343,7 +333,6 @@ Developer
topic.
<a name="customfonts" />
### Custom Fonts in XML
@ -381,7 +370,6 @@ the Android Developer
[Fonts in XML](https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.html)
topic.
<a name="dlfonts" />
### Downloadable Fonts
@ -426,7 +414,6 @@ For more information about downloading fonts, see the Android Developer
topic.
<a name="autofill" />
### Autofill
@ -449,7 +436,6 @@ your app for autofill, see the Android Developer
topic.
<a name="pip" />
### Picture in Picture (PIP)
@ -486,7 +472,6 @@ continues uninterrupted while switching back and forth between display
modes or other activities.
<a name="other" />
### Other Features
@ -499,7 +484,6 @@ Android Developer
[Android Oreo Features and APIs](https://developer.android.com/about/versions/oreo/android-8.0.html) topic.
<a name="behavior" />
## Behavior Changes
@ -507,7 +491,6 @@ Android Oreo includes a variety of system and API behavior changes that can
have an impact on the functionality of existing apps. These changes
are described as follows.
<a name="bgsl" />
### Background Execution Limits
@ -535,7 +518,6 @@ Android Developer
[Background Execution Limits](https://developer.android.com/about/versions/oreo/background.html)
topic.
<a name="breaking" />
### Breaking Changes
@ -553,7 +535,6 @@ the following changes, where applicable:
background. If you are targeting Android Oreo, you should use
[PendingIntent.GetBroadcast](https://developer.xamarin.com/api/member/Android.App.PendingIntent.GetBroadcast/p/Android.Content.Context/System.Int32/Android.Content.Intent/Android.App.PendingIntentFlags/) instead.
<a name="sample_code" />
## Sample Code
@ -598,7 +579,6 @@ advantage of Android Oreo features:
**Android 8.0 Oreo development with C#**
<a name="summary" />
## Summary

Просмотреть файл

@ -205,7 +205,6 @@ These are code generation errors.
This error codes are licensing and activation errors.
<a name="xa9000" />
#### XA9000
@ -235,7 +234,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9001" />
#### XA9001
@ -265,7 +263,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9002" />
#### XA9002
@ -347,7 +344,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9003" />
#### XA9003
@ -454,7 +450,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9004" />
#### XA9004
@ -484,7 +479,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9005" />
#### XA9005
@ -514,7 +508,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9006" />
#### XA9006
@ -544,7 +537,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9008" />
#### XA9008
@ -574,7 +566,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9009" />
#### XA9009
@ -604,7 +595,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9010" />
#### XA9010
@ -636,7 +626,6 @@ This error codes are licensing and activation errors.
****Equivalent to XA9018
<a name="XA9011" />
#### XA9011
@ -666,7 +655,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9012" />
#### XA9012
@ -696,7 +684,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9013" />
#### XA9013
@ -726,7 +713,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9014" />
#### XA9014
@ -756,7 +742,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9017" />
#### XA9017
@ -786,7 +771,6 @@ This error codes are licensing and activation errors.
</tbody>
</table>
<a name="XA9018" />
#### XA9018

Просмотреть файл

@ -7,26 +7,22 @@ ms.assetid: 54583AB3-FE6D-4357-B4FC-CBC48B7EDEE4
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Troubleshooting
_Documents in this section cover features specific to troubleshooting with Android._
<a name="Troubleshooting" />
## [Troubleshooting Tips](~/android/troubleshooting/troubleshooting.md)
Troubleshooting tips and tricks.
<a name="faq" />
## [Frequently Asked Questions](questions/index.md)
Frequently asked Xamarin.Android troubleshooting questions.
<a name="resolving_library_installation_errors" />
## [Resolving Library Installation Errors](~/android/troubleshooting/resolving-library-installation-errors.md)
@ -34,14 +30,12 @@ This guide provides workarounds for some common errors that may occur
while referencing and automatically downloading Android Support
Libraries or Google Play services.
<a name="tooling_changes" />
## [Changes to the Android SDK Tooling](~/android/troubleshooting/sdk-cli-tooling-changes.md)
Starting in 26.0.1 of the Android SDK Tools, Google has removed the
existing AVD and SDK managers in favour of new command line tooling.
<a name="Xamarin_Android_Errors_Reference" />
## [Xamarin.Android Errors Reference](~/android/troubleshooting/errors.md)

Просмотреть файл

@ -7,7 +7,7 @@ ms.assetid: 2AE68ACE-8496-445D-BF17-5E4097D4AE35
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Resolving Library Installation Errors
@ -25,7 +25,6 @@ provides the steps to work around these issues and get your app project
building again.
<a name="m2repository" />
## Errors While Downloading m2Repository
@ -42,7 +41,6 @@ same error message for a different version such as
**android\_m2repository\_r18** or **android\_m2repository\_r25**.
<a name="automatic" />
### Automatic Recovery from m2repository Errors
@ -85,7 +83,6 @@ you must manually download and install the **android\_m2repository\_r_nn_.zip**
file as described in the next section.
<a name="download" />
### Manually Downloading m2repository
@ -187,8 +184,6 @@ manually download the **android\_m2repository\_r_nn_.zip** file,
unzip it, and install its contents as described in the next section.
<a name="install" />
### Manually Downloading and Installing m2repository Files
The fully manual process for recovering from **m2repository** errors entails
@ -259,7 +254,6 @@ that you have installed its contents in the correct locations as
described in the above steps.
<a name="summary" />
## Summary

Просмотреть файл

@ -6,12 +6,11 @@ ms.assetid: 56137ACA-4811-B312-6860-E16D0FA123F7
ms.technology: xamarin-android
author: mgmclemore
ms.author: mamcle
ms.date: 02/16/2018
ms.date: 03/01/2018
---
# Troubleshooting Tips
<a name="Getting_Diagnostic_Information" />
## Getting Diagnostic Information
@ -23,8 +22,7 @@ These include:
3. Android Debug Log Output.
<a name="Diagnostic_MSBuild_Output" />
<a name="Diagnostic_MSBuild_Output" />
## Diagnostic MSBuild Output
@ -52,7 +50,6 @@ To enable diagnostic MSBuild output within Visual Studio for Mac/OS X:
7. Diagnostic output is visible within the Errors Pad (**View > Pads > Errors** ), by clicking the Build Output button.
<a name="Device_Deployment_Logs" />
## Device Deployment Logs
@ -73,7 +70,6 @@ day + time that a deployment occurs, for example: **AndroidTools-2012-10-24_12-3
- On OS X, log files are written to `$HOME/Library/Logs/XamarinStudio-{VERSION}`.
<a name="Android_Debug_Log_Output" />
## Android Debug Log Output
@ -93,7 +89,6 @@ System properties are read during process startup, and thus must be
either set before the application is launched or the application must
be restarted after the system properties are changed.
<a name="Xamarin.Android_System_Properties" />
### Xamarin.Android System Properties
@ -145,7 +140,6 @@ This error occurs due to an incompatibility with Visual Studio.
Please choose the correct System.ValueTuple NuGet that corresponds with your Visual Studio 2017 installation.
<a name="GC_Messages" />
## GC Messages
@ -187,7 +181,6 @@ bridge processing code (which deals with the Java VM). The world is *not* paused
the more time that the `bridge` collections will take, and the
larger the `total` time spent collecting will be.
<a name="Global_Reference_Messages" />
## Global Reference Messages
@ -306,7 +299,6 @@ You can query both the GREF and WREF counts by querying the `JniRuntime` object.
`Java.Interop.JniRuntime.CurrentRuntime.WeakGlobalReferenceCount` - Weak Reference Count
<a name="Offline_Activation" />
## Offline Activation
@ -314,7 +306,6 @@ You can query both the GREF and WREF counts by querying the `JniRuntime` object.
If you're unable to activate Xamarin.Android on Windows, or unable to
install the full version of Xamarin.Android on Mac OS X, please see the [Offline Activation](~/android/get-started/installation/index.md) page.
<a name="Can't_upgrade_to_Indie/Business_from_Trial_Account" />
## Can't upgrade to Indie/Business from Trial Account
@ -328,7 +319,6 @@ If you recently purchased Xamarin.Android and previously started a Xamarin.Andro
This should get you up and running. If you continue to have problems, you may want to try an [Offline Activation](~/android/get-started/installation/index.md) to complete the activation of your workstation.
<a name="Receiving_'Activation_Incomplete'_Error_Message" />
## Receiving 'Activation Incomplete Error Message
@ -338,7 +328,6 @@ This issue may occur when using Xamarin.Android for Visual Studio. To resolve th
- Log location: **%LocalAppData%\\Xamarin\\Logs**
<a name="Receiving_'Error_Retrieving_Update_Information'_Error_Message" />
## Receiving 'Error Retrieving Update Information' Error Message
@ -368,7 +357,6 @@ To accomplish this, please find your platform of choice below and follow the ste
If this error message continues to appear, please e-mail **contact@xamarin.com**.
<a name="Android_Debug_Logs" />
## Android Debug Logs
@ -376,7 +364,6 @@ If this error message continues to appear, please e-mail **contact@xamarin.com**
The [Android Debug Logs](~/android/deploy-test/debugging/android-debug-log.md) may provide additional context regarding any runtime errors you're
seeing.
<a name="Floating-Point_performance_is_terrible!" />
## Floating-Point performance is terrible!
@ -404,7 +391,6 @@ If your app requires decent floating-point performance (e.g. games), you
should enable the *armeabi-v7a* ABI. You may want to only support the *armeabi-v7a* runtime, though this means that older devices which only
support *armeabi* will be unable to run your app.
<a name="Could_not_locate_Android_SDK" />
## Could not locate Android SDK
@ -418,7 +404,6 @@ Xamarin.Android where the SDK is in Visual Studio by going to
[![Android SDK Location in Xamarin Android Settings](troubleshooting-images/01a.png)]()
<a name="IDE_does_not_display_target_device" />
## IDE does not display target device
@ -479,7 +464,6 @@ emulator -partition-size 512 -avd MonoDroid
Ensure you use the correct simulator name, i.e.
[the name you used when configuring the simulator](~/android/get-started/installation/windows.md#device).
<a name="INSTALL_FAILED_INVALID_APK_when_installing_a_package" />
## INSTALL\_FAILED\_INVALID\_APK when installing a package
@ -496,7 +480,6 @@ Android package names *must* contain a period ('*.*'). Edit your package name so
- Change the Package name field to contain a '.'.
<a name="INSTALL_FAILED_MISSING_SHARED_LIBRARY_when_installing_a_package" />
## INSTALL\_FAILED\_MISSING\_SHARED\_LIBRARY when installing a package
@ -522,7 +505,6 @@ For example, adding an assembly reference to
*Mono.Android.GoogleMaps.dll* will implicitly add a `<uses-library/>`
for the Google Maps shared library.
<a name="INSTALL_FAILED_UPDATE_INCOMPATIBLE_when_installing_a_package" />
## INSTALL\_FAILED\_UPDATE\_INCOMPATIBLE when installing a package
@ -553,7 +535,6 @@ E/PackageManager( 146): Package [PackageName] signatures do not match the previ
To fix this error, completely remove the application from your device
before re-installing.
<a name="INSTALL_FAILED_UID_CHANGED_when_installing_a_package" />
## INSTALL\_FAILED\_UID\_CHANGED when installing a package
@ -581,7 +562,6 @@ $ adb uninstall @PACKAGE_NAME@
and thus preserve the conflicting UID on the target device.
<a name="Release_apps_fail_to_launch_on_device" />
## Release apps fail to launch on device
@ -737,7 +717,6 @@ using (var groupData = new JavaList<IDictionary<string, object>> ()) {
[This will be fixed in a future release](https://bugzilla.xamarin.com/show_bug.cgi?id=5401).
<a name="Unexpected_NullReferenceExceptions" />
## Unexpected NullReferenceExceptions
@ -775,7 +754,6 @@ from your process similar to:
E/dalvikvm( 123): VM aborting
```
<a name="Abort_due_to_Global_Reference_Exhaustion" />
## Abort due to Global Reference Exhaustion
@ -881,7 +859,6 @@ You can enable
[GREF Logging](~/android/troubleshooting/index.md)
to see when GREFs are created and how many exist.
<a name="Abort_due_to_JNI_type_mismatch" />
## Abort due to JNI type mismatch

Просмотреть файл

@ -14,7 +14,6 @@ ms.date: 08/21/2017
_This topic explains how layouts can be versioned by using resource qualifiers. For example, there can be a version of a layout that is only used when the device is in landscape mode and a layout version that is only for portrait mode._
<a name="creating_alternative_layouts" />
## Creating Alternative Layouts
@ -81,7 +80,6 @@ screenshot:
-----
<a name="editing_alternative_layouts" />
## Editing Alternative Layouts
@ -147,7 +145,6 @@ layout will be propagated to other layout but not to the **large-land**
layout.
<a name="multi_edit_example" />
### Multi-Edit Example
@ -188,7 +185,6 @@ other layouts)? To do this, you must unlink the layout that you want to
change before you modify it, as explained next.
<a name="making_local_changes" />
### Making Local Changes
@ -217,7 +213,6 @@ When you click the **Default** layout to view it, the `TextView` text
string is still set to `Portrait`.
<a name="handling_conflicts" />
## Handling Conflicts
@ -251,7 +246,6 @@ change to this widget as well as to the counterpart widget in the linked
**Default** layout. If all property changes are applied, the conflict
is automatically discarded.
<a name="view_group_conflicts" />
### View Group Conflicts
@ -337,7 +331,6 @@ have a red change marker because only the `LinearLayout` has changes that
were applied in the **large-land** layout.
<a name="Conflict_Persistence" />
### Conflict Persistence

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше