Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@
android:exported="false" />

<activity
android:name=".navigation.Nav2SetupActivity"
android:name=".navigation.nav2.Nav2SetupActivity"
android:exported="false"
android:theme="@style/AppTheme.Main" />

<activity
android:name=".navigation.Nav2Activity"
android:name=".navigation.nav2.Nav2Activity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Main" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package io.sentry.samples.android

import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query
import retrofit2.http.Url

interface GitHubService {

Expand All @@ -14,6 +16,10 @@ interface GitHubService {
@Path("user") user: String,
@Query("per_page") perPage: Int,
): List<Repo>

@GET fun routeWorkRequest(@Url url: String): Call<ResponseBody>

@GET suspend fun routeWorkRequestAsync(@Url url: String): ResponseBody
}

class Repo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

object GithubAPI {
object GitHubApi {
private val client =
OkHttpClient.Builder()
.eventListener(SentryOkHttpEventListener())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,10 @@ fun IntegrationsScreen() {
OutlinedButton(
onClick = {
activity.startActivity(
Intent(activity, io.sentry.samples.android.navigation.Nav2SetupActivity::class.java)
Intent(
activity,
io.sentry.samples.android.navigation.nav2.Nav2SetupActivity::class.java,
)
)
},
modifier = Modifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class SecondActivity : AppCompatActivity() {
currentSpan?.startChild("updateRepos", javaClass.simpleName)
?: Sentry.startTransaction("updateRepos", "task")

GithubAPI.service
GitHubApi.service
.listRepos(binding.editRepo.text.toString())
.enqueue(
object : Callback<List<Repo>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ThirdFragment : Fragment(R.layout.third_fragment) {
val span = Sentry.getSpan()
val child = span?.startChild("calc")

GithubAPI.service
GitHubApi.service
.listRepos("getsentry")
.enqueue(
object : Callback<List<Repo>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import io.sentry.android.replay.sentryReplayUnmask
import io.sentry.compose.SentryTraced
import io.sentry.compose.SentryUserFeedbackButton
import io.sentry.compose.withSentryObservableEffect
import io.sentry.samples.android.GithubAPI
import io.sentry.samples.android.GitHubApi
import io.sentry.samples.android.R as IR
import io.sentry.samples.android.SharedState
import kotlinx.coroutines.launch
Expand Down Expand Up @@ -160,7 +160,7 @@ fun Github(user: String = "getsentry", perPage: Int = 30) {
LaunchedEffect(perPage) {
result =
try {
GithubAPI.service.listReposAsync(user.text, perPage).random().full_name
GitHubApi.service.listReposAsync(user.text, perPage).random().full_name
} catch (e: Throwable) {
"error"
}
Expand Down Expand Up @@ -190,7 +190,7 @@ fun Github(user: String = "getsentry", perPage: Int = 30) {
scope.launch {
result =
try {
GithubAPI.service.listReposAsync(user.text, perPage).random().full_name
GitHubApi.service.listReposAsync(user.text, perPage).random().full_name
} catch (e: Throwable) {
"error"
}
Expand Down
Loading
Loading