-
-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '6.x.x' into feat/ui-transactions
- Loading branch information
Showing
22 changed files
with
228 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,10 @@ | |
<!-- extra recommended permission, we'd be able to collect device ringing breadcrumbs (PhoneStateBreadcrumbsIntegration) --> | ||
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> | ||
|
||
<!-- Just some random permissions to showcase the permission context sent to Sentry --> | ||
<uses-permission android:name="android.permission.CAMERA"/> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | ||
|
||
<!-- if your minSdkVersion < 16, this would make usable on minSdkVersion >= 14--> | ||
<uses-sdk | ||
tools:overrideLibrary="io.sentry.android"/> | ||
|
@@ -45,6 +49,10 @@ | |
android:name=".GesturesActivity" | ||
android:exported="false" /> | ||
|
||
<activity | ||
android:name=".PermissionsActivity" | ||
android:exported="false" /> | ||
|
||
<!-- NOTE: Replace the test DSN below with YOUR OWN DSN to see the events from this app in your Sentry project/dashboard--> | ||
<meta-data android:name="io.sentry.dsn" android:value="https://[email protected]/5428559" /> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...les/sentry-samples-android/src/main/java/io/sentry/samples/android/PermissionsActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package io.sentry.samples.android | ||
|
||
import android.Manifest | ||
import android.os.Bundle | ||
import android.widget.Toast | ||
import androidx.activity.result.contract.ActivityResultContracts.RequestPermission | ||
import androidx.appcompat.app.AppCompatActivity | ||
import io.sentry.samples.android.databinding.ActivityPermissionsBinding | ||
|
||
class PermissionsActivity : AppCompatActivity() { | ||
|
||
private lateinit var binding: ActivityPermissionsBinding | ||
private val requestPermissionLauncher = | ||
registerForActivityResult(RequestPermission()) { isGranted: Boolean -> | ||
if (isGranted) { | ||
Toast.makeText(this, "The permission was granted", Toast.LENGTH_LONG).show() | ||
} else { | ||
Toast.makeText(this, "The permission was denied", Toast.LENGTH_LONG).show() | ||
} | ||
} | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
|
||
binding = ActivityPermissionsBinding.inflate(layoutInflater) | ||
|
||
binding.cameraPermission.setOnClickListener { | ||
requestPermissionLauncher.launch(Manifest.permission.CAMERA) | ||
} | ||
|
||
binding.writePermission.setOnClickListener { | ||
requestPermissionLauncher.launch(Manifest.permission.WRITE_EXTERNAL_STORAGE) | ||
} | ||
|
||
binding.permissionsCrash.setOnClickListener { | ||
throw RuntimeException("Permissions Activity Exception") | ||
} | ||
|
||
setContentView(binding.root) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
sentry-samples/sentry-samples-android/src/main/res/layout/activity_permissions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
> | ||
|
||
<Button | ||
android:id="@+id/camera_permission" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/camera_permission" /> | ||
|
||
<Button | ||
android:id="@+id/write_permission" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/write_permission" /> | ||
|
||
<Button | ||
android:id="@+id/permissions_crash" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/crash_from_java" /> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.