Skip to content

Commit c003704

Browse files
authored
improve android docs, just little tweaks (#1508)
1 parent 291e7aa commit c003704

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

src/collections/_documentation/platforms/android/index.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public class DemoClass {
145145
/**
146146
* An Example of how to report an error and how to enrich the error context.
147147
*/
148-
void logWithStaticAPI() {
148+
public void logWithStaticAPI() {
149149
/*
150150
Record a breadcrumb in the current context, which will be sent
151151
with the next event(s). By default, the last 100 breadcrumbs are kept.
@@ -193,12 +193,12 @@ buildscript {
193193
}
194194
195195
dependencies {
196-
classpath 'io.sentry:sentry-android-gradle-plugin:1.7.30'
196+
classpath 'io.sentry:sentry-android-gradle-plugin:1.7.31'
197197
}
198198
}
199199
```
200200

201-
The plugin will automatically generate appropriate ProGuard mapping files and upload them when you run `gradle assemble{BuildVariant}`. For example, `assembleRelease` — Release is the default, but the plugin works for others if you have enabled ProGuard. The credentials for the upload step are loaded via environment variables.
201+
The plugin will automatically generate appropriate ProGuard mapping files and upload them when you run `gradle assemble{BuildVariant}`. For example, `assembleRelease` — Release is the default, but the plugin works for others if you have enabled ProGuard/R8. The credentials for the upload step are loaded via environment variables.
202202

203203
For more information, see the [full sentry-cli documentation]({%- link _documentation/cli/configuration.md -%}#configuration-values).
204204

@@ -242,7 +242,7 @@ sentry {
242242
}
243243
```
244244

245-
And that's it! Now when you build your app, the plugin will upload the proguard/R8 mappings,
245+
And that's it! Now when you build your app, the plugin will upload the ProGuard/R8 mappings,
246246
source bundle, and native symbols, as you configured them to Sentry.
247247

248248
## Releases
@@ -359,7 +359,8 @@ For more information, see [Tagging Events]({%- link _documentation/enriching-err
359359

360360
### Setting the Level
361361

362-
You can set the severity of an event to one of five values: `fatal`, `error`, `warning`, `info`, and `debug`. `error` is the default, `fatal` is the most severe, and `debug` is the least severe.
362+
You can set the severity of an event to one of five values: `fatal`, `error`, `warning`, `info`, and `debug`.
363+
`error` is the default, `fatal` is the most severe, and `debug` is the least severe.
363364

364365
```java
365366
Sentry.setLevel(SentryLevel.WARNING);
@@ -538,8 +539,8 @@ You can configure which package prefixes belong in your application and which do
538539

539540
```java
540541
// This can be set only during the initialization of the SDK.
541-
SentryAndroid.init(this,options -> {
542-
//set all sub packages of java. as packages that do not belong to your application
542+
SentryAndroid.init(this, options -> {
543+
// set all sub packages of java. as packages that do not belong to your application
543544
options.addInAppExclude("java.");
544545

545546
// set all sub packages of io.sentry as packages that belong to your application
@@ -555,7 +556,7 @@ Sentry exposes a `beforeSend` callback, which can be used to filter out informat
555556
The callback can be registered during the initialization of the SDK.
556557

557558
```java
558-
SentryAndroid.init(this,options -> {
559+
SentryAndroid.init(this, options -> {
559560

560561
// Add a callback that will be used before the event is sent to Sentry.
561562
// With this callback, you can modify the event or, when returning null, also discard the event.
@@ -622,7 +623,7 @@ Now you can use the Sentry NDK API just by including the sentry.h in your code:
622623
extern "C" JNIEXPORT jstring JNICALL
623624

624625
Java_io_sentry_demo_NativeDemo_crash(JNIEnv *env, jclass cls) {
625-
__android_log_print(ANDROID_LOG_WARN, "", "About to crash.");
626+
__android_log_print(ANDROID_LOG_WARN, "", "Capture a message.");
626627
sentry_value_t event = sentry_value_new_message_event(
627628
/* level */ SENTRY_LEVEL_INFO,
628629
/* logger */ "custom",
@@ -638,5 +639,5 @@ Example of uploading all your .so files:
638639
639640
```bash
640641
sentry-cli login
641-
sentry-cli upload-dif -o {YOUR ORGANISATION} -p {PROJECT} build/intermediates/merged_native_libs/{variantFolder}
642+
sentry-cli upload-dif -o {YOUR ORGANISATION} -p {PROJECT} build/intermediates/merged_native_libs/{buildVariant}
642643
```

src/collections/_documentation/platforms/android/migrate.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Example of the configuration in the Manifest:
1717

1818
```xml
1919
<application>
20-
<!-- Example of the Sentry DSN setting -->
20+
<!-- Example of the Sentry DSN setting -->
2121
<meta-data android:name="io.sentry.dsn" android:value="___PUBLIC_DSN__" />
2222
</application>
2323
```
@@ -26,7 +26,7 @@ If you want to set the configuration manually in the code, you need to initializ
2626

2727
### Installation
2828

29-
The new SDK can initialize automatically; all you need to do is provide the DSN in your Manifest file, as shown in the previous example in [Configuration](#configuration).
29+
The new SDK can initialize automatically, all you need to do is provide the DSN in your Manifest file, as shown in the previous example in [Configuration](#configuration).
3030

3131
**Manual Installation**
3232

@@ -171,7 +171,7 @@ release {
171171
}
172172
```
173173

174-
And, add to the `multidex-config.pro` to the following lines:
174+
And, add to `multidex-config.pro` the following lines:
175175

176176
```
177177
-keep class io.sentry.android.core.SentryAndroidOptions

0 commit comments

Comments
 (0)