-
Notifications
You must be signed in to change notification settings - Fork 77
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
Kotlin implemtentation of minicap #12
Conversation
This is an attempt to write a minicap version in kotlin and use higher level api that should hopefully make it easier to support many os version (and the future ones). It also is likely to prevent the reccurent "Vector<> have different types" errors. The implementation is not complete and a few changes will have to be done on stf. Signed-off-by: Crepieux Pierre <[email protected]>
1f41b35
to
09b82eb
Compare
Signed-off-by: Crepieux Pierre <[email protected]>
dfec654
to
737733a
Compare
experimental/app/build.gradle
Outdated
implementation 'com.google.android.material:material:1.3.0' | ||
implementation 'org.slf4j:slf4j-api:1.7.30' | ||
implementation 'com.github.tony19:logback-android:2.0.0' | ||
testImplementation 'junit:junit:4.+' |
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.
Let's remove test dependencies if we have no tests.
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.
👍
putInt(screenSize.height)//Height | ||
putInt(targetSize.width)//resized Width | ||
putInt(targetSize.height)//resized height | ||
put(0.toByte()) //orientation |
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.
maybe extract a constant for this?
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.
Or maybe should I simply have those sizes as parameters of sendBanner. They actually aren't used anywhere else at the moment.
@SuppressLint("PrivateApi") | ||
object DisplayManagerGlobal { | ||
private var displayManager: Any? | ||
private var CLASS: Class<*>? |
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.
It's rather named like clazz
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.
👍
experimental/build.gradle
Outdated
ext.kotlin_version = "1.4.31" | ||
repositories { | ||
google() | ||
jcenter() |
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.
Jcenter will become read only in May and completely disabled next year. I would not include it.
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.
👍
- remove currently unused test deps and code - remove Jcenter repository - reduce scope of target and device size in MinicapClientOutput - rename CLASS to clazz Signed-off-by: Crepieux Pierre <[email protected]>
I am not aware about the kotlin but I will use this approach.:+1: |
This is an attempt to write a minicap version in kotlin and
use higher level api that should hopefully make it easier
to support many os version (and the future ones).
It also is likely to prevent the reccurent "Vector<> have
different types" errors.
The implementation is not complete and a few changes will have
to be done on stf.