Skip to content

Commit 98fe4a5

Browse files
committed
Restore uber rider profile button
1 parent da55a8d commit 98fe4a5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

app/src/main/java/com/opacitylabs/opacitycoreexample/MainActivity.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,18 @@ class MainActivity : ComponentActivity() {
105105
}
106106
},
107107
) { Text(text = "Re-initialize SDK") }
108+
Button(
109+
onClick = {
110+
lifecycleScope.launch {
111+
try {
112+
val res = OpacityCore.get("uber_rider:profile", null)
113+
Log.d("MainActivity", res["json"].toString())
114+
} catch (e: Exception) {
115+
Log.e("MainActivity", e.toString())
116+
}
117+
}
118+
},
119+
) { Text(text = "Uber Rider Profile") }
108120
}
109121
}
110122
}
@@ -115,6 +127,6 @@ class MainActivity : ComponentActivity() {
115127
requireNotNull(opacityApiKey) { "Opacity API key is null" }
116128

117129
OpacityCore.setContext(this)
118-
OpacityCore.initialize(opacityApiKey, false, OpacityCore.Environment.STAGING, true)
130+
OpacityCore.initialize(opacityApiKey, false, OpacityCore.Environment.PRODUCTION, true)
119131
}
120132
}

0 commit comments

Comments
 (0)