-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Engine bridge interface + Android implementation #30
Conversation
Will look into that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐳
options = | ||
TaskSettings.Options( | ||
noCollector = true, | ||
softwareName = Config.BASE_SOFTWARE_NAME, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This software_name
is set to ooniprobe-android-unattended
when the tests are run from the background and ooniprobe-android
.
See Raw Measurement Data in https://explorer.ooni.org/m/20240731235959.972250_IE_webconnectivity_50b43329c29ed566
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, you can disregard the DashboardViewModel.kt
code. I just kept the "Run Test" working to see if everything was fine. But we're never collecting/uploading, we still need to do the Engine SDK to properly set all configs.
@@ -73,7 +77,19 @@ class DashboardViewModel( | |||
TaskSettings( | |||
name = "web_connectivity", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to start defining various test "classes" as some tests have different keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same reply #30 (comment)
composeApp/src/commonMain/kotlin/org/ooni/engine/models/TaskSettings.kt
Outdated
Show resolved
Hide resolved
Wifi("wifi"), | ||
Mobile("mobile"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to start thinking of devices connected to the internet through TRANSPORT_BLUETOOTH
, TRANSPORT_ETHERNET
, TRANSPORT_USB
especially on android that supports these options in the Mobile Hotspot and Tethering option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Didn't think about those, I was just following the current implementation on the Android app. Maybe that will be future work, after we reach feature parity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that works for me.
|
||
object TaskLogLevelSerializer : KSerializer<TaskLogLevel> { | ||
override val descriptor = | ||
PrimitiveSerialDescriptor("TaskLogLevel", PrimitiveKind.STRING) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to use class name here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The official examples use the class name of the type we're serializing: https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/serializers.md#primitive-serializer
Closes #17
Closes #19
The
OonimkallBridge.kt
file is the most important part, the Bridge interface each platform has to implement. I believe I covered all our use cases, but please check.I tried hiding the Session Context inside the bridge implementations. I feel it isn't too much on an hassle for the platforms. Not sure what timeout to use though.
@aanorbel Hope you can help with the iOS implementation :) (#20)